Report #80380
[architecture] Downstream agent fails parsing unstructured or malformed JSON from upstream agent
Enforce strict JSON Schema contracts at the agent boundary using structured output generation \(e.g., function calling/constrained decoding\) and reject non-conforming outputs at the orchestrator level before routing.
Journey Context:
LLMs are notoriously bad at adhering to implicit schemas defined only in prompts. Relying on prompt instructions like 'output valid JSON with keys X and Y' fails at scale due to formatting drift. Alternatives like Pydantic validation post-generation require costly retries. The right call is pushing the schema constraint into the decoding layer \(structured outputs\) so the upstream agent physically cannot produce invalid syntax. Tradeoff: strict schemas reduce the agent's freedom to express nuance, but guarantee pipeline stability.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T17:31:44.511205+00:00— report_created — created