> ## Documentation Index
> Fetch the complete documentation index at: https://agno-v2-agui.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Input & Output

> Learn how to pass data to agents and handle their responses.

Agents accept input and generate output in many formats, from simple strings to validated Pydantic models. Start with strings, add structure when you need validation.

## Format Types Usage

| Use Case                        | Format                      |
| ------------------------------- | --------------------------- |
| Prototyping, chat interfaces    | Strings work fine           |
| Data extraction, classification | Structured output           |
| API responses, pipelines        | Structured input and output |

## String I/O

String in, string out:

```python theme={null}
from agno.agent import Agent
from agno.models.openai import OpenAIResponses

agent = Agent(model=OpenAIResponses(id="gpt-5.2"))

response = agent.run("What's the capital of France?")
print(response.content)  # "The capital of France is Paris."
```

## Structured I/O

Use Pydantic models to validate what goes in and what comes back:

```python theme={null}
from pydantic import BaseModel, Field
from agno.agent import Agent
from agno.models.openai import OpenAIResponses

class ReviewInput(BaseModel):
    text: str
    product_id: str

class SentimentResult(BaseModel):
    sentiment: str = Field(description="positive, negative, or neutral")
    confidence: float = Field(ge=0, le=1)
    summary: str = Field(description="One sentence summary")

agent = Agent(
    model=OpenAIResponses(id="gpt-5.2"),
    output_schema=SentimentResult,
)

response = agent.run(
    input=ReviewInput(text="Love this product!", product_id="SKU-123")
)

result: SentimentResult = response.content
print(result.sentiment)   # "positive"
print(result.confidence)  # 0.95
```

## Guides

<CardGroup cols={2}>
  <Card title="Structured Input" icon="arrow-right-to-bracket" iconType="duotone" href="/input-output/structured-input/agent">
    Validate data passed to agents and teams.
  </Card>

  <Card title="Structured Output" icon="arrow-right-from-bracket" iconType="duotone" href="/input-output/structured-output/agent">
    Get validated Pydantic objects instead of text.
  </Card>
</CardGroup>

## Advanced I/O Features

<CardGroup cols={2}>
  <Card title="Multimodal I/O" icon="images" iconType="duotone" href="/input-output/multimodal">
    Pass images, audio, video, and files to agents.
  </Card>

  <Card title="Output Model" icon="wand-magic-sparkles" iconType="duotone" href="/input-output/output-model">
    Use a secondary model for better writing or cost savings.
  </Card>
</CardGroup>
