본문으로 건너뛰기
Skillpedia
API 및 서버 (백엔드)7.6k · #13169

observability

하는 일

이 스킬은 에이전트 실행을 위한 내장 관찰 기능을 설명합니다. 이 기능은 추적, 평가, 사용자 피드백을 기록합니다. 데이터는 앱 자체 데이터베이스에 남습니다. 에이전트가 어떻게 행동하고 왜 그런지 보고 싶은 개발자를 위한 스킬입니다.

사용하는 경우

  • ✓에이전트 실행 중 무슨 일이 있었는지 단계별로 보고 싶을 때.
  • ✓에이전트 답변에 대한 피드백을 모으고 싶을 때.
  • ✓에이전트를 위한 평가나 A/B 실험을 설정해야 할 때.

스킬 링크

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

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/BuilderIO/agent-native/blob/main/.agents/skills/observability/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“에이전트가 최근 채팅을 어떻게 처리했는지, 어떤 도구를 호출했고 각 단계가 얼마나 걸렸는지 보여 주실 수 있나요?”

매주 새 스킬 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
업데이트
2026. 11. 2.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬