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

# DeepSeek Reasoning Effort

> DeepSeek V4 models accept a `reasoning_effort` parameter that controls how much the model thinks before answering.

DeepSeek V4 models accept a `reasoning_effort` parameter that controls how much the model thinks before answering. Valid values are "high" and "max" ("low" and "medium" are mapped to "high" server-side). It is left unset by default, so the API uses its own default ("high"). For demanding agent scenarios, DeepSeek recommends "max".

```python reasoning_effort.py theme={null}
"""
Deepseek Reasoning Effort
=========================

DeepSeek V4 models accept a `reasoning_effort` parameter that controls how much the
model thinks before answering. Valid values are "high" and "max" ("low" and "medium"
are mapped to "high" server-side). It is left unset by default, so the API uses its
own default ("high"). For demanding agent scenarios, DeepSeek recommends "max".

Note: while thinking mode is active, temperature, top_p, presence_penalty and
frequency_penalty are ignored by the API.
"""

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

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

agent = Agent(
    model=DeepSeek(id="deepseek-v4-pro", reasoning_effort="max"),
    markdown=True,
)

task = (
    "A farmer needs to cross a river with a fox, a chicken and a sack of grain. "
    "The boat only fits the farmer and one item. The fox cannot be left alone with "
    "the chicken, and the chicken cannot be left alone with the grain. "
    "Provide a step-by-step solution."
)

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

## Run the Example

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

  <Step title="Install dependencies">
    ```bash theme={null}
    uv pip install -U agno openai
    ```
  </Step>

  <Step title="Export your DeepSeek API key">
    <CodeGroup>
      ```bash Mac/Linux theme={null}
      export DEEPSEEK_API_KEY="your_deepseek_api_key_here"
      ```

      ```bash Windows theme={null}
      $Env:DEEPSEEK_API_KEY="your_deepseek_api_key_here"
      ```
    </CodeGroup>
  </Step>

  <Step title="Run the example">
    Save the code above as `reasoning_effort.py`, then run:

    ```bash theme={null}
    python reasoning_effort.py
    ```
  </Step>
</Steps>

Full source: [cookbook/90\_models/deepseek/reasoning\_effort.py](https://github.com/agno-agi/agno/blob/main/cookbook/90_models/deepseek/reasoning_effort.py)
