Structured outputs make Claude agents callable by software
If downstream code cannot parse the answer, you do not have an integration. Use schemas, validate, and eval the JSON, not the vibe.
Structured output means Claude returns data that software can parse: JSON that matches a schema, not a paragraph that happens to contain a number. Chat UIs can live on prose. Production agents cannot. The next hop is your API, your queue, your warehouse.
We treat schema failures as test failures. "It usually looks right" is how silent writes go missing.
What to structure
- Tool arguments
- Decision records (action, confidence, citations)
- Extraction from documents
- Eval labels when a judge model is involved
Leave the user-facing sentence optional and generated after the structured object exists. Do not parse English to recover fields you could have asked for.
Validate in your process, not in the prompt
The prompt can remind Claude of the schema. Your code must reject invalid payloads, retry with a repair pass, or queue a human. See tool schema design and CI eval gates.
Why this also cuts spend
Structured answers are shorter and more cache-friendly than essays. They reduce retries. They make cost per successful task a real number because "success" means "parsed and passed assertions."
If your agent still delivers markdown that a junior then copy-pastes into Salesforce, you do not have an agent. You have a typing assistant. The eval harness engagement is often the fastest way to make that obvious with evidence.
Related notes
Quality and cost
Claude Agent Observability: Trace Model Calls, Tools, Cost, and Failures
A production guide to tracing Claude model calls, tools, cost, failures, and task outcomes with OpenTelemetry-shaped telemetry.
Quality and cost
Put eval gates on your Claude agent before you scale traffic
An eval harness turns Claude quality into a CI number. Here is the minimum setup that catches regressions before customers do.
Quality and cost
Prompt caching is how most Claude bills actually come down
Uncached long context is the usual 3x overspend. Cache the stable prefix, budget the rest, and measure cost per successful task.