# Enablement of WatsonxLLM as the provider in crewai project setup

**URL:** https://community.crewai.com/t/enablement-of-watsonxllm-as-the-provider-in-crewai-project-setup/1112
**Category:** General
**Tags:** crewai
**Created:** [October 29, 2024, 11:21am UTC](https://community.crewai.com/t/enablement-of-watsonxllm-as-the-provider-in-crewai-project-setup/1112 "2024-10-29T11:21:44Z")
**Posts on this page:** 1
**Showing post:** 7

<div class="post-metadata">

### Author: ![rokbenko](https://sea1.discourse-cdn.com/flex025/user_avatar/community.crewai.com/rokbenko/32/492_2.png) [@rokbenko](https://community.crewai.com/u/rokbenko)
#### Post date: [November 3, 2024, 10:46am UTC](https://community.crewai.com/t/enablement-of-watsonxllm-as-the-provider-in-crewai-project-setup/1112/7 "2024-11-03T10:46:24Z")

</div>

@Paarttipaabhalaji If you encounter this error, follow these two steps:

1. Use the CrewAI `LLM` class, which leverages [LiteLLM](https://docs.litellm.ai/) in the background.
2. Make sure to set the LLM provider before configuring the LLM. For watsonx.ai, use `watsonx/<LLM provider>/<LLM name>`. If you’re unsure how to do this for a specific LLM provider, refer to the [LiteLLM Providers page](https://docs.litellm.ai/docs/providers) for guidance.

```auto
from crewai import Agent, LLM

my_llm = LLM(
    api_key=os.getenv("WATSONX_API_KEY"),
    model="watsonx/meta-llama/llama-3-8b-instruct",
)

my_agent = Agent(
    ...,
    llm=my_llm,
)

```

---

_[View the full topic](https://community.crewai.com/t/enablement-of-watsonxllm-as-the-provider-in-crewai-project-setup/1112)._
