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

# Ethical Dilemma

> Use deepseek-reasoner to think through an ethical dilemma before GPT-4o responds.

```python ethical_dilemma.py theme={null}
"""
Ethical Dilemma
===============

Demonstrates this reasoning cookbook example.
"""

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


# ---------------------------------------------------------------------------
# Create Example
# ---------------------------------------------------------------------------
def run_example() -> None:
    # ---------------------------------------------------------------------------
    # Create Agent
    # ---------------------------------------------------------------------------
    task = (
        "You are a train conductor faced with an emergency: the brakes have failed, and the train is heading towards "
        "five people tied on the track. You can divert the train onto another track, but there is one person tied there. "
        "Do you divert the train, sacrificing one to save five? Provide a well-reasoned answer considering utilitarian "
        "and deontological ethical frameworks. "
        "Provide your answer also as an ascii art diagram."
    )

    reasoning_agent = Agent(
        model=OpenAIChat(id="gpt-5.6-luna"),
        reasoning_model=DeepSeek(id="deepseek-reasoner"),
        markdown=True,
    )

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


# ---------------------------------------------------------------------------
# Run Example
# ---------------------------------------------------------------------------
if __name__ == "__main__":
    run_example()
```

## 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. Run the example**

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

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

Full source: [cookbook/10\_reasoning/models/deepseek/ethical\_dilemma.py](https://github.com/agno-agi/agno/blob/v3.0.4/cookbook/10_reasoning/models/deepseek/ethical_dilemma.py)


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