> ## 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.

# Treaty Of Versailles Analysis

> Compare gpt-4o with reasoning=True against a DeepSeek reasoner reasoning_model on a nuanced Treaty of Versailles analysis, streaming full reasoning.

Demonstrates DeepSeek-backed reasoning for historical analysis.

> [!WARNING]
>
> DeepSeek will retire the source's `deepseek-reasoner` alias after July 24, 2026 at 15:59 UTC. Replace it with `deepseek-v4-flash` before running. See the [DeepSeek V4 migration notice](https://api-docs.deepseek.com/news/news260424/).

```python analyse_treaty_of_versailles.py theme={null}
"""
Treaty Of Versailles Analysis
=============================

Demonstrates DeepSeek-backed reasoning for historical analysis.
"""

from agno.agent import Agent
from agno.models.deepseek import DeepSeek
from agno.models.openai import OpenAIResponses

# ---------------------------------------------------------------------------
# Create Agent
# ---------------------------------------------------------------------------
task = (
    "Analyze the key factors that led to the signing of the Treaty of Versailles in 1919. "
    "Discuss the political, economic, and social impacts of the treaty on Germany and how it "
    "contributed to the onset of World War II. Provide a nuanced assessment that includes "
    "multiple historical perspectives."
)

agent = Agent(
    model=OpenAIResponses(id="gpt-5.6"),
    reasoning_model=DeepSeek(id="deepseek-reasoner"),
    markdown=True,
)

# ---------------------------------------------------------------------------
# Run Agent
# ---------------------------------------------------------------------------
if __name__ == "__main__":
    agent.print_response(task, stream=True, show_full_reasoning=True)
```

## Run the Example

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

**1. Install dependencies**

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

**2. Export your API keys**

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

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

**3. Update the DeepSeek model**

Replace `DeepSeek(id="deepseek-reasoner")` with `DeepSeek(id="deepseek-v4-flash")` in the saved file.

**4. Run the example**

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

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

Full source: [cookbook/10\_reasoning/agents/analyse\_treaty\_of\_versailles.py](https://github.com/agno-agi/agno/blob/v3.0.4/cookbook/10_reasoning/agents/analyse_treaty_of_versailles.py)


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