trace module, call trace.init() with your project name before any agent code runs, and the SDK automatically instruments every LLM call, tool execution, and agent handoff from that point forward.
Quickstart
Call
trace.init() once, as early as possible in your application — before
any agent logic, LLM calls, or framework setup. Calling it more than once in
the same process is a no-op after the first call.Step-by-step setup
1
Import the trace module
Add the import at the top of your entry-point file.
2
Call trace.init()
Pass your project name as the first argument. The name must match the project you created in the Veritrix dashboard.
3
Run your agent
Start your agent as normal. No further changes are needed — Veritrix captures all activity automatically.
Parameter reference
The project or agent name as it appears in your Veritrix dashboard. Use a
short, descriptive slug (e.g.
"checkout-agent", "support-bot"). Names
are case-sensitive.Your Veritrix API key. If omitted, the SDK reads the
VERITRIX_API_KEY
environment variable. Passing the key directly is convenient during local
development, but use the environment variable in production so credentials
never appear in source code.A custom OpenTelemetry (OTel) exporter endpoint. Defaults to the Veritrix
cloud ingest endpoint. Set this only if you are self-hosting an OTel
collector or running Veritrix in an enterprise on-premises deployment.
When
True, the SDK logs every span payload to stdout as it is emitted.
Useful for local troubleshooting. Do not enable in production — it
produces high-volume output and may expose sensitive prompt content.Use environment variables (recommended)
Storing your API key in an environment variable keeps credentials out of your codebase and makes rotating keys easy.trace.init() without an explicit api_key argument: