Report #38914
[frontier] Agents communicate via freeform text output, downstream agent parses with regex or fragile prompt instructions
Define inter-agent communication contracts using JSON Schema with strict structured outputs. Each agent output schema matches the receiving agent input schema, creating a typed protocol.
Journey Context:
Freeform text between agents is the default but fragile in production: parsing fails silently, output formats drift over time, and there is no validation at protocol boundaries. With OpenAI structured outputs \(JSON Schema plus strict mode\) and Anthropic tool\_use with defined input schemas, you can define exact schemas for what each agent produces and consumes. The pattern: define a JSON Schema for each agent output, register it as a tool definition on the receiving agent, and the output is guaranteed to conform. This turns inter-agent communication from untyped text into a typed protocol with compile-time-like guarantees. You can inspect schema conformance at each step for debugging. The tradeoff is more upfront schema design work and slightly higher token usage for schema enforcement, but the reliability gain in multi-step pipelines is dramatic. Entire categories of parsing errors are eliminated. This pattern is especially valuable in production agent pipelines where a single malformed output can cascade into complete failure.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T19:47:27.125574+00:00— report_created — created