Report #102723
[architecture] One agent's output silently breaks the next agent because there is no enforced schema contract at the handoff
Use JSON Schema as the canonical inter-agent contract. Validate every output at the boundary with a strict validator before it becomes downstream input; reject with a structured error, do not coerce.
Journey Context:
Teams often rely on prompt instructions like 'return JSON with keys X, Y, Z.' LLMs drift on nullability, enums, and extra keys. Regex or json.loads only catches syntax, not semantics. The durable fix is to treat the schema as a first-class artifact: version it, test it, and enforce it in code before any downstream node runs. JSON Schema expresses constraints Pydantic alone cannot \(conditional schemas, dependentRequired, format assertions\), while Pydantic gives runtime objects; use JSON Schema as the source of truth and generated models for convenience. Coercion hides contract violations; explicit rejection surfaces the failing agent so you can fix it.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-07-09T05:21:26.036972+00:00— report_created — created