trace.init(), every message exchange between agents, every LLM call, and every tool invocation is captured as a structured trace — allowing you to analyze conversation quality, measure per-agent cost and latency, and debug complex multi-agent workflows without changing any of your agent definitions.
Prerequisites
- Python 3.10 or higher
- An active Veritrix account and API key
- CAMEL-AI installed
Installation & Setup
1
Install Veritrix and CAMEL-AI
2
Initialize Veritrix tracing
Call
trace.init() once at application startup, before you instantiate any agents or models.3
Use CAMEL-AI agents as normal
Veritrix instruments the CAMEL-AI agent runtime automatically. Your role assignments, system messages, and conversation loops remain unchanged.
Example: Single ChatAgent
The following example creates a single CAMELChatAgent with a custom role and runs a one-turn conversation. Veritrix records the full LLM call, including the system prompt, user message, and model response.
Example: Role-Playing Multi-Agent Conversation
For CAMEL’s signature role-playing setup — where two agents collaborate toward a shared task — Veritrix traces every turn of the conversation and links each agent’s messages within the same trace.What Gets Captured Automatically
Each agent in a role-playing session is represented as a distinct entity in Veritrix, so you can filter traces by role name and compare the behavior of individual agents across multiple runs.