observability
What it does
This skill describes the built-in observability for agent runs, which records traces, evaluations and user feedback. The data stays in the app's own database. It is for developers who want to see how their agent behaves and why.
When to use it
- ✓When you want to see what happened during an agent run, step by step.
- ✓When you want to collect feedback on agent answers.
- ✓When you need to set up evaluations or an A or B experiment for the agent.
Skill link
https://github.com/BuilderIO/agent-native/blob/main/.agents/skills/observability/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agent’s skills folder.
Example of what to ask your AI
“Can you show me how my agent handled the last few chats, including which tools it called and how long each step took?”
5 new skills a week. 1 minute to read.
How it works
Every agent run is recorded automatically with its steps, model calls and tool calls. Content is hidden by default, and the data is kept in the app's own database.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
Agent Observability
Rule
The observability system auto-instruments every agent run with zero configuration. Traces, automated evals, and feedback collection work out of the box. All data lives in the app's own SQL database — no external services required. Templates can optionally export to Langfuse, Datadog, or any OTel-compatible platform.
Five Pillars
1. Traces
Every runAgentLoop() call is automatically instrumented via instrumentAgentLoop() in packages/core/src/observability/traces.ts. It captures:
- agent_run span — top-level parent with total duration and cost
- llm_call span — model name, token counts (input, output, cache read/write), cost
- tool_call spans — one per action invocation, with duration and success/error
The run span is NAMED by what started it, because the trace list shows that name
and nothing else: a scheduled job is background_automation_run:<job name>, a
chat turn is agent_run, and a turn a feature sent on the user's behalf is
agent_run:<usageLabel> when the caller named it:
sendToAgentChat({
message: "Enrich this record from the web",
newTab: true,
usageLabel: "crm:enrich-record", // → usage row label + `agent_run:crm:enrich-record`
});
Content (prompts, tool args, tool results) is redacted by default. Opt in through the declared observability config domain:
// server/plugins/config.ts
import { defineAppConfig } from "@agent-native/core/server";
export default defineAppConfig({
observability: {
enabled: true,
capturePrompts: false,
captureToolArgs: true, // capture action input args
captureToolResults: false, // include results and full error text in local tool spans
evalSampleRate: 0.05, // 5% of runs get LLM-as-judge eval
inferredSentimentEnabled: false,
inferredSentimentSampleRate: 0,
inferredSentimentModel: "gpt-6-luna",
},
});
Two things are recorded whatever the flags say, because a failure nobody can classify is not observable:
- A failed tool span always keeps a signature: the first line of the error,
redacted (credentials, emails, long opaque ids) and capped at 500
characters.
captureToolResultsonly decides whether the rest is kept. The span's metadata says which (__tool_error_detail:full|signature), and the read path returns it aserrorDetail(full|signature|withheld|unrecorded) so "withheld on purpose" is never read as "nothing was recorded".$ai_*telemetry omits error text even when capture is enabled. Optional host-owned OTel run spans also use fixed code-derived messages and retainagent.error_code/agent.error_cause. - A stop that waits on the user is not an error. An
input_requiredoutcome (question, approval, connection) records theagent_runspan asstatus: "paused"with the reason interminal_code, noterror. Anything that counts failed runs must treatpausedas non-error; anerrorevent that follows the pause still makes the run an error.
From an error report to the failing run
A report is only useful if it names where it happened. Four pieces make that true, so nobody has to ask the reporter for an example:
- The failure packet. Every server
captureError()carriesextra.failureContext(app,route,actionName,automationName,threadId,runId,requestId,userScope,threadUrl, build, environment,errorCode,failureClass); see the tracking skill for how it is derived.threadUrlishttps://<app host>/?thread=<chat_threads.id>, and the Analytics issue page links it. The same fields ($ai_trace_id= run id,thread_id) are on the$ai_tracefor the run. - A copyable report on the client.
formatClientFailureReport()from@agent-native/core/client/failure-reportbuilds the plain-text packet (app, thread link, run, request, code, time, build, and the inspection call) for a "Copy details" button. The chat run-error card's existing "Copy debug info" button uses it; call it from any other error card. It needs only what the card already knows (message,errorCode,runId,requestId) and falls back to the open thread. The error-screen "Open GitHub issue" template adds the same thread link, build and time. A failed action carrieserror.requestId(the response'sx-agent-native-request-id, also on the server capture'sfailureContext.requestId). - Read by id. Dispatch's
get-agent-thread-debugta
FAQ
Is any setup needed?
No. The skill says every agent run is instrumented automatically with no configuration.
Is my prompt content recorded?
Prompts and tool content are redacted by default, and you must opt in to record them.
Can the data go to an outside tool?
Yes. The skill says templates can optionally export to services such as Langfuse or Datadog.
Details
Original description by the author
Agent observability, evals, feedback, and experiments. Use when adding observability dashboards, configuring trace capture, setting up evals, creating A/B experiments, or collecting user feedback on agent responses.
repo: BuilderIO/agent-native
Popularity
- GitHub stars
- 7.6k
- Ranking position
- #13169
- License
- MIT
- Updated
- 11/2/2026
Comments
- …
More skills from this repository
design-exploration
7.6kHelps your agent explore several UI design directions side by side, let you pick one, and then refine the chosen design.
visual-edit
7.6kHelps your agent open a running local app in a visual editor so you can review and edit its real screens together.
turn-into-app
7.6kTurns a workflow, spreadsheet or project into a polished visual app, with populated screens and an agent working behind the controls.
visual-plan
7.6kTurns a plain text plan into an interactive visual plan with diagrams, file maps, code snippets and open questions.
Similar skills
api-connector-builder
280kHas your agent build new API connections following the existing pattern. Use when you need to add one more integration without creating a new way of doing things.
api-design
280kHelps your agent design REST APIs following best practices. It's useful for defining how APIs communicate, how errors are shown, and how to organize data.
backend-patterns
280kHelps your agent with server-side architecture patterns and database optimization. It's useful for building or reviewing code that runs on the server.