Integrations
CrewAI is a Python framework for teams of AI agents that share tasks. Connect it to DEVUP AI with CrewAI's built-in OpenAI client: set base_url to the DEVUP AI API and every agent in your crew runs on DEVUP AI models.
pip install crewaiCrewAI does not install on Python 3.14 yet. Create a Python 3.13 environment instead, for example with uv:
uv venv --python 3.13 .venvexport DEVUP_API_KEY="your-key"| Variable | Required | Purpose |
|---|---|---|
| DEVUP_API_KEY | Yes | Your DEVUP AI API key, read by the examples below. |
| CREWAI_DISABLE_TELEMETRY | No | Set to true to turn off CrewAI's anonymous telemetry. |
import os
from crewai import LLM
llm = LLM(
model="deepseek-ai/DeepSeek-V4-Pro",
base_url="https://api.devupai.com/v1",
api_key=os.environ["DEVUP_API_KEY"],
custom_openai=True,
)
print(llm.call("Reply with exactly: Salam DEVUP"))Output: Salam DEVUP
| Parameter | Value | Why |
|---|---|---|
| model | deepseek-ai/DeepSeek-V4-Pro | The exact DEVUP AI catalog ID. |
| base_url | https://api.devupai.com/v1 | Sends requests to DEVUP AI. |
| api_key | os.environ["DEVUP_API_KEY"] | Keeps the key out of your code. |
| custom_openai | True | Uses CrewAI's built-in OpenAI client for this endpoint; no LiteLLM install is needed. |
The researcher answers first; context passes its result to the writer, and Process.sequential runs the tasks in order.
from crewai import Agent, Crew, Process, Task
researcher = Agent(
role="Researcher",
goal="Find short, accurate facts",
backstory="You answer with facts only.",
llm=llm,
)
writer = Agent(
role="Writer",
goal="Turn facts into one clear sentence",
backstory="You write short, plain English.",
llm=llm,
)
research = Task(
description="What is the capital of Algeria?",
expected_output="The city name only.",
agent=researcher,
)
write = Task(
description="Write one sentence that introduces the city from the research.",
expected_output="One sentence.",
agent=writer,
context=[research],
)
crew = Crew(agents=[researcher, writer], tasks=[research, write], process=Process.sequential)
result = crew.kickoff()
print(result.raw) Example output: Algiers is the capital city of Algeria, located on the Mediterranean coast.
Decorate a function with @tool and pass it in the agent's tools. The tracking number only exists inside the tool, so seeing it in the answer shows the tool was called.
from crewai.tools import tool
@tool("get_order_status")
def get_order_status(order_id: str) -> str:
"""Look up the delivery status of an order by its ID."""
return f"Order {order_id} has shipped. Tracking number: DZ-4471."
support = Agent(
role="Support agent",
goal="Answer order questions using the order system",
backstory="You always check the order system before answering.",
tools=[get_order_status],
llm=llm,
)
lookup = Task(
description="What is the status of order A-100?",
expected_output="One sentence with the order status.",
agent=support,
)
print(Crew(agents=[support], tasks=[lookup]).kickoff().raw)Output: Order A-100 has shipped. Tracking number: DZ-4471.
Set output_pydantic on a task and read result.pydantic.
from pydantic import BaseModel
class Capital(BaseModel):
city: str
country: str
capital_task = Task(
description="What is the capital of Algeria?",
expected_output="The capital city and its country.",
agent=researcher,
output_pydantic=Capital,
)
print(Crew(agents=[researcher], tasks=[capital_task]).kickoff().pydantic)Output: city='Algiers' country='Algeria'
output_pydantic sends a JSON-schema response format. Prefer descriptive field names such as city over name. See Structured Outputs.
Use the exact catalog ID as model. Tool calling needs a model whose catalog entry supports it. See Models and Tool Calling.
Yes. Create an LLM with base_url set to https://api.devupai.com/v1, your DEVUP AI key, and custom_openai=True, then pass it to your agents.
No. With custom_openai=True, CrewAI uses its built-in OpenAI client for the DEVUP AI endpoint.
Every request your crew makes is a regular DEVUP AI API call, metered in Algerian Dinar on your account.
Python 3.10 to 3.13. On Python 3.14, create a 3.13 environment, for example with uv venv --python 3.13.
Yes. Tools decorated with @tool and tasks with output_pydantic both work with DEVUP AI models that support tool calling and structured output.
Set the environment variable CREWAI_DISABLE_TELEMETRY to true before running your crew.