Get Started

Wire Trodo tracing into your agent in minutes: let a coding agent do it, or install by hand.

There are two ways to add Trodo tracing: let a coding agent wire it for you following best practices for your stack, or install it manually. Both end the same way: one init call plus a wrap around your agent, and your runs show up in the dashboard.

Before you start

Grab your site ID from Settings → Project → General in the Trodo app. It's the only credential the SDK needs (and the Bearer token for the OTLP path). Set it as TRODO_SITE_ID in your environment.

Agentic installation

Trodo ships a skill that teaches your coding agent (Claude Code, Cursor, and others) how to detect your stack, pick the right integration path, and wire tracing the way Trodo recommends. There are two ways to get it.

Point your coding agent at the skill repo and ask it to instrument your agent, all done automatically.

Install the Trodo agent-tracing skill from github.com/trodoai/skills
(npx skills add trodoai/skills), then follow it to add tracing to every agent
in this project. My Trodo site ID is <your-site-id>. Map all agent entry points and
show me the run plan before writing code.

Install the skill via npm:

npx skills add trodoai/skills --all

Then prompt your agent:

Use the trodo-tracing skill to add tracing to every agent in this project.
My site ID is <your-site-id>. Map all agent entry points and show me the
run plan before writing code.

Either way the skill runs a detect → confirm → install flow: it won't write code until it has shown you a plan and you've approved it.

Install manually

Prefer to do it by hand? The full set of methods, for every language and stack, lives in the Instrumentation Guide. The 90% path is three steps.

Install the package:

npm install trodo-node@^2.23.5

Then wrap your agent's entry point with wrapAgent:

import trodo from 'trodo-node';

trodo.init({ siteId: process.env.TRODO_SITE_ID }); // once, at startup

const { result } = await trodo.wrapAgent('my-agent', async (run) => {
  run.setInput({ query });
  const answer = await agent.run(query); // provider calls auto-captured
  run.setOutput(answer);
  return answer;
});

Install the package:

pip install trodo-python

Then wrap your agent's entry point with wrap_agent:

import os, trodo

trodo.init(site_id=os.environ['TRODO_SITE_ID'])  # once, at startup

with trodo.wrap_agent('my-agent') as run:
    run.set_input({'query': query})
    answer = agent.run(query)  # provider calls auto-captured
    run.set_output(answer)

Pick the path that matches your setup from the guide:

When your agent throws

The run is still recorded: the status error, the error type and the full message all land in the dashboard before the exception continues up to your own handling. The rethrown error carries the recorded run's id, so your error tracker and the trace can be joined:

try {
  await trodo.wrapAgent('my-agent', run);
} catch (err) {
  logger.error('agent failed', { trodoRunId: err.trodoRunId });  // → the run in the dashboard
  throw err;
}

In Python the attribute is e.trodo_run_id. It is set best-effort: a frozen or slotted error object simply goes without it; the run is recorded either way.

See your first trace

Run your agent once, then open the Agent Runs dashboard. The row shows tokens in and out, cost, span count, tool count, and error count, plus the full trace tree of every LLM and tool call.

Next

On this page