Skillpedia
واجهات API والخوادم (backend)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 في هذا الرابط ونفّذ تعليماته لمهمتي.
تريد أن يجد الذكاء الاصطناعي مهارات مثل هذه بنفسه؟ثبّت خادم Skillpedia MCP المجاني: سطر واحد، ويبحث في 15,000+ مهارة قبل كل مهمة.ثبّته في دقيقة واحدة →

مثال على ما تطلبه من الذكاء الاصطناعي

“هل يمكنك أن تريني كيف تعامل وكيلي مع آخر عدة محادثات، بما فيها الأدوات التي استدعاها والوقت الذي استغرقته كل خطوة؟”

5 مهارات جديدة كل أسبوع. قراءة في دقيقة واحدة.

كيف تعمل

يُسجَّل كل تشغيل للوكيل تلقائياً مع خطواته واستدعاءات النماذج والأدوات. المحتوى مخفي افتراضياً، والبيانات محفوظة في قاعدة بيانات التطبيق.

المحتوى التقني (ملف 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
آخر تحديث
2‏/11‏/2026

هل هذه المهارة مفيدة؟

0

سجّل الدخول للتصويت.

التعليقات

  • …

المزيد من المهارات من هذا المستودع

مهارات مشابهة