observability
Что он делает
Этот скилл описывает встроенную наблюдаемость запусков агента: она записывает трассировки, оценки и отзывы пользователей. Данные остаются в собственной базе данных приложения. Скилл нужен разработчикам, которые хотят видеть, как работает их агент и почему.
Когда использовать
- ✓Когда вы хотите пошагово увидеть, что происходило во время запуска агента.
- ✓Когда вы хотите собирать отзывы на ответы агента.
- ✓Когда нужно настроить оценки или A/B-эксперимент для агента.
Ссылка на скилл
https://github.com/BuilderIO/agent-native/blob/main/.agents/skills/observability/SKILL.mdСкопируйте и вставьте её в ваш ИИ (Claude, ChatGPT или Cursor) с просьбой следовать инструкциям.
Как использовать
Самый простой способ: скопируйте сообщение и вставьте его в свой ИИ. Он прочитает скилл и выполнит инструкции.
Готовое сообщение для вставки
Для Claude Code, Codex или Cursor: запустите в папке проекта, и скилл установится.
Скачайте SKILL.md и положите его в папку скиллов вашего агента.
Пример запроса к вашему ИИ
“Можешь показать, как мой агент обработал последние несколько чатов, включая то, какие инструменты он вызывал и сколько времени занял каждый шаг?”
5 новых скиллов в неделю. 1 минута чтения.
Как это работает
Каждый запуск агента записывается автоматически с шагами, вызовами модели и вызовами инструментов. Содержимое по умолчанию скрыто, а данные хранятся в собственной базе данных приложения.
Технический текст (оригинальный SKILL.md)
Оригинальный текст автора на английском, прямо с 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
Частые вопросы
Нужна ли настройка?
Нет. Скилл говорит, что каждый запуск агента инструментируется автоматически без конфигурации.
Записывается ли содержимое моих промптов?
Промпты и содержимое инструментов по умолчанию редактируются, а записывать их можно только после явного согласия.
Можно ли отправлять данные во внешний инструмент?
Да. Скилл говорит, что шаблоны могут по желанию экспортировать данные в сервисы вроде Langfuse или Datadog.
Подробности
Оригинальное описание автора
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
Популярность
- Звёзды на GitHub
- 7.6k
- Место в рейтинге
- #13169
- Лицензия
- MIT
- Обновлён
- 02.11.2026
Комментарии
- …
Другие скиллы из этого репозитория
design-exploration
7.6kПомогает агенту рассмотреть несколько направлений дизайна интерфейса рядом, дать вам выбрать одно, а затем доработать выбранное.
visual-edit
7.6kПомогает агенту открыть запущенное локальное приложение в визуальном редакторе, чтобы вы вместе просмотрели и правили его настоящие экраны.
turn-into-app
7.6kПревращает процесс, таблицу или проект в аккуратное визуальное приложение с заполненными экранами и агентом, работающим за элементами управления.
visual-plan
7.6kПревращает обычный текстовый план в интерактивный визуальный план с диаграммами, картами файлов, фрагментами кода и открытыми вопросами.
Похожие скиллы
api-connector-builder
280kАгент создаёт новые подключения к API по существующему шаблону. Используйте, когда нужна ещё одна интеграция без нового способа делать то же самое.
api-design
280kПомогает агенту проектировать REST API по лучшим практикам: как API общаются, как показываются ошибки и как организовать данные.
backend-patterns
280kПомогает агенту с архитектурными паттернами серверной части и оптимизацией баз данных. Полезен при создании и проверке серверного кода.