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

# IBM WatsonX

> Learn how to use IBM WatsonX models in Agno.

IBM WatsonX provides access to powerful foundation models through IBM's cloud platform.

See all the IBM WatsonX supported models [here](https://www.ibm.com/products/watsonx-ai/foundation-models).

* We recommend using `meta-llama/llama-3-3-70b-instruct` for general use
* We recommend `ibm/granite-20b-code-instruct` for code-related tasks
* We recommend using `meta-llama/llama-3-2-11b-vision-instruct` for image understanding

#### Multimodal Support

With WatsonX we support `Image` as input

## Authentication

Set your `IBM_WATSONX_API_KEY` and `IBM_WATSONX_PROJECT_ID` environment variables. Get your credentials from [IBM Cloud](https://cloud.ibm.com/).
You can also set the `IBM_WATSONX_URL` environment variable to the URL of the WatsonX API you want to use. It defaults to `https://eu-de.ml.cloud.ibm.com`.

<CodeGroup>
  ```bash Mac theme={null}
  export IBM_WATSONX_API_KEY=***
  export IBM_WATSONX_PROJECT_ID=***
  ```

  ```bash Windows theme={null}
  setx IBM_WATSONX_API_KEY ***
  setx IBM_WATSONX_PROJECT_ID ***
  ```
</CodeGroup>

## Example

Use `WatsonX` with your `Agent`:

<CodeGroup>
  ```python agent.py theme={null}
  from agno.agent import Agent, RunResponse
  from agno.models.ibm import WatsonX

  agent = Agent(
      model=WatsonX(id="meta-llama/llama-3-3-70b-instruct"),
      markdown=True
  )

  # Print the response in the terminal
  agent.print_response("Share a 2 sentence horror story.")

  ```
</CodeGroup>

<Note> View more examples [here](../examples/models/ibm). </Note>

## Params

<Snippet file="model-ibm-watsonx-params.mdx" />

`WatsonX` is a subclass of the [Model](/reference/models/model) class and has access to the same params.
