See what your agent did, and why.
nomi records each run of your AI agent: its model calls, tool calls, retries and decisions. Your coding agent reads that record beside your code and tells you why a run went the way it did.
support_turn · reply
Succeeded 1 failed step Result refund_approved declared Conversation conv-426f64-21 Commit b938222 Took 1.46 s Tokens 1,862 in / 112 out Cost ≈ $0.0048
POST /orders/A-2021/refunds: 2 attempts. Attempt 1: effect unknown; attempt 2: completed, committed backoffice:rf_c9b1e7295e27. declared
- support_turn OK 1.45 s
- support_agent OK 1.45 s
- Decision refund_approved: order A-2021, $112.00 Note, not a step
- backoffice × 3 tool calls 1 Failed · 2 OK 3 calls
- check_reply OK 1.27 ms
Step
support_turn
OK · 1.46 s
- Request
- not recorded
- Result
- not recorded
- Effect
- not recorded
- Code
- support_desk/agent.py:102 in reply() at b938222 observed
Model call · in model
ChatAnthropic
OK · 95.5 ms
- Model
- claude-sonnet-5-5, asked for and returned observed
- Tokens
- 471 in · 28 out observed
- Output cap
- 1,024 tokens asked for observed
- Code
- not recorded
Tool call · in tools
lookup_order
OK · 29.1 ms
- Request
- {"order_id":"A-2021"} observed
- Result
- {"order_id": "A-2021", "customer_id": "CUS-1021", … "items": [{"name": "coffee grinder", … observed
- Effect
- not recorded
- Code
- support_desk/tools.py:71 in lookup_order() at b938222 observed
Model call · in model
ChatAnthropic
OK · 5.23 ms
- Model
- claude-sonnet-5-5, asked for and returned observed
- Tokens
- 638 in · 38 out observed
- Output cap
- 1,024 tokens asked for observed
- Code
- not recorded
Tool call · in tools
issue_refund
OK · 1.29 s
- Request
- {"order_id":"A-2021","amount":112.0,"reason":"damaged"} observed
- Result
- {"refund_id": "rf_c9b1e7295e27", "status": "succeeded", "amount": 112.0, "order_total": 112.0, "refunded_total": 224.0} observed
- Effect
- not recorded
- Code
- support_desk/tools.py:77 in issue_refund() at b938222 observed
Tool call · in issue_refund
backoffice
OK · 25.2 ms
- Request
- GET /orders/A-2021 observed
- Result
- {"status":200} observed
- Effect
- Not recorded by the app. declared
- Code
- support_desk/backoffice.py:28 in _request() at b938222 observed
Tool call · in issue_refund
backoffice
Failed after 1.00 s
- Request
- POST /orders/A-2021/refunds observed
- Error
- httpx.ReadTimeout: timed out observed
- Effect
- Effect unknown. Attempt 1 of 2 of this action. Attempt 2: completed, committed. declared
- Code
- support_desk/backoffice.py:28 in _request() at b938222 observed
Tool call · in issue_refund
backoffice
OK · 54.4 ms
- Request
- POST /orders/A-2021/refunds observed
- Result
- {"status":201} observed
- Effect
- Committed backoffice:rf_c9b1e7295e27. Attempt 2 of 2 of this action. Attempt 1: effect unknown. declared
- Code
- support_desk/backoffice.py:28 in _request() at b938222 observed
Model call · in model
ChatAnthropic
OK · 5.37 ms
- Model
- claude-sonnet-5-5, asked for and returned observed
- Tokens
- 753 in · 46 out observed
- Output cap
- 1,024 tokens asked for observed
- Code
- not recorded
One recorded run from a support-desk test app built on LangChain, which runs against local stand-ins for the model and the back office. The timeline shows where the run’s time went: a full second of its 1.46 s was a refund call that timed out. It was retried, and the back office’s total shows it was paid twice.
Why nomi
When an agent gets something wrong, the hard part is finding out what it actually did.
- An exact record
- Each model call, tool call, retry and side effect, tied to the commit that ran. What it couldn’t see is marked unknown, never guessed or shown as zero.
- On your machines
- One self-hosted program, quick to set up. Your runs stay in a folder on a machine you run: your computer, or a server of yours that your agents send to. nomi never changes how your agent runs.
- Built for your coding agent
- Your coding agent reads the same record next to your code, tells you why a run went the way it did, and compares your agent’s behaviour from one commit to the next.
Ask your coding agent why
It reads the runs and opens your code at the commit that ran. It answers against real code, keeps what was observed apart from what your code declared and what wasn’t recorded, and says so when nothing is wrong.
Three answers from Claude Code, about a support-desk test app built on LangChain with a defect planted in it; the third came after fixing what the first found. Shortened; every sentence is the answer’s own.
YouHow's the support agent doing?
Not well: it paid 3 refunds twice.
I checked all 60 stored runs, which cover 30 conversations, all on commit b938222. Your checkout is at the same commit, with no uncommitted changes, so the code I read is the code that ran.
Defect: a timed-out refund gets retried and paid again
This happened on 3 of the 16 approved refunds.
| Run | Order | Refund asked for | refunded_total afterwards |
|---|---|---|---|
07c9f2b8… | A-2021 | $112.00 | $224.00 |
aa743060… | A-2013 | $38.50 | $77.00 |
835c766a… | A-2005 | $64.00 | $128.00 |
- The first
POST /orders/…/refundshit the 1.0s timeout (httpx.ReadTimeout). The client marked the effect unknown. - The client retried and got a 201 with a new refund ID.
- The backoffice’s own figure after the refund,
refunded_total, is twice the order total. So the first POST went through on the server side too; only the response was lost.
Why, in backoffice.py:41-45: _request retries every method after a timeout, writes included. refund() (backoffice.py:58) sends nothing the backoffice could use to spot a repeat.
41 except httpx.TimeoutException:42 if attempt == self.attempts:43 raise BackofficeError(f"{method} {path} timed out after {attempt} attempts")44 time.sleep(self.backoff * attempt)45 continue …58 def refund(self, order_id, amount, reason):59 return self._request("POST", f"/orders/{order_id}/refunds", json={"amount": amount, "reason": reason})
Not problems
- The other 4 runs with errors: lookup GETs that timed out once and then worked on the retry. Retrying a read is safe, so this is expected.
- 2 runs flagged
draft_claimed_unissued_refund: the reply checker caught a draft that claimed a refund before it was issued. It counts as an issue the agent recovered from, not a failure.
The fix is one change: stop retrying a refund POST after a timeout, or send an idempotency key that the backoffice honours.
YouWhy did the conversation about order A-2007 fail? The customer never got their refund.
The A-2007 conversation didn’t fail.
The agent refused the refund on purpose, and the refusal matches the refund policy. The order was delivered 50 days ago and the return window is 30 days, so no refund was issued. The agent then passed the case to staff.
It’s group conv-426f64-07: two turns, both at commit b938222 with no uncommitted changes. That’s the same commit your checkout is on, so the code I read is the code that ran.
Turn 1 (trace f0c784bb…)
- The tool returned
{"status": "declined", "reason": "outside_return_window"}(recorded). - The only back-office call in that step was a
GET /orders/A-2007, with no refund write, so the customer’s card wasn’t charged back (recorded). The app also loggedrefund_outside_return_window: order A-2007, $74.50(stated by the app). - The reply said so plainly: “Order A-2007 was delivered 50 days ago, which is outside our 30-day return window…”
Turn 2 (trace 83b3a525…), after the customer wrote “Can someone take another look?”
- The agent called
open_ticketand asked for an exception for the 50-day order. The back office created ticket T-5001 (POST /tickets→ 201, effect recorded as committed). - It told the customer: “I’ve passed this to our team for review. They’ll reply by email within 2 business days.”
Why this is intended
refund_decisioninsupport_desk/policy.pyreturnsoutside_return_windowwhen more thanRETURN_WINDOW_DAYS = 30days have passed since delivery.
If 50-day returns like this should be refunded automatically, that’s a change to the policy, not a fix to the agent.
YouDid the refund fix work?
Yes, the refund fix worked on c60b0b6.
It ran 60 times, 3 of those runs hit a refund timeout, and in all 3 the customer was refunded once and given an accurate reply.
| Commit | Approved refunds | After a timeout | Runs with issues |
|---|---|---|---|
b938222 (before) | 16 | (no separate result) | 3.3% |
2c1ff0a (no retry) | 13 | 3 × draft_claimed_unissued_refund | 8.3% |
c60b0b6 (confirm) | 13 | 3 × refund_confirmed_after_timeout | 3.3% |
These are the per-commit counts nomi reports, 60 runs each.
2c1ff0a alone wasn’t enough
It stopped the retry, so the risk of paying twice went away. But in all 3 timeout runs the agent then wrote a reply claiming a refund that, as far as it knew, hadn’t been issued.
c60b0b6 handles the timeout properly
I read one of the 3 runs (bd71c637, order A-2013, $38.50):
- The refund request timed out after 1.0s and was not retried.
- The agent looked the order up once. The backoffice showed
refunded_total: 38.5, which is exactly the $38.50 asked for, so the money went out once. - The customer was told the refund was issued, which was true.
The other two timeout runs show the same pattern (1 error, same decisions, ~1.13s), but I didn’t open them step by step. No runs failed and no events were lost on any commit.
Not related to the fix: two runs on c60b0b6 still record draft_claimed_unissued_refund, in conversations 14 and 20. Their issue rate matches the pre-fix baseline and they have no timeouts. The reply check catches them as designed.
Still unverified: the other path, where a timed-out refund doesn’t show on the order (refund_unconfirmed_after_timeout, which opens a ticket for staff), never ran. The same goes for the new check that blocks an email claiming an unissued refund. Both are only covered by tests so far.
Nothing needs doing now; next time, look for a refund_unconfirmed_after_timeout run to confirm the hand-to-staff path.
Question
- Observed as it happened
- Declared by the app’s code
- Not recorded
- App
- support desk, LangChain
- Runs read
- 60
- Commit
b938222- Asked
- Claude Code
- App
- support desk, LangChain
- Runs read
- 2 of 60
- Commit
b938222- Asked
- Claude Code
- App
- support desk, LangChain
- Runs read
- 180, 60 per commit
- Commits
b938222→2c1ff0a→c60b0b6- Asked
- Claude Code
Attach it, run, ask, compare
Your coding agent does the setup. If nomi is off, down or hanging, your agent runs as usual, with the same output.
-
Ask your coding agent to attach it
Start nomi (download), then ask. The attach skill finds where your agent calls models and tools, adds the hooks, and asks you what only you know: what one unit of work is, and which outcomes are problems your agent caught. Your agent doesn’t have to be on the same machine as nomi: see where nomi runs.
Use the attach-nomi skill and add nomi to this agent. -
Run your agent
As you normally would. Each run is recorded with its model calls, tool calls, retries, decisions and errors, the code behind each, and the commit that ran.
nomi browseropens the viewer. -
Ask your coding agent
It reads the runs through read-only tools and the debug skill, opens the code at that commit, and answers. It works with Claude Code, Codex, Cursor or any coding agent that supports MCP.
How's the support agent doing? -
Change it, run again, compare
Use it to help improve your agent’s quality. Your coding agent compares your agent’s behaviour before and after each change, commit against commit: failed runs, issues your agent caught, tokens, cost and time per run, and any two runs side by side.
Did the refund fix work?
support-desk
Project support-desk-langchain180 runs stored over 3 commits414 model calls, ≈ $0.7366
Where time goes
The model and tool calls your agent made, by total time, and what ran inside each. A call’s percentage is of the 43.65 s its runs took; a line inside a call is a percentage of that call.
- lookup_order Tool call 90 27.5 ms 16.91 s 39% 0
- backoffice Tool call 102 25.7 ms 14.29 s 85% 12
- Waiting between its calls 12 2.45 s 14%
- Rest of its time 171.0 ms 1%
- issue_refund Tool call 72 83.2 ms 15.08 s 35% 3
- backoffice Tool call 126 26.8 ms 14.29 s 95% 9
- Waiting between its calls 54 649.5 ms 4%
- Rest of its time 137.8 ms <1%
- ChatAnthropic Model call 414 5.23 ms 3.93 s 9% 0
- send_email Tool call 48 37.7 ms 1.80 s 4% 0
- backoffice Tool call 48 35.8 ms 1.71 s 95% 0
- Rest of its time 93.8 ms 5%
- open_ticket Tool call 15 37.7 ms 561.5 ms 1% 0
- backoffice Tool call 15 35.6 ms 529.1 ms 94% 0
- Rest of its time 32.4 ms 6%
- Not in any call 5.37 s 12%
Every step by its own time: its time minus the time of the steps inside it. Nothing is counted twice, so own times add up to the 43.65 s its runs took. The first six of 15.
- backoffice Tool call inside your tools 291 27.0 ms 30.82 s 71% 21
- ChatAnthropic Model call 414 5.23 ms 3.93 s 9% 0
- lookup_order Tool call 90 27.5 ms 2.62 s 6% 0
- support_agent Framework step 189 72.4 ms 1.62 s 4% 0
- model Framework step 414 8.92 ms 1.51 s 3% 0
- issue_refund Tool call 72 83.2 ms 787.4 ms 2% 3
Where time goes on the agent page for the same LangChain test app, over its 180 stored runs. Most of the time is back office requests made inside lookup_order and issue_refund, and lookup_order spent 2.45 s of its 16.91 s waiting between them. Your coding agent reads the same figures, day by day.
Everything on record
Every run your agent makes, kept in order: what it asked its model, what came back, which tools it called and with what, what those tools changed, and what your code decided. The viewer shows it in your browser; your coding agent and the nomi command read the same record.
- Model and tool calls
- The model asked for and the one that answered, tokens, stop reason, and the prompt, reply and reasoning text. For each tool: name, arguments, result, duration and error. Each where the framework passes it on.
- Time
- How long each recorded step took, laid out on a timeline. Across all of an agent’s runs, which model and tool calls take the most time, and what ran inside each.
- Retries, effects and decisions
- Each attempt of one action, and whether its effect was committed, not applied or unknown. Outcomes your code declares, and problems your agent caught itself, kept apart from failures.
- Code and versions
- The file, function and line behind each step, and the commit that ran. Failure and issue rates, tokens, cost and time per commit, and any two runs side by side, so you can follow how your agent’s behaviour changes from one commit to the next.
- Over time
- Runs, failures, issues, tokens, cost and median run time day by day, for each agent and each model, so you can keep an eye on an agent. Runs group by ticket, pull request or conversation. A model with no price, such as a local one, shows as unpriced, never as $0.
- What it couldn’t see
- Listed as unknown, never as zero. Each guide says what its framework doesn’t expose.
Setup guides
Each guide says what is recorded automatically, what your code declares, and what it can’t see. Frameworks that write OpenTelemetry GenAI spans, like Pydantic AI, Google ADK and the Vercel AI SDK, need no SDK code. One guide covers local models.
- Custom Loop Python: Custom LoopTypeScript: Custom Loop
- OpenAI Agents SDK Python: OpenAI Agents SDKTypeScript: OpenAI Agents SDK
- LangChain and LangGraph Python: LangChain and LangGraphTypeScript: LangChain.js and LangGraph.js
- Claude Agent SDK Python: Claude Agent SDKTypeScript: Claude Agent SDK
- Pydantic AI Python: Pydantic AI
- Google ADK Python: Google ADK
- Local Model Python: Local Model
- Vercel AI SDK TypeScript: Vercel AI SDK
- Mastra TypeScript: Mastra
There is an SDK for Python and one for TypeScript. The TypeScript SDK (runnomi-sdk 1.0.0) isn't on npm: it is installed from the release's packed file. Its guides were tested on Node 22.13.0 against local stand-ins for the model provider, not a provider's API. There are no guides for Java or .NET.
For every setup
Where nomi runs
The same machine, containers, another machine of yours, SSH tunnels, several machines, and reading from elsewhere. Everything beyond one machine is opt-in; runs stay on the machines you run, and nothing is sent anywhere else.
Open the page: Where nomi runsPython · The Python SDK at the places your loop calls models and tools
Custom Loop
For an agent that calls a provider's API itself. You wrap each unit of work, each model call and each tool call once, where your loop already makes them.
- Versions
- Python SDK (nomi-sdk) 1.0.0; any model provider
Python · An adapter that adds to the framework's own tracing
OpenAI Agents SDK
One call at startup records model calls, tool calls and handoffs from every Runner.run. Optional run hooks make tool-call IDs exact and give each tool its line of code.
- Versions
- openai-agents >=0.20,<0.26 with openai >=2.45,<4; Python SDK (nomi-sdk) 1.0.0
Python · One call at startup, through langchain-core's own configure hook
LangChain and LangGraph
One call at startup reaches every chain, agent and graph in the process. Nothing changes where you invoke them, and your callbacks and LangSmith keep working.
- Versions
- langchain-core >=1.1.2,<1.9; langgraph >=1.0.2,<1.3 and langchain >=1.1.0,<1.6 when installed; Python SDK (nomi-sdk) 1.0.0
Python · Claude Code's own telemetry export for model calls, prompts and replies (its log events, with its traces adding detail), plus an adapter for tool calls
Claude Agent SDK
Model calls, prompts and replies come from the Claude Code program's own telemetry; tool calls come from an adapter in your process. Both land in one run.
- Versions
- claude-agent-sdk >=0.2.140,<0.2.188 with mcp >=2.0,<2.4; Python SDK (nomi-sdk) 1.0.0
Python · The framework's own OpenTelemetry GenAI spans, exported to the local receiver
Pydantic AI
Pydantic AI writes its own OpenTelemetry spans. Point its exporter at the local receiver and model and tool calls are recorded with no other code. Add the Python SDK for decisions and effects.
- Versions
- pydantic-ai-slim 2.69.0; Python SDK (nomi-sdk) 1.0.0 for declarations
Python · The framework's own OpenTelemetry GenAI spans, exported to the local receiver
Google ADK
Google ADK writes its own OpenTelemetry spans. Point its exporter at the local receiver and model and tool calls are recorded. Add the Python SDK for decisions and effects.
- Versions
- google-adk 2.15.0 with Gemini; Python SDK (nomi-sdk) 1.0.0 for declarations
Python · Any of four Python routes, pointed at a model on your machine
Local Model
For an agent whose model runs on your machine. Written from runs against Ollama on four routes; nomi doesn't change how your agent talks to the model.
- Versions
- Ollama 0.40.17 with qwen2.5:0.5b and deepseek-r1:1.5b; other local servers not run
TypeScript · The TypeScript SDK at the places your loop calls models and tools
Custom Loop
For an agent that calls a provider's API itself, with the Anthropic or OpenAI JavaScript client or any other. You wrap each unit of work, each model call and each tool call once, where your loop already makes them.
- Versions
- TypeScript SDK (runnomi-sdk) 1.0.0, installed from the release's packed file; Node 22 or later, run on Node 22.13.0 only; any model provider
TypeScript · An adapter that adds to the framework's own tracing
OpenAI Agents SDK
One call at startup records model calls, tool calls and handoffs from every Runner. Optional hooks on the Runner make tool-call IDs exact. Tool code locations aren't available, and a cancelled run reads as cancelled only when its signal is given to the scope around it.
- Versions
- @openai/agents >=0.20,<0.23 with openai >=7.2,<8; Node 22 or later; TypeScript SDK (runnomi-sdk) 1.0.0, installed from the release's packed file
TypeScript · One call at startup, through @langchain/core's own configure hook
LangChain.js and LangGraph.js
One call at startup reaches the chains, agents and graphs started after it. Nothing changes where you invoke them, and your callbacks keep working. Runs started from a callback set up before that call are missed, and tool code locations aren't available.
- Versions
- @langchain/core >=1.1.49,<1.6; @langchain/langgraph >=1.2.9,<1.8 and langchain >=1.3.5,<1.7 when installed; Node 22 or later, run on Node 22.13.0 only; TypeScript SDK (runnomi-sdk) 1.0.0, installed from the release's packed file
TypeScript · Claude Code's own telemetry export for model calls, prompts and replies (its log events, with its traces adding detail), plus an adapter for tool calls
Claude Agent SDK
Model calls, prompts and replies come from the Claude Code program's own telemetry; tool calls come from an adapter in your process. Both land in one run. In-process tools get a code location only when you pass them through observeTool.
- Versions
- @anthropic-ai/claude-agent-sdk >=0.3.327,<0.3.332; Node 22 or later, run on Node 22.13.0 only; TypeScript SDK (runnomi-sdk) 1.0.0, installed from the release's packed file
TypeScript · The framework's own OpenTelemetry GenAI spans, exported to the local receiver; with the TypeScript SDK, through an exporter it guards
Vercel AI SDK
The AI SDK writes its own OpenTelemetry spans. Spans only, model and tool calls are recorded with no nomi code. Add the TypeScript SDK for scopes, decisions, effects, the commit and identity, and an exporter that can't end your process when nomi is down.
- Versions
- ai >=7.0.0,<7.0.182 with @ai-sdk/otel >=1.0.0,<1.0.182; the range is checked only with the SDK, and spans only was tested with ai 7.0.179 and @ai-sdk/otel 1.0.179; Node 22 or later; TypeScript SDK (runnomi-sdk) 1.0.0 for the second shape, installed from a packed file
TypeScript · Mastra's own OpenTelemetry exporter, given nomi's span exporter by the SDK, plus the SDK's scopes and declarations
Mastra
Mastra traces its agent runs itself. The SDK hands Mastra's exporter nomi's own span exporter, joins each Mastra run to the scope around it and is told when Mastra aborts a run. The range is one minor version, and each run's options go through runOptions().
- Versions
- @mastra/core >=1.85,<1.86 with @mastra/otel-exporter >=1.6,<1.7; Node 22.13 or later; TypeScript SDK (runnomi-sdk) 1.0.0, installed from the release's packed file
What stays on your machines
Everything it records. nomi is one self-hosted program, quick to set up, that keeps your runs in a folder on a machine you run and sends them nowhere else. There is no account and no cloud service.
- Prompts and replies
- Recorded by default, with common credential shapes masked. That is best effort, not secret detection; the metadata profile records no content at all.
- Agents somewhere else
- An agent in a container, on another machine of yours or behind an SSH tunnel can send to the same nomi, only once you set that up, and the attach skill can do it with you. Where nomi runs has each case.
- Your coding agent
- Reads runs through read-only tools. Like anything it reads, what it reads is sent to its own model provider.
- If it’s down
- Your agent keeps running, with the same output. Events the SDK couldn’t deliver are counted and shown on the run once it reaches nomi again while your agent is still running; otherwise one line in your agent’s log says so.
- Keeping and deleting
- Runs are kept 30 days and up to 10 GiB, both adjustable; at the cap, recording pauses and nothing is deleted.
nomi clear-data -confirmremoves everything.