Skip to content

martin1847/evolab / skills/agent-backend-standard

agent-backend-standard

Verified

后端架构与工程规范。适用于构建或评审 agent/LLM 后端、任何涉及数据库(DB)的后端,以及建立或评审后端仓库工程门禁。

references/observability-cost.md

View on GitHub
# III-11 — 可观测与成本 / 时延

> hub `agent-backend-standard` 的一章(**薄**)。埋点本体不在此——canonical 在独立 skill `observability-standard`(粒度规则:埋点是不同触发动词,独立 skill)。本章只加 agent 特有的**成本 / token / 时延**面 + 指回 observability。

## 1. 交叉引用(不重复)
- trace_id 串 trace/log、结构化日志、OTel、GenAI 语义约定、honest span(`ok=False`+`error_type`)、脱敏维度 → **`observability-standard`**。II-9 的诚实 span 要求亦锚那里。

## 2. 成本 / token / 时延(本章 MUST)
- **每任务记 token + 美元成本**(prompt/completion 分项)、**端到端时延**、每步 LLM/工具耗时;脱敏。
- **预算上限**:每任务 / 每租户设 token·成本上限,超则停 + 上报(呼应 II-7 退出条件、II-9 失控防护)。
- **告警 / 看板**:p95 时延、成本异常、超时率、`cancelled` 率。
- eval 驱动选型也看成本(见 III-10 *TBD*):同质量挑更省的模型。

## 一句话
> 埋点走 `observability-standard`;本章只管 agent 的钱和时间——每任务记 token/成本/时延、设预算上限超则停、对 p95 与成本异常告警。
reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.Stars: 322kUpdated Claude CodeCodexVerifiedInstall
dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependenciesStars: 322kUpdated Claude CodeCodexVerifiedInstall
executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is availableStars: 322kUpdated Claude CodeCodexVerifiedInstall