Installation
Setup
We recommend using UUIDs for session_id and user_id so traces can be grouped reliably across runs.
Usage
What gets traced
Multi-agent support
In multi-agent crews, PandaProbe tracks context propagation between agents. Each agent’s output is made available as context for subsequent agents, and this is reflected in the trace hierarchy.
Token usage
CrewAI token usage is computed using delta tracking: the adapter snapshots the agent’s cumulative _token_usage before and after each LLM call to determine per-call token counts.
Example with multiple agents
This example sets up a three-agent crew (researcher → analyst → writer). It traces the agents via CrewAIAdapter and wraps the run in a pandaprobe.session for trace grouping:
Each agent run is captured as an AGENT span nested under the root CHAIN, with LLM calls and any tool use recorded beneath the corresponding agent.