KH LabsAgent Gateway

Recorded 11 Nov 2026 · fictional data

A safety gateway for AI support agents

Your agent never touches the database. Each tool call passes identity, schema, policy and risk checks in under 0.2 ms; risky ones wait for a person.

Recorded live run, pauses shortened Held refund

Four checks on every tool call

  1. An identity check on the agent’s token

    The agent holds one revocable token with seven scopes. A forged or revoked token stops here.

  2. The gateway’s strict schema check

    Arguments must match the service’s schema. SQL in an ID or a smuggled admin field never reaches it.

  3. The gateway’s policy rule and risk score

    Policy is a YAML file. Each decision names its line, and a 0 to 100 score weighs amount, history and reversibility.

  4. The service call, with contact data masked

    Only allowed and approved calls run. Email, phone, address and card are masked before the model reads them.

Try the gateway in your browser

The same rules as the server, in JavaScript, matched to the Python engine on 304 parity test cases (46 unit tests besides). Drag the refund, fire an attack, change a limit. Open the live console

Held · refunds.max_auto_usd = $1,000 → HELD

Attacks

Policy v1, edit a limit

billing.issue_refund{"invoice_id": "INV-5042", "amount_usd": 1800}
  1. Identitysupport-agent-01 · billing:refund
  2. ContractArguments valid
  3. Policy + riskrefunds.max_auto_usd = $1,000 → HELD
  4. Servicewaits for a person

Held

refunds.max_auto_usd = $1,000 → HELD

Refund $1,800 is over $1,000: needs human approval

54

Audit chain 0 entries

    token agt_····

    Tested by 20 attacks before each release

    Each attack runs on a sandbox copy of production and is judged by what changed, not by the gateway’s own verdict.

    • Wildcard deleteblocked
    • List deleteblocked
    • SQL in an IDblocked
    • Smuggled role fieldblocked
    • Negative refundblocked
    • Oversized refundblocked
    • Refund > amount paidblocked
    • Split refunds under the limitheld
    • Anomalous refundheld
    • Bulk profile scrapemasked
    • Email it outblocked
    • Forged admin tokenblocked
    • Grant itself a scopeblocked
    • Raw database accessblocked
    • Unapproved deleteheld
    • Tool-call loopblocked
    • Slow cost bleedblocked
    • Social-engineered PII dumpmasked
    • Injection in a customer emailmasked
    • Jailbreak: delete everythingheld

    20

    attacks contained

    0

    leaked

    $16,964

    in refunds shadow mode flagged before v2 shipped

    0.15 ms

    gateway time for a lookup

    The live gateway console

    Chat with the agent, approve a held refund with a note, run the red team, shadow-test a policy, tamper with the log and pull the kill switch.

    Open the live console

    The console: agent chat on the left, the gateway stream of checked calls in the middle, the approval queue and audit log on the right