Skip to main content

Set TCC environment variables

Our SDKs default to using the TCC_API_KEY environment variable.
.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 with 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.ts
That’s it! Your agent run will now be tracked and viewable in the dashboard.

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.ts

Step methods

The following methods are available on a step. See Step usage for more details.

Step 4: Add tool calls to your run

Tool calls represent individual tool executions within an agent run. A tool call requires a name before calling .end().
main.ts

Tool call methods

Debug mode

You can enable debug mode by setting the TCC_DEBUG environment variable, which will log payloads as they are created and sent.
Or configure programmatically: