CrewAI with DEVUP AI
Run CrewAI crews on DEVUP AI models. Point CrewAI's LLM class at the DEVUP AI OpenAI-compatible API and every agent in the crew uses it.
System Architecture
How CrewAI Connects to DEVUP AI
Configuration
Connect the LLM
pip install crewaiimport 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"))Multi-Agent
A Two-Agent Crew
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) Tools
Custom Tools with @tool
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)Capabilities
Supported Capabilities
Multi-agent crews
Give each agent a role and a goal, pass one task's result to the next with context, and run the crew in sequence.
Custom tools
Decorate a Python function with @tool and hand it to an agent; the agent calls it when it needs the data.
Pydantic output
Set output_pydantic on a task and read the validated model from the result.
Local DZD billing
Metered billing in Algerian Dinar with BaridiMob, Edahabia, and CIB local payment support.
FAQ
CrewAI and DEVUP AI
Does CrewAI work with DEVUP AI?
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.
Do I need LiteLLM to use CrewAI with DEVUP AI?
No. With custom_openai=True, CrewAI uses its built-in OpenAI client for the DEVUP AI endpoint.
How is CrewAI usage billed on DEVUP AI?
Every request your crew makes is a regular DEVUP AI API call, metered in Algerian Dinar on your account.