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:
- Under your own authorization, run the tool (ANANZI does not approve or constrain the call) and capture its textual output.
- Inspect that text before the model acts on it (API field source=tool_output is a text-type label, not agent policy).
- Decide whether to feed the text to the model, omit it, or escalate — ANANZI returns findings, not enforcement.
- Your app owns tool authorization, timeouts, retries, and any human review.
Integration limit
- Not safe tool execution: inspecting text does not authorize tools, constrain arguments, or guarantee a tool run was safe.
- Not full agent security: tool-output inspection is not equivalent to agent action authorization, sandboxing, or end-to-end agent defense.
- Not MCP/tool-description coverage: MCP and tool-description inspection remain research (#230) — out of scope here and not a shipped promise.
- Not prevention: findings do not block tool calls or stop attacks by themselves.
- Not calibrated safety: a score is not a verified probability of attack; decisions are only review or no_findings — never safe, allow, or block.
- Scaffold / mock today: this build does not serve a live model; do not treat the page as measured coverage.
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.