CrewAI
CrewAI is an open-source framework designed to orchestrate AI agents. CrewAI empowers agents to work together seamlessly, tackling complex tasks and multi-agent workflows. With built-in support for LiteLLM, CrewAI allows you to connect with many different Language Models (LLMs), including Arcee models via OpenAI-compatible endpoints.
This tutorial will walk you through setting up Arcee AI as your LLM provider inside a CrewAI agent pipeline.
Prerequisites
Python:
>=3.10 and <3.14Arcee AI model running locally or accessible via API and an OpenAI-compatible endpoint
Quickstart
Environment and project setup:
# Create project folder
mkdir arceeai_crewai && cd arceeai_crewai
# Install uv (if not already installed)
curl -LsSf https://astral.sh/uv/install.sh | sh
source $HOME/.local/bin/env
# Create and activate virtual environment
uv venv --python 3.12 --seed
source .venv/bin/activate
# Install CrewAI
uv pip install crewai
If you run into any errors installing CrewAI, follow their Installation Guide.
Create a new python file called arceeai_crewai.py with the following:
import os
from crewai import LLM, Agent, Task, Crew
# Configure Arcee AI Model
ARCEE_BASE = os.getenv("OPENAI_API_BASE", "http://127.0.0.1:8080/v1")
ARCEE_KEY = os.getenv("OPENAI_API_KEY", "your-arcee-api-key")
ARCEE_MODEL = os.getenv("OPENAI_MODEL_NAME", "trinity-mini")
# Initialize Arcee AI model with OpenAI-compatible configuration
arcee_llm = LLM(
model=f"openai/{ARCEE_MODEL}",
api_base=ARCEE_BASE,
api_key=ARCEE_KEY
)
# Define a simple agent that uses the Arcee AI model
summarizer = Agent(
role="Summarizer",
goal="Summarize text into three crisp bullet points.",
backstory="A concise technical writer who removes fluff.",
llm=arcee_llm,
verbose=True,
)
# Define the task the agent will perform
text = """Arcee AI is a foundation model provider with a focus on building the highest performing models per parameter.
They offer a range of models from on-device and edge optimized models to large language models. Their suite of models
provides customers with the flexibility to choose the right model for the right task. All models are released Apache 2.0
enabling the community to use safe, built-in-the-US models in their own environment or via the Arcee AI API platform."""
task = Task(
description=f"Summarize the following in three bullets:\n\n{text}",
expected_output="Exactly three bullet points, each under 20 words.",
agent=summarizer,
)
# Orchestrate & run
crew = Crew(agents=[summarizer], tasks=[task], verbose=True)
result = crew.kickoff()
# Print the results
print("\n=== RESULT ===\n")
print(result)This works out-of-the-box if you have an Arcee AI model running locally on your laptop. If you do not, change ARCEE_BASE , ARCEE_KEY , and ARCEE_MODEL .
You can also setup a .env file to store the configurations.
Run your Arcee AI powered CrewAI Agent
python arceeai_crewai.pyLast updated


