Rasa Pro can run your agent on Claude. You need two changes: your Claude API key in .env, and provider: anthropic in integrations.yml. This guide shows both, and how to check that your agent really talks to Claude.
It’s for agents built on Mantle, Rasa Pro’s LLM-native engine, which needs Rasa Pro 3.21 or later. Every step was run with Rasa Pro 3.21.4 and Claude Sonnet 5.5.
Cost: Claude is pay-per-use. Claude Sonnet 5.5 costs $2 per million input tokens and $10 per million output tokens (Claude pricing (opens in a new tab)).
Step 1: Add Your Claude API Key to .env
Rasa reads your keys from the .env file in your project folder. If you don’t have a Claude API key yet, How to Get a Claude API Key (opens in a new tab) shows how to create one. Then, in your project folder, run this with your key in place of YOUR_CLAUDE_API_KEY:
echo 'ANTHROPIC_API_KEY=YOUR_CLAUDE_API_KEY' >> .env
>> adds the line at the end of the file, so the keys already in it, such as your Rasa licence key, stay where they are.
Step 2: Set the Anthropic Provider in integrations.yml
Your agent’s LLM is set in integrations.yml, in a model group. Open the file in a text editor and change the model entry to Claude:
model_groups:
- id: main_model
models:
- provider: anthropic
model: claude-sonnet-5-5
api_key: ${ANTHROPIC_API_KEY}
provider: anthropicsends the requests to Claude. Rasa hands any provider exceptopenai,azureandself-hostedto LiteLLM, the library it uses to reach model providers (integrations.yml reference (opens in a new tab)).model:is a Claude model ID, from the table below.api_key: ${ANTHROPIC_API_KEY}reads your key from.env, so the key itself never sits in this file.id: main_modelis the group’s name. Keep the name thatagent.ymluses underorchestrator.model_group.
Pick the model by what you need. Prices are per million tokens, from Claude’s pricing page (opens in a new tab):
| Model | model: value | Input / output price |
|---|---|---|
| Claude Sonnet 5.5 | claude-sonnet-5-5 | $2 / $10 |
| Claude Opus 5.5 | claude-opus-5-5 | $4 / $20 |
| Claude Haiku 5.5 | claude-haiku-5-5 | $0.10 / $0.50 |
This guide was run with Claude Sonnet 5.5, which balances quality and price.
Step 3: Train Your Agent and Check It Uses Claude
rasa train
rasa inspect
rasa train packs your agent with its new settings, and rasa inspect starts it and opens the Rasa Inspector in your browser. Send your agent a message, click Inspect at the top of the page, then click one of the LLM calls. Its panel names the model:

claude-sonnet-5-5 under Model means your agent is talking to Claude.
Clean Up
Press Ctrl+C in Terminal to stop the agent. Claude charges only for the calls your agent makes, so a stopped agent costs nothing.
Common Mistakes
| Mistake | Do this instead |
|---|---|
Pasting the key into integrations.yml | Keep it in .env, and write ${ANTHROPIC_API_KEY} in integrations.yml. |
Adding the key with > instead of >> | > replaces .env and deletes your other keys. Use >>. |
Writing the product name, such as Claude Sonnet 5.5, as the model | Use the model ID, such as claude-sonnet-5-5. |
| Renaming the model group | Keep the id that agent.yml names under orchestrator.model_group. |
Troubleshooting
| Problem | Fix |
|---|---|
Unknown model name 'claude-sonnet-5-5', using 'cl100k_base' encoding as fallback | Harmless: Rasa estimates prompt sizes with a tokenizer that doesn’t know Claude’s names. Here’s why. |
missing a unique value for 'agent.id' on the first rasa train | Harmless: Rasa adds an id to agent.yml. Set your own id. |
zsh: command not found: rasa | Turn on your project’s virtual environment first: source .venv/bin/activate. |
FAQ
Does Rasa support Claude officially?
Yes. Rasa’s integrations.yml reference has an Anthropic example with the same three lines. Its example uses an older model, claude-sonnet-4-6.
Do I still need an OpenAI key?
No. With the model group set to Anthropic, the agent calls Claude only. Rasa’s setup wizard asks for an OpenAI key, but you can leave it empty.
Can Claude also search my documents?
Not on its own. Mantle searches documents with an embedding model, and Anthropic doesn’t offer one (opens in a new tab), so references need a second provider for embeddings.
Conclusion
Using Claude in Rasa Pro takes a key in .env and three lines in integrations.yml: provider: anthropic, a Claude model ID and ${ANTHROPIC_API_KEY}. Train your agent, and the Inspector shows each call going to Claude.
Additional Resources
- integrations.yml reference (opens in a new tab) (Rasa docs)
- Models overview (opens in a new tab) (Claude docs)
- Pricing (opens in a new tab) (Claude docs)
Related
- Rasa Tutorial — Part 2: Create Your First Mantle Agent, which builds an agent from scratch and switches it to Claude
- Rasa Tutorial for Beginners: Mastering Rasa Pro in Python, with every part of the series
Rasa, Claude and other names mentioned are trademarks of their respective owners. JD Bots isn’t affiliated with or endorsed by Rasa Technologies or Anthropic.
0 comments