CrewAI Integration
SDKTraccia automatically instruments CrewAI crews, tasks, agents, and LLM calls.
Traccia automatically detects and instruments crewai when it is installed in your environment. Once init() is called, crew executions, tasks, agents, and underlying LLM calls are traced with no extra wiring.
Zero-config CrewAI tracing
init(), and run your crew as usual.1Install Traccia and CrewAI
Install both packages into your application environment:
pip install traccia crewai2Initialize Traccia
Initialize Traccia at the start of your application. CrewAI tracing is auto-enabled when crewai is installed:
from traccia import init
# Initialize Traccia (auto-loads from traccia.toml if present)init()3Run a CrewAI workflow
Define your agents and tasks as usual. Traccia will create spans for the crew kickoff, each task, each agent execution, and the underlying LLM calls:
from traccia import initfrom crewai import Agent, Task, Crew, Process
init()
researcher = Agent( role="Research Analyst", goal="Find comprehensive and accurate information on a topic", llm="gpt-4o-mini",)
task = Task( description="Research Shawn Michaels and summarize his career.", expected_output="A concise research summary", agent=researcher,)
crew = Crew( agents=[researcher], tasks=[task], process=Process.sequential, verbose=True,)
result = crew.kickoff()print(result)Configuration
CrewAI integration is enabled by default when crewai is installed. To disable it:
Option 1: Explicit parameter
init(crewai=False)Option 2: Environment variable
export TRACCIA_CREWAI=falsepython main.pyOption 3: Config file (traccia.toml)
[instrumentation]crewai = falseTrace hierarchy
A typical CrewAI workflow traced by Traccia looks like this:
your_app_span
└─ crewai.crew.kickoff
├─ crewai.task.Research the following topic...
│ └─ crewai.agent.Research Analyst
│ └─ llm.openai.chat.completions
└─ crewai.task.Based on the research provided...
└─ crewai.agent.Content Writer
└─ llm.openai.chat.completionsNext Steps
© 2026 Traccia.