CrewAI Integration
Updated on Aug 14, 2026
Use this integration when your CrewAI application is implemented in Python.
Setup
- Install SDK
bash
pip install progress-observability
- Instrument your app
python
Observability.instrument(
app_name=os.getenv("OBSERVABILITY_APP_NAME"),
api_key=os.getenv("OBSERVABILITY_API_KEY")
)
- Complete example
python
import os
from dotenv import load_dotenv
# Disable CrewAI's own telemetry so traces go through Progress Observability instead.
os.environ.setdefault("CREWAI_DISABLE_TELEMETRY", "true")
load_dotenv()
# LLM INSTRUMENTATION
from progress.observability import Observability
Observability.instrument(
app_name=os.getenv("OBSERVABILITY_APP_NAME"),
api_key=os.getenv("OBSERVABILITY_API_KEY"),
)
from crewai import Agent, Crew, LLM, Process, Task # noqa: E402
from crewai.tools import tool # noqa: E402
model = os.getenv("OPENAI_MODEL", "gpt-4o-mini")
llm = LLM(model=f"openai/{model}", api_key=os.getenv("OPENAI_API_KEY"))
@tool("get_weather")
def get_weather(location: str) -> str:
"""Get the weather for a given location."""
return f"The weather in {location} is cloudy with a high of 15°C."
question = os.getenv("QUESTION", "What's the weather in Paris?")
weather_agent = Agent(
role="Weather Assistant",
goal="Answer weather-related questions accurately and concisely.",
backstory="You are a helpful AI assistant.",
llm=llm,
tools=[get_weather],
verbose=False,
allow_delegation=False,
)
task = Task(
description=(
f"Answer the following user request: '{question}'. "
"Use available tools when necessary. "
"Return exactly one concise weather sentence."
),
expected_output="A single concise weather sentence.",
agent=weather_agent,
)
crew = Crew(agents=[weather_agent], tasks=[task], process=Process.sequential, verbose=False)
result = crew.kickoff()
Observability.shutdown()