trace.init(), Veritrix automatically traces every agent action, task execution, tool invocation, and inter-agent delegation across your Crew or Flow — so you can identify bottlenecks, debug unexpected behavior, and measure the cost and latency of each step in production.
Prerequisites
- Python 3.10 or higher
- An active Veritrix account and API key
- CrewAI installed
Installation & Setup
1
Install Veritrix and CrewAI
2
Initialize Veritrix tracing
Call
trace.init() at the top of your entry point, before you define any agents, tasks, or crews.3
Define your Crew as normal
No changes are required to your agent or task definitions. Veritrix instruments CrewAI automatically.
Example: Research Crew
The following example defines a two-agent research crew. Veritrix traces the full execution — including which agent handled each task, what tools were called, and how long each step took.Example: CrewAI Flow
For Flow-based orchestration, Veritrix traces each flow method invocation and the state transitions between them.What Gets Captured Automatically
Each agent in your crew gets its own set of spans, so you can compare performance across agents and identify which one is contributing most to latency or cost.