Answer: You configure the output format using the `outputFormat` (TypeScript) or `output_format` (Python) option, which accepts an object with `type` set to `"json_schema"` and a `schema` defining your output structure. Status: Confirmed Entry: tool/claude-code/agents-and-automation/output-format-configuration Revision: 1 Digest: sha256:f0abc9f282c0e302 (changes whenever the content changes) Timeline: Created: 2026-11-13T03:03:02Z Last changed: 2026-11-13T03:03:02Z Last verified: 2026-11-20T12:17:27Z Next check: 2026-11-21T12:17:27Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Source | As of TypeScript option | outputFormat | [1] | 2026-11-20 Python option | output_format | [1] | 2026-11-20 type value | json_schema | [1] | 2026-11-20 schema description | A [JSON Schema](https://json-schema.org/understanding-json-schema/about) object defining your output structure. | [1] | 2026-11-20 Zod generation | z.toJSONSchema(schema, { target: "draft-7" }) | [1] | 2026-11-20 Pydantic generation | .model_json_schema() | [1] | 2026-11-20 Sources: [1] Anthropic. "Get structured output from agents". https://code.claude.com/docs/en/agent-sdk/structured-outputs.md Role: primary. Accessed: 2026-11-20T12:17:27Z Quote: "The `outputFormat` (TypeScript) or `output_format` (Python) option accepts an object with:" (Supports: TypeScript option, Python option) Quote: "`type`: Set to `"json_schema"` for structured outputs" (Supports: type value) Quote: "`schema`: A [JSON Schema](https://json-schema.org/understanding-json-schema/about) object defining your output structure." (Supports: schema description) Quote: "You can generate this from a Zod schema with `z.toJSONSchema(schema, { target: "draft-7" })`" (Supports: Zod generation) Quote: "or a Pydantic model with `.model_json_schema()`" (Supports: Pydantic generation) Published: 2026-11-20T02:57:54Z Snapshot SHA-256: e9e1254217642a03b1b5dc046b43102443b7c7cfcfc3c0590efb9468f8b5ae75 (captured 2026-11-13T03:03:01Z) Verification: Method: Automated extraction from [1] with deepseek-flash (JSON output, thinking disabled). Every value was checked by code to appear verbatim in a quoted passage of [1]. On this check the text of [1] was unchanged since 2026-11-13T03:03:02Z, so the values verified then were kept. Cross-check: not-available at 2026-11-20T12:17:27Z. No independent second source is configured for this entry Last successful check: 2026-11-20T12:17:27Z Last attempt: 2026-11-20T12:17:27Z Notes and limitations: Extracted automatically from a single official source (section "Output format configuration"). Related: https://latestn.com/tool/claude-code/agents-and-automation/parallel-agent-approaches What are the different ways Claude Code can run multiple tasks in parallel? https://latestn.com/tool/claude-code/agents-and-automation/persist-sessions-hosting How do I persist sessions and state when hosting the Claude Code Agent SDK in production? https://latestn.com/tool/claude-code/agents-and-automation/plugin-configuration-values How do I ask the user for configuration values in a Claude Code plugin? https://latestn.com/tool/claude-code/agents-and-automation/opt-in-task-tracking-tools How do I opt in to Claude Code's task-tracking tools on models where they aren't available by default? https://latestn.com/tool/claude-code/agents-and-automation/optimize-tool-discovery How can I optimize tool discovery for tool search in Claude Code? https://latestn.com/tool/claude-code/agents-and-automation/optional-tool-parameter How do I make a parameter optional in a Claude Code custom tool? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-13T03:03:02Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/claude-code/agents-and-automation/output-format-configuration/latest Challenge this entry: Open challenges: None How: If a value here is wrong or out of date, send what is wrong and a link to evidence. Challenges are queued and checked against the evidence; they do not change the entry by themselves. If the entry changes as a result, the change log says so. Form: https://latestn.com/dispute/tool/claude-code/agents-and-automation/output-format-configuration POST: https://latestn.com/dispute/tool/claude-code/agents-and-automation/output-format-configuration with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/claude-code/agents-and-automation/output-format-configuration?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). How do I configure the output format for a Claude Code agent? Revision 1, last verified 2026-11-20T12:17:27Z. https://latestn.com/tool/claude-code/agents-and-automation/output-format-configuration (accessed 2026-11-21T10:01:51Z). @misc{LatestN_tool_claude_code_agents_and_automation_output_format_configuration_r1, title = {How do I configure the output format for a Claude Code agent?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/claude-code/agents-and-automation/output-format-configuration}}, note = {Revision 1; digest sha256:f0abc9f282c0e302; last verified 2026-11-20T12:17:27Z; accessed 2026-11-21T10:01:51Z} } Reuse: License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/) Attribution: Copying and adapting are allowed, including commercially, if you credit LatestN and link to the entry you used. Each entry ends with a ready-made citation. URL: https://latestn.com/tool/claude-code/agents-and-automation/output-format-configuration