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

# Dashscope Thinking Agent

> Enable thinking on DashScope's QVQ Max to reason through an image problem.

```python thinking_agent.py theme={null}
"""
Dashscope Thinking Agent
========================

Cookbook example for `dashscope/thinking_agent.py`.
"""

from agno.agent import Agent
from agno.media import Image
from agno.models.dashscope import DashScope

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

agent = Agent(
    model=DashScope(id="qvq-max", enable_thinking=True),
)

image_url = "https://img.alicdn.com/imgextra/i1/O1CN01gDEY8M1W114Hi3XcN_!!6000000002727-0-tps-1024-406.jpg"

agent.print_response(
    "How do I solve this problem? Please think through each step carefully.",
    images=[Image(url=image_url)],
    stream=True,
)

# ---------------------------------------------------------------------------
# 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 DashScope API key**

```bash Mac/Linux theme={null}
export DASHSCOPE_API_KEY="your_dashscope_api_key_here"
```

```bash Windows theme={null}
$Env:DASHSCOPE_API_KEY="your_dashscope_api_key_here"
```

**3. Run the example**

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

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

Full source: [cookbook/90\_models/dashscope/thinking\_agent.py](https://github.com/agno-agi/agno/blob/v3.0.4/cookbook/90_models/dashscope/thinking_agent.py)


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