---
source: https://iinventedlight.com/library/notes/agents-sdk-output-types.md
title: "Set an output type when you need structured agent results"
license: CC-BY-4.0
license_url: "https://creativecommons.org/licenses/by/4.0/"
author: "iinventedlight (synthesis of cited sources); text drafted with AI assistance"
date: 2026-11-22
status: published
approved_by: "Cole Withington, 2026-11-27 14:30 PT: \"Yes, publish all of that now\""
checked_on: 2026-11-22
as_of: 2026-11-22
confidence: medium
untested: "Not reproduced (2026-11-22). Official docs and source files were read; no test suite, server, or API call was run for this note."
category: coverage-gaps
client: Librarian
source_license: "MIT (OpenAI Agents SDK; Inspect AI); prose restates cited source lines in own words"
license_family: mixed-green
attribution: "Summary by iinventedlight (AI-assisted). Sources: OpenAI Agents SDK agents.md (MIT); Inspect AI structured output docs (MIT). Text was condensed and changed from the originals."
topic_area: "code-ai-eng: structured agent outputs"
tags: [agents, structured-outputs, openai-agents, inspect-ai]
sources:
  - id: S1
    title: "Agents"
    publisher: OpenAI Agents SDK
    url: https://github.com/openai/openai-agents-python/blob/main/docs/agents.md
    accessed: 2026-11-22
    license: "MIT"
  - id: S2
    title: "Structured Output"
    publisher: Inspect AI
    url: https://github.com/UKGovernmentBEIS/inspect_ai/blob/main/docs/structured.qmd
    accessed: 2026-11-22
    license: "MIT"
---

# Set an output type when you need structured agent results
**Answer:** By default, agents produce plain text outputs. Use the output_type parameter for a particular type. Structured output asks models to adhere to a supplied JSON Schema.

## Why it matters

By default, agents produce plain text outputs. Structured output is a feature supported by some model providers. You can use the output_type parameter.

A common choice is to use Pydantic objects. Models generate responses which adhere to a supplied JSON Schema. Dataclasses, lists, and TypedDict can also be wrapped.

When you pass an output_type, that tells the model to use structured outputs. You should therefore test the use of structured output. Specifying a JSON schema can introduce unknown effects on model task performance.

- `Default is text` Agents produce plain text outputs
- `output_type` Use the output_type parameter
- `JSON Schema` Adhere to a supplied JSON Schema

## See also

- [ao-structured-openai-structured-outputs](https://iinventedlight.com/library/notes/ao-structured-openai-structured-outputs/)
- [inspect-eval-caching](https://iinventedlight.com/library/notes/inspect-eval-caching/)
- [inspect-eval-compaction](https://iinventedlight.com/library/notes/inspect-eval-compaction/)

## Claims

- id: C1
  claim: Agents produce plain text outputs by default.
  source: S1
  evidence: "By default, agents produce plain text"

- id: C2
  claim: Passing output_type tells the model to use structured outputs.
  source: S1
  evidence: "When you pass an `output_type`, that tells the model to use"

- id: C3
  claim: Structured output is meant to make model responses adhere to a supplied JSON Schema.
  source: S2
  evidence: "responses which adhere to a supplied JSON Schema"

## Sources

- [S1] Agents. OpenAI Agents SDK. https://github.com/openai/openai-agents-python/blob/main/docs/agents.md . License: MIT. Accessed 2026-11-22.

- [S2] Structured Output. Inspect AI. https://github.com/UKGovernmentBEIS/inspect_ai/blob/main/docs/structured.qmd . License: MIT. Accessed 2026-11-22.

License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: OpenAI Agents SDK agents.md (MIT); Inspect AI structured output docs (MIT). Text was condensed and changed from the originals.

---

Agents: [/agents.md](/agents.md) | [/.well-known/agent-library.json](/.well-known/agent-library.json).
