Skip to content

Tracing & traceability

AbstractAI gives you three levels of traceability.

Every assistant answer carries a trace: one step per model call (LLM), tool call (TOOL) and safety check (SAFE), in the order they ran. The Playground draws it as a waterfall:

Trace · 5 steps · 2.31 s · 3,412 tokens · 1 failed
1 SAFE input check █ 4 ms
2 LLM → github ██████ 690 ms
3 TOOL github ████ 410 ms
4 LLM final answer ██████████ 1.1 s
5 SAFE output check █ 3 ms
  • Colours: model steps indigo, tools green, safety amber, failures red. Each bar shows when in the run the step happened.
  • Click a step for details: the model and its tokens in/out; a tool’s arguments and result (JSON pretty-printed) or error; whether a person approved or denied it; what a safety check found.
  • The same data is in the /chat response as trace, so your own client can show it.

Each deployment’s Observability panel shows recent traces as a waterfall of spans: the request, model calls with tokens and cost, and tool calls. Assistants record these automatically. Code agents record them with the SDK (below).

3. Across agents and clouds: distributed traces

Section titled “3. Across agents and clouds: distributed traces”

When agents call each other through agent-to-agent calls, every hop becomes a span with the caller and callee, the callee’s cloud and region, the method, path, status and round-trip time — all under one trace id.

  • Open a trace from the Observability panel and click Follow this trace across agents and clouds, or use Last trace under Agent-to-agent connections. The /traces/<trace id> page shows a service map (agents, clouds and the calls between them) and one waterfall on a shared timeline, grouped by agent.
  • Every relayed response carries x-agent-platform-trace-id.
  • Privacy: each company sees its own agents’ spans and the hops into and out of them — never the internals of another company’s agent.

Trace context uses the W3C traceparent header, the same format as AWS X-Ray, Datadog and OpenTelemetry.

Add the zero-dependency observability SDK. It only writes JSON lines to stdout; the platform picks them up from your logs.

import { withRequestTracing, trace, recordLlmCall, recordToolCall } from '@srikanth-cmd/agent-platform-observability'
http.createServer(withRequestTracing(handler)) // each request: route, status, latency, its own trace
await trace('answer', async () => { // a span; nested calls attach to it
recordToolCall({ name: 'search_docs', latencyMs })
recordLlmCall({ provider: 'openai', model: 'gpt-4o-mini', tokensIn, tokensOut, latencyMs })
})

withRequestTracing also continues an incoming traceparent, so your spans join the caller’s distributed trace.

Trace data is kept for 14 days.