Skip to content

Agents — inspect tool output text

In an agent loop, inspect untrusted tool output text before the model acts on it. ANANZI sees text after the tool has already run; it does not authorize, sandbox, or stop the tool call. Detection, not prevention — your app owns tool authorization and enforcement.

Detection, not prevention. Tool-output text inspection is not full agent security and does not promise safe tool execution. A no_findings result means the check did not flag the submitted text — not that the tool run was safe.

Where inspection sits

Wire the check into the agent loop at one place:

  1. Under your own authorization, run the tool (ANANZI does not approve or constrain the call) and capture its textual output.
  2. Inspect that text before the model acts on it (API field source=tool_output is a text-type label, not agent policy).
  3. Decide whether to feed the text to the model, omit it, or escalate — ANANZI returns findings, not enforcement.
  4. Your app owns tool authorization, timeouts, retries, and any human review.

Integration limit

Integration sketch

Scaffold preview — not a live API call. Start in monitor-only mode.

# Agent path (scaffold)
1. run tool → capture text output
2. POST inspect  source=tool_output  checks=[prompt_injection]
3. on review → omit, escalate, or withhold from the model
4. on no_findings → proceed (check did not flag — not safe tool execution)
5. model may act only after your app’s own authorization checks

Article: detector timeouts and fail-closed handling · Article: scanning agent tool descriptions · RAG use case · prompt_injection product page · secrets product page · Local docs live in apps/docs (Starlight). Deploy is tracked separately.