Перейти к содержанию
Skillpedia
API и серверы (бэкенд)7.6k · #13169

observability

Что он делает

Этот скилл описывает встроенную наблюдаемость запусков агента: она записывает трассировки, оценки и отзывы пользователей. Данные остаются в собственной базе данных приложения. Скилл нужен разработчикам, которые хотят видеть, как работает их агент и почему.

Когда использовать

  • ✓Когда вы хотите пошагово увидеть, что происходило во время запуска агента.
  • ✓Когда вы хотите собирать отзывы на ответы агента.
  • ✓Когда нужно настроить оценки или A/B-эксперимент для агента.

Ссылка на скилл

https://github.com/BuilderIO/agent-native/blob/main/.agents/skills/observability/SKILL.md

Скопируйте и вставьте её в ваш ИИ (Claude, ChatGPT или Cursor) с просьбой следовать инструкциям.

Как использовать

Самый простой способ: скопируйте сообщение и вставьте его в свой ИИ. Он прочитает скилл и выполнит инструкции.

Готовое сообщение для вставки

Используй этот скилл, чтобы помочь мне: https://github.com/BuilderIO/agent-native/blob/main/.agents/skills/observability/SKILL.md Прочитай файл SKILL.md по этой ссылке и следуй его инструкциям в моей задаче.
Хотите, чтобы ваш ИИ сам находил такие скиллы?Установите бесплатный MCP Skillpedia: одна строка, и перед каждой задачей он ищет среди 15 000+ скиллов.Установить за 1 минуту →

Пример запроса к вашему ИИ

“Можешь показать, как мой агент обработал последние несколько чатов, включая то, какие инструменты он вызывал и сколько времени занял каждый шаг?”

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. captureToolResults only decides whether the rest is kept. The span's metadata says which (__tool_error_detail: full | signature), and the read path returns it as errorDetail (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 retain agent.error_code / agent.error_cause.
  • A stop that waits on the user is not an error. An input_required outcome (question, approval, connection) records the agent_run span as status: "paused" with the reason in terminal_code, not error. Anything that counts failed runs must treat paused as non-error; an error event 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() carries extra.failureContext (app, route, actionName, automationName, threadId, runId, requestId, userScope, threadUrl, build, environment, errorCode, failureClass); see the tracking skill for how it is derived. threadUrl is https://<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_trace for the run.
  • A copyable report on the client. formatClientFailureReport() from @agent-native/core/client/failure-report builds 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 carries error.requestId (the response's x-agent-native-request-id, also on the server capture's failureContext.requestId).
  • Read by id. Dispatch's get-agent-thread-debug ta
Частые вопросы

Нужна ли настройка?

Нет. Скилл говорит, что каждый запуск агента инструментируется автоматически без конфигурации.

Записывается ли содержимое моих промптов?

Промпты и содержимое инструментов по умолчанию редактируются, а записывать их можно только после явного согласия.

Можно ли отправлять данные во внешний инструмент?

Да. Скилл говорит, что шаблоны могут по желанию экспортировать данные в сервисы вроде 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

Полезен ли этот скилл?

0

Войдите , чтобы голосовать.

Комментарии

  • …

Другие скиллы из этого репозитория

Похожие скиллы