Set TCC environment variables
.env
Install the SDK
Step 1: Install dependencies
Step 2: Create an agent run
An agent run represents a single execution of your agent, from the moment it receives a user input to the final response. Create a run before your agent loop begins, and end it after your agent loop completes. Initialize a run withtcc.run(). A run requires a prompt before calling .end(). The response is optional. Calling .end() will export the finalized run with all its parameters.
main.py
Run methods
The following methods are available on a run. See Run Usage for more details.Step 3: Add steps to your run
Steps represent individual LLM calls within an agent run. Use them to track the reasoning flow of your agent. A step requires both a prompt and a response before calling.end().
main.py
Step methods
The following methods are available on a step. See Step Usage for more details.Maximize observability
Once instrumented, you can enrich your data with additional context:- Optional run data: response and error handling
- Optional step data: model, token usage, cost, finish reason, tool definitions, and error handling
- Custom metadata: tie agent runs to your business logic (user, organization, feature, etc.)
- User feedback: collect thumbs up/down scores and text feedback from end users
- Agent sessions: group related runs into sessions to track full conversations
- Debug mode: log payloads as they are created and sent
