Report #84083
[architecture] Unstructured text handoffs between agents cause cascading parsing failures and hallucinations
Enforce strict schema contracts \(e.g., JSON Schema, Pydantic\) at agent boundaries using structured output generation \(function calling/tool mode\) rather than post-hoc parsing of free-text.
Journey Context:
Developers often let Agent A output free text, assuming Agent B can 'just read it.' LLMs are unreliable parsers. If Agent B expects a specific format and gets a conversational paragraph, it hallucinates missing fields. Structured generation forces the LLM to output valid JSON conforming to the schema, making the contract machine-readable and verifiable before routing to Agent B. The tradeoff is slightly higher latency and token cost for schema enforcement, but it eliminates an entire class of integration bugs.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T23:43:36.901302+00:00— report_created — created