Harness

Decoys and tool drift

Refuse decoy tools and pause the agent when one is called, and report tool definitions so Scute notices when one changes.

A decoy tool is a tool no legitimate task calls, such as export_all_customers. You offer it to the model like any other tool and list it in decoy. A call to it means the agent was steered, usually by a prompt injection. Available in TypeScript and Ruby.

createHarness({  agent: "support-bot",  guards: [guards.decoy(["export_all_customers"]), guards.permissions()],});

Options#

toolsstring listrequired
The decoy tool names. The first argument.
reportboolean
Report the call to Scute. Default true. With false the call is only refused.
modeenforce, monitor or observe
Ruby only. Overrides the harness mode. In TypeScript the guard always uses the harness mode.

What a call does#

  1. The guard reports the call: POST /v1/auth/:app_id/agent/decoys with { "tool": "export_all_customers" }.
  2. Scute suspends the agent, ends every open task of the agent, records an app.authz.agent.decoy_triggered event, adds an item to the agent's monitors inbox and sends a critical alert to your team. See Agents.
  3. The run closes for good, even when the report fails.
  4. The decision is deny, reason decoy_called, message I can't continue with this. A person will follow up.

The guard has no when: it acts on the listed names only. Its deny stops evaluation, so guards listed after it do not run.

The report is sent whatever the guard's mode. In monitor or observe mode the call itself is not blocked, but the report still pauses the agent and closes the run. Use report: false while testing.

Tool drift#

A tool's description is part of the model's prompt, so a changed description is a prompt injection route. Report the tools the model sees, and Scute flags one whose definition changes later. Available in TypeScript and Ruby.

const report = await run.reportTools(  definitions.map((t) => ({ name: t.name, description: t.description, inputSchema: t.inputSchema })));// { known: 3, new: [], changed: ["refund_invoice"] }
  • Only a SHA-256 hash of each definition leaves your process. The hash covers name, description (empty when missing) and the input schema (null when missing), with object keys sorted at every level, so key order does not change it. TypeScript and Ruby compute the same hash.
  • The request is POST /v1/auth/:app_id/agent/tools with { "tools": [{ "name": "...", "hash": "..." }] }.
  • The first report for an agent is the baseline: every tool counts as known.
  • After that, a new name is listed in new and goes to the monitors inbox. A known name with a different hash is listed in changed, recorded as an app.authz.agent.tool_drift event, added to the inbox and sent as a warning alert.

Report once per process start, or whenever you build the tool list.