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

# WatsonX Default COT Fallback

> Runs an IBM WatsonX llama-3-3-70b-instruct agent with reasoning=True to stream default chain-of-thought steps in debug mode.

Demonstrates default chain-of-thought behavior with an IBM WatsonX model.

```python ibm_watsonx_default_COT.py theme={null}
"""
WatsonX Default COT Fallback
============================

Demonstrates default chain-of-thought behavior with an IBM WatsonX model.
"""

from agno.agent import Agent
from agno.models.ibm import WatsonX

# ---------------------------------------------------------------------------
# Create Agent
# ---------------------------------------------------------------------------
reasoning_agent = Agent(
    model=WatsonX(id="meta-llama/llama-3-3-70b-instruct"),
    reasoning=True,
    debug_mode=True,
    markdown=True,
)

# ---------------------------------------------------------------------------
# Run Agent
# ---------------------------------------------------------------------------
if __name__ == "__main__":
    reasoning_agent.print_response(
        "Give me steps to write a python script for fibonacci series",
        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 ibm-watsonx-ai
    ```
  </Step>

  <Step title="Export environment variables">
    <CodeGroup>
      ```bash Mac/Linux theme={null}
      export IBM_WATSONX_API_KEY="your_ibm_watsonx_api_key_here"
      export IBM_WATSONX_PROJECT_ID="your_ibm_watsonx_project_id_here"
      ```

      ```bash Windows theme={null}
      $Env:IBM_WATSONX_API_KEY="your_ibm_watsonx_api_key_here"
      $Env:IBM_WATSONX_PROJECT_ID="your_ibm_watsonx_project_id_here"
      ```
    </CodeGroup>
  </Step>

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

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

Full source: [cookbook/10\_reasoning/agents/ibm\_watsonx\_default\_COT.py](https://github.com/agno-agi/agno/blob/main/cookbook/10_reasoning/agents/ibm_watsonx_default_COT.py)
