Prerequisites
- An API key (Quickstart).
- A place in your orchestrator to wrap each hop (agent output → next agent or customer).
The pattern
Wrap the point where one agent’s output becomes another agent’s input (or a customer message) in one function. Reuse the Act on Each Verdict outcomes: Pass, Fix, Block, Escalate.Code
Raise aBlocked exception on Block or low-confidence Fix so the orchestrator can halt and escalate.
Handling Block in a running workflow
- Halt the run. Do not let downstream agents proceed on unenforced input.
- Open an escalation with your orchestrator’s run/step identifiers and the rules cited (
rule_id/signal_name, orrules_violated[].rule_refwhen present). - Do not retry the same content. A Block means no compliant version exists.
Tool results are text too
A tool result that an agent will read and act on is still text. Enforce it with the samePOST /api/v3/content/validate call before the next agent consumes it.
Optional metadata on that endpoint is a free-form object merged into the job. It is not required for per-hop enforcement, and keys such as surface or run_id are not a documented Activity filter schema. Use List Activity filters (agent_id, source, rule_id, status, search) only as that page defines them.
Gotchas
- Enforce structured messages as text. If agents pass JSON, enforce the human-readable fields, not the envelope.
- Sync can fall back to async on long hops. Check
modeand poll untilcompletedordone(Long-Form Content).
Next
Export Activity
Pull the activity chain for a run.
Act on Each Verdict
The Pass / Fix / Block / Escalate handler pattern.

