Langsung ke konten
Skillpedia
API & server (backend)7.6k Β· #13169

observability

Fungsinya

Skill ini menjelaskan observabilitas bawaan untuk run agent, yang mencatat jejak, evaluasi, dan umpan balik pengguna. Data tetap berada di basis data aplikasi. Skill ini untuk pengembang yang ingin melihat bagaimana agent mereka bekerja dan mengapa.

Kapan dipakai

  • βœ“Saat Anda ingin melihat apa yang terjadi selama run agent, langkah demi langkah.
  • βœ“Ketika Anda ingin mengumpulkan umpan balik tentang jawaban agent.
  • βœ“Saat Anda perlu menyiapkan evaluasi atau eksperimen A atau B untuk agent.

Link skill

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

Salin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.

Cara pakai

Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.

Pesan siap tempel

Gunakan skill ini untuk membantu saya: https://github.com/BuilderIO/agent-native/blob/main/.agents/skills/observability/SKILL.md Baca file SKILL.md di link tersebut dan ikuti instruksinya untuk tugas saya.
Mau AI Anda menemukan skill seperti ini sendiri?Pasang MCP Skillpedia gratis: cukup satu baris, dan AI mencari di antara 15.000+ skill sebelum tiap tugas.Pasang dalam 1 menit β†’

Contoh permintaan ke AI

β€œBisakah Anda menunjukkan kepada saya bagaimana agent saya menangani beberapa obrolan terakhir, termasuk alat apa yang dipanggilnya dan berapa lama setiap langkah berjalan?”

5 skill baru setiap minggu. 1 menit baca.

Cara kerjanya

Setiap run agent dicatat otomatis dengan langkah, panggilan model, dan panggilan alatnya. Konten disembunyikan secara default, dan data disimpan di basis data aplikasi sendiri.

Konten teknis (SKILL.md asli)

Teks asli dari pembuat, dalam bahasa Inggris, langsung dari 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
Pertanyaan umum

Apakah diperlukan pengaturan?

Tidak. Skill ini menyatakan setiap run agent diinstrumentasi otomatis tanpa konfigurasi.

Apakah konten prompt saya dicatat?

Prompt dan konten alat disamarkan secara default, dan Anda harus memilih secara eksplisit untuk mencatatnya.

Bisakah data dikirim ke alat luar?

Bisa. Skill ini menyatakan templat dapat mengekspor secara opsional ke layanan seperti Langfuse atau Datadog.

Detail

Deskripsi asli dari pembuat

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

Popularitas

Bintang GitHub
7.6k
Peringkat
#13169
Lisensi
MIT
Diperbarui
2/11/2026

Apakah skill ini berguna?

0

Masuk untuk memberi suara.

Komentar

  • …

Skill lain dari repositori ini

Skill serupa