AI Skills AI技能 1d ago Updated 1d ago 更新于 1天前 48

Your Agent Is Working. So Why Can't You Explain What It Did? 你的Agent在运行,但你为什么无法解释它做了什么?

Agent observability must go beyond traditional LLM logging to capture autonomous behavior, including context provenance, state transitions, and decision trails OpenTelemetry should serve as the foundational telemetry standard while AI-native platforms like Langfuse handle specialized agent observations and evaluations A semantic contract for agent telemetry—covering identity, context, state, decision, action, protocol, policy, economics, outcome, and evaluation—is essential for consistent observ 传统可观测性(日志、监控)不足以应对Agent系统的复杂性,需要建立针对自主行为的可观测性框架 提出以"决策-行动-结果"为核心的追踪抽象,而非简单记录LLM推理过程 强调OpenTelemetry语义约定与Langfuse等AI原生可观测平台的结合使用 区分A2A(Agent-to-Agent)与MCP(Model Context Protocol)调用的不同可观测性需求 将评估、成本、安全策略和人工干预纳入统一的追踪体系

68
Hot 热度
72
Quality 质量
65
Impact 影响力

Analysis 深度分析

TL;DR

  • Agent observability must go beyond traditional LLM logging to capture autonomous behavior, including context provenance, state transitions, and decision trails
  • OpenTelemetry should serve as the foundational telemetry standard while AI-native platforms like Langfuse handle specialized agent observations and evaluations
  • A semantic contract for agent telemetry—covering identity, context, state, decision, action, protocol, policy, economics, outcome, and evaluation—is essential for consistent observability across frameworks
  • Agent loops, economic failures, and delegation problems are distinct failure modes that require behavioral signals and runtime monitoring beyond infrastructure health checks
  • Security and privacy require a deliberate telemetry boundary with classification, redaction, and sampling policies between applications and observability backends

Why It Matters

This article reframes observability for agentic systems as a fundamentally different problem from traditional distributed systems monitoring, which is critical as enterprises deploy more autonomous agents into production. The proposed semantic contract and layered architecture provide a practical roadmap for building production-grade agent platforms that can answer not just whether the system is healthy, but whether it is behaving correctly, efficiently, and securely.

Technical Details

  • Observations-first model: Langfuse v4 treats LLM calls, tool executions, and agent steps as first-class queryable objects grouped by trace_id, enabling queries like "failed tool observations" or "expensive agent steps" rather than simple trace lookups
  • OpenTelemetry GenAI conventions: Semantic conventions for agent identity, model information, token usage, retrieval, and evaluation attributes provide a vendor-agnostic telemetry foundation that outlives any single observability tool
  • Protocol-aware telemetry: A2A (agent-to-agent) and MCP (Model Context Protocol) calls require distinct attribute schemas—delegation, target agent, task lifecycle, and authorization for A2A; server, tool, arguments, schema/version, and failure details for MCP—rather than collapsing into generic "tool call" spans
  • Stateful execution tracking: For frameworks like LangGraph, traces must capture state checkpoints, execution type (fresh/retry/resume), and human-in-the-loop interventions including policy versions, approval decisions, and wait durations
  • Evaluation integration: Production traces should be directly linked to evaluation scores with causal context (e.g., "0.72 because retrieval failed after retriever version 14"), supported by both offline dataset testing and online model-based/user feedback evaluation

Industry Insight

  • The industry is moving toward standardized agent telemetry contracts rather than proprietary logging solutions; platforms that adopt OpenTelemetry as a foundation while layering AI-native semantics will have a significant advantage in interoperability and vendor flexibility
  • Agent loops and economic failures represent the next major reliability challenge for production agents—teams should implement behavioral anomaly detection (unusual step counts, retry storms, growing context) alongside traditional infrastructure monitoring to catch these silent failures
  • The separation of concerns between application instrumentation, telemetry classification/redaction, and backend storage is critical for enterprise adoption; building this boundary early prevents security and compliance debt as agent systems scale across regulated environments

TL;DR

  • 传统可观测性(日志、监控)不足以应对Agent系统的复杂性,需要建立针对自主行为的可观测性框架
  • 提出以"决策-行动-结果"为核心的追踪抽象,而非简单记录LLM推理过程
  • 强调OpenTelemetry语义约定与Langfuse等AI原生可观测平台的结合使用
  • 区分A2A(Agent-to-Agent)与MCP(Model Context Protocol)调用的不同可观测性需求
  • 将评估、成本、安全策略和人工干预纳入统一的追踪体系

为什么值得看

这篇文章为Agent系统的可观测性提供了系统性的思考框架,帮助AI从业者从"监控基础设施健康"转向"理解Agent行为轨迹"。对于正在构建多Agent平台的企业,文章提出的语义契约和分层架构具有直接参考价值。

技术解析

  • 追踪抽象设计:提出用"决策-行动-结果"链替代传统的"输入-输出"日志模式,记录context、decision、action、evaluation等关键节点,而非捕获完整的chain-of-thought
  • OpenTelemetry + Langfuse架构:以OpenTelemetry作为通用遥测基础层,Langfuse作为AI原生可观测层,实现标准化语义约定与AI特定观察对象的分离
  • A2A与MCP的可观测性区分:Agent间调用需追踪委托、目标Agent、任务生命周期、授权上下文;MCP调用需追踪服务器、工具、参数、结果、schema版本
  • 状态与策略集成:将状态检查点、人工审批、策略版本纳入追踪,区分模型调用延迟与人工审批延迟
  • 评估闭环设计:离线评估(数据集测试)与在线评估(生产执行评估)结合,将评分与具体执行上下文关联

行业启示

  • Agent可观测性正从"日志增强"演变为独立的技术领域,需要建立专门的行为信号检测(如循环、重试风暴、上下文膨胀)
  • 企业应优先投资语义契约层而非特定厂商工具,确保可观测性架构的长期可移植性
  • 安全与合规要求将推动遥测数据分类、脱敏和采样策略的分层设计,不同环境需要灵活的保留策略

Disclaimer: The above content is generated by AI and is for reference only. 免责声明:以上内容由 AI 生成,仅供参考。

Agent Agent LLM 大模型 Evaluation 评测 Research 科学研究