---
title: "CrewAI with EU-hosted models · LLM setup guide"
description: "Run CrewAI agents and crews on open-weight models processed in EU data centres by giving the LLM class the inference.eu base URL and key."
canonical: "https://inference.eu/integrations/crewai/"
language: "en"
---

Frameworks · CrewAI

# Use CrewAI with open-source models hosted in the EU

CrewAI is a Python framework for orchestrating teams of AI agents that share tasks and tools. Its \`LLM\` class accepts a custom OpenAI-compatible base URL, so every agent in a crew can run on open-weight models at inference.eu, processed in European data centres.

[Contact sales](https://inference.eu/contact/)[Setup](#setup)

1.  01API format: OpenAI
2.  02EU data centres
3.  03Covered by one DPA

## Set it up in a few minutes

1.  1

    Create an API key in your inference.eu account and store it as `INFERENCE_EU_API_KEY`.

2.  2

    Install CrewAI with `pip install crewai`.

3.  3

    Create an `LLM` with `model` set to `openai/` followed by the inference.eu model id, `base_url` set to the inference.eu base URL and `api_key` from the environment.

4.  4

    Pass the `LLM` to each `Agent` with `llm=...`, and to the crew's manager if you use a hierarchical process.

5.  5

    Run `kickoff()` on a small task to confirm that every agent answers through inference.eu.

python

```
import os
from crewai import LLM, Agent, Crew, Task

llm = LLM(
    model="openai/kimi-k3",
    base_url="https://api.inference.eu/v1",
    api_key=os.environ["INFERENCE_EU_API_KEY"],
)

analyst = Agent(
    role="Contract analyst",
    goal="Find data protection obligations in supplier contracts",
    backstory="You review contracts for an EU procurement team.",
    llm=llm,
)

task = Task(
    description="List the processor obligations in this clause: {clause}",
    expected_output="A short bullet list",
    agent=analyst,
)

print(Crew(agents=[analyst], tasks=[task]).kickoff(inputs={"clause": "..."}))
```

## What CrewAI is

CrewAI is an open-source Python framework for multi-agent systems. You define agents with a role, goal and backstory, give them tools, and assign them tasks inside a crew that runs sequentially or under a manager agent. Flows add event-driven control around crews for production workflows.

Every agent talks to a language model through CrewAI's `LLM` class. Its OpenAI integration accepts a `base_url`, and when the model name is not one of OpenAI's own, CrewAI routes the request to that custom endpoint. That is how you run a whole crew on inference.eu.

## How the configuration works

Create `LLM(model="openai/<model id>", base_url=..., api_key=...)`. The `openai/` prefix selects CrewAI's OpenAI-compatible client and is removed before the request, so inference.eu receives the plain model id. `base_url` is the inference.eu base URL ending in `/v1`.

Pass the object to each agent with `llm=`. Agents without an explicit `llm` fall back to CrewAI's default model, so set it everywhere, including `manager_llm` for hierarchical crews and `function_calling_llm` if you use one. For YAML-based projects, define the model and base URL in code or through the `MODEL` and `OPENAI_BASE_URL` environment variables.

## Which models to choose

Crews spend most of their time planning, delegating and calling tools, so models with dependable tool calling and good instruction following work best. `kimi-k3` and `glm-5.3` are strong defaults for agents and managers that coordinate several steps.

For research or writing agents that summarise large inputs, `glm-5.3` handles long context well. Coding agents benefit from `qwen3-coder-480b-a35b-instruct`. For simple worker agents that classify, extract or reformat, `gpt-oss-120b` keeps each step quick. You can give each agent its own `LLM`, so mixing models within one crew is straightforward.

## Troubleshooting

A 401 error means the key is wrong, or an agent without an explicit `llm` fell back to the default model and used `OPENAI_API_KEY`. Set `llm=` on every agent. A 404 usually means `base_url` has an extra path or the model id is wrong.

If CrewAI reports an unknown provider, check the model string starts with `openai/`. If an agent loops on a tool or returns its reasoning instead of a final answer, choose a model with stronger tool calling or lower `max_iter`. Memory and knowledge features use an embedder that defaults to OpenAI; configure an embedder explicitly before enabling them.

## Keeping data in the EU

With every agent's `LLM` pointed at inference.eu, the task descriptions, context and tool results your crew sends to the model are processed in EU data centres and never used for training. We sign a data processing agreement under Article 28 GDPR, publish our subprocessor list and bill in euros.

CrewAI collects anonymous usage telemetry by default, without prompts or task content; set `CREWAI_DISABLE_TELEMETRY=true` to turn it off, and leave `share_crew` disabled. Memory, knowledge sources and tools have their own providers, so choose EU-hosted options for them to keep the whole crew in Europe.

## CrewAI

Category

Frameworks

Maker

CrewAI

API format

OpenAI

Processing

EU data centres

Website

[www.crewai.com](https://www.crewai.com/)

Documentation

[docs.crewai.com](https://docs.crewai.com/en/concepts/llms)

## CrewAI: common questions

The questions buyers, developers and legal teams ask us most. Something missing? Ask us directly.

Create \`LLM(model="openai/<model id>", base\_url=..., api\_key=...)\` and pass it to your agents with \`llm=\`. CrewAI sends requests for model ids it does not recognise as OpenAI's own to the \`base\_url\` you set.

The prefix tells CrewAI to use its OpenAI-compatible client. It is removed before the request is sent, so inference.eu receives the plain model id, for example \`kimi-k3\`. Without the prefix, CrewAI may try to infer a different provider.

Kimi K3 and GLM-5.3 are strong defaults for agents and managers that plan and call tools. Qwen3 Coder 480B suits coding agents, and gpt-oss-120b handles simple worker agents that classify or reformat content quickly.

Agents without an explicit \`llm\` use CrewAI's default model. Set \`llm=\` on every agent, plus \`manager\_llm\` for hierarchical crews and \`function\_calling\_llm\` where used. Removing \`OPENAI\_API\_KEY\` from the environment makes missed agents fail visibly.

Memory and knowledge need an embedder, which defaults to OpenAI embeddings. Configure an embedder whose hosting meets your requirements before enabling them. The chat model for each agent can stay on inference.eu either way.

Yes. Set \`MODEL=openai/<model id>\`, \`OPENAI\_BASE\_URL\` to the inference.eu base URL and \`OPENAI\_API\_KEY\` to your inference.eu key. This suits YAML-based CrewAI projects, though explicit \`LLM\` objects make the provider clearer in code.

By default CrewAI collects anonymous usage telemetry without prompts, task descriptions or outputs. Detailed data is only shared if you enable \`share\_crew\`. Set \`CREWAI\_DISABLE\_TELEMETRY=true\` to turn telemetry off completely for your crews.

The model is not following CrewAI's tool and final-answer format reliably. Choose a model with stronger tool calling, such as Kimi K3 or GLM-5.3, simplify tool descriptions, and set \`max\_iter\` on the agent to cap the number of steps.

Yes. Create one \`LLM\` per model, all with the same \`base\_url\` and key, and pass the right one to each agent. A common pattern is a strong model for the manager and planner, and a fast model for simple workers.

Yes. Set \`stream=True\` on the \`LLM\` to receive tokens as they are generated. inference.eu streams in the standard Chat Completions format, including token usage, which CrewAI uses for its usage tracking.

[Ask a question](https://inference.eu/contact/)

## Related

[All integrations](https://inference.eu/integrations/)

-   [LangChainConnect LangChain's ChatOpenAI to inference.eu with base\_url and run chains, agents and LangGraph workflows on open-weight models processed in the EU.Frameworks](https://inference.eu/integrations/langchain/)
-   [Pydantic AIConnect Pydantic AI agents to inference.eu with OpenAICompatibleProvider and get typed, validated output from open-weight models processed in the EU.Frameworks](https://inference.eu/integrations/pydantic-ai/)
-   [LiteLLMAdd inference.eu to the LiteLLM proxy or Python SDK with the openai/ prefix and route your team's requests to open-weight models processed in the EU.Gateways](https://inference.eu/integrations/litellm/)

## Move your AI workloads to EU infrastructure

Tell us which models you use and roughly how much traffic you have. We reply within one working day with pricing and next steps.

-   Reply within one working day
-   Pricing for your volume
-   DPA ready to sign
