inference.eu

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.

  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: common questions

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

Ask a question

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