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

# ZDR Reasoning Agent

> Disable Responses application-state storage with store=False while retaining multi-turn context in InMemoryDb.

Use `store=False` to disable Responses application-state storage while keeping multi-turn context in `InMemoryDb`.

> [!WARNING]
>
> The source labels this agent ZDR compliant. `store=False` disables Responses application-state storage; default abuse-monitoring retention can still apply. Zero Data Retention requires prior OpenAI approval and organization or project configuration. See [OpenAI data controls](https://platform.openai.com/docs/models/default-usage-policies-by-endpoint).

```python zdr_reasoning_agent.py theme={null}
"""
An example of using OpenAI Responses with reasoning features and ZDR mode enabled.

Read more about ZDR mode here: https://openai.com/enterprise-privacy/.
"""

from agno.agent import Agent
from agno.db.in_memory import InMemoryDb
from agno.models.openai import OpenAIResponses

# ---------------------------------------------------------------------------
# Create Agent
# ---------------------------------------------------------------------------

agent = Agent(
    name="ZDR Compliant Agent",
    session_id="zdr_demo_session",
    model=OpenAIResponses(
        id="o4-mini",
        store=False,
        reasoning_summary="auto",  # Requesting a reasoning summary
    ),
    instructions="You are a helpful AI assistant operating in Zero Data Retention mode for maximum privacy and compliance.",
    db=InMemoryDb(),
    add_history_to_context=True,
    stream=True,
)

agent.print_response("What's the largest country in Europe by area?")
agent.print_response("What's the population of that country?")
agent.print_response("What's the population density per square kilometer?")

# ---------------------------------------------------------------------------
# Run Agent
# ---------------------------------------------------------------------------

if __name__ == "__main__":
    pass
```

## Run the Example

<Snippet file="create-venv-step.mdx" />

**1. Install dependencies**

```bash theme={null}
uv pip install -U agno openai
```

**2. Export your OpenAI API key**

```bash Mac/Linux theme={null}
export OPENAI_API_KEY="your_openai_api_key_here"
```

```bash Windows theme={null}
$Env:OPENAI_API_KEY="your_openai_api_key_here"
```

**3. Run the example**

Save the code above as `zdr_reasoning_agent.py`, then run:

```bash theme={null}
python zdr_reasoning_agent.py
```

Full source: [cookbook/90\_models/openai/responses/zdr\_reasoning\_agent.py](https://github.com/agno-agi/agno/blob/v3.0.4/cookbook/90_models/openai/responses/zdr_reasoning_agent.py)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.