Skip to main content
The tracing API has four entry points: @trace, start_trace, log_llm_call, and log_tool_call. Plus @tool to register a function as a tracked tool. Use the framework-specific auto-instrumentation instead when possible — these are the manual escape hatches.

@decimalai.trace()

Decorator to trace a function as a complete agent run.
agent_name
str
required
Name of the agent (appears in dashboard sidebar).

decimalai.start_trace()

Context manager for manual trace boundaries.

decimalai.log_llm_call()

Log an individual LLM call inside a trace.
model
str
required
Model identifier (e.g., "gpt-4o", "claude-sonnet-4-6").
input
list | dict | str
Input messages or prompt.
output
dict | str
LLM response.
input_tokens
int
Prompt token count.
output_tokens
int
Completion token count.
latency_ms
int
Call latency in milliseconds.

decimalai.log_tool_call()

Log a tool invocation inside a trace.

@decimalai.tool

Decorator that registers a function as a tracked tool.

What’s next

Manifests

Track which version of your agent produced each trace.

Frameworks

Skip the manual calls — auto-instrument LangChain, OpenAI Agents, and more.