XNews

Anthropic: Agents Evaluation & Long‑Running Agent Engineering

Anthropic: Agents Evaluation & Long‑Running Agent Engineering

Anthropic published engineering guidance on agent evaluation and long‑running agent design. Key points: - Anthropic identifies a core evaluation contradiction: agent autonomy and flexibility increase evaluation difficulty. - Evaluation taxonomy: Task, Grader, Transcript, Harness; evaluations target agent+tool combos. - Task: non‑deterministic outputs require repeated trials. - Grader: multiple graders per task; each grader contains multiple assertions. - Transcript: records tool calls, reasoning, intermediate state; true verification is environment state. - Harness: end‑to‑end evaluation framework runs trials. - Agent evaluation progression: manual tests → CI/CD automation → production monitoring + A/B tests. - Agent types require tailored evaluators: programming, conversational, research, GUI/compute agents. - Non‑deterministic metrics: pass@k (any success) vs pass^k (all attempts succeed); choice matters. - Eight‑step roadmap for building evaluation suites starting from 20–50 real failure tasks. - Long‑running agents: Anthropic rejects single context compression; recommends externalized state. - Dual‑agent relay: Initializer Agent writes structured feature_list.json; Coding Agents follow strict startup sequence (pwd, read logs, run init.sh, run regressions). - Engineering practices: enforced incremental development, Puppeteer visual feedback loop, Git commits as high‑signal communication. - Practical tooling: advocating Bash for intermediate file state to enable reproducibility, verification, composability, with layered permission controls and parser protections.

Key insights

Evaluation must treat agent+tool as the unit under test

Anthropic frames automated evaluation as assessing the combined system of the agent and its tools, not the model alone. The evaluation taxonomy includes Task (concrete test case and success criteria), Grader (one or more scorers with multiple assertions), Transcript (complete record of tool calls and intermediate state), and Harness (end‑to‑end runner). Anthropic stresses that transcripts and actual environment state, not agent claims, are the verification standard, and recommends stabilizing environments and preferring deterministic graders where possible.

Non‑deterministic metrics must be chosen to match reliability goals

Anthropic introduces and distinguishes pass@k and pass^k for measuring nondeterministic agent behavior. pass@k measures the probability at least one of k attempts succeeds; pass^k measures the probability all k attempts succeed. Anthropic notes these converge at k=1 but diverge with higher k, and recommends choosing the metric aligned with use case: exploratory generation versus production reliability.

Start small and convert manual checks into automated evaluations

Anthropic recommends an eight‑step roadmap: begin early with 20–50 real failure cases, convert existing manual checks to formal tests, author explicit tasks and references that two experts can independently judge, balance positive and negative test cases, ensure stable environments, design scoring carefully (prefer deterministic), inspect transcripts, and monitor saturation where 100% pass no longer signals improvement.

Long‑running agents must externalize state; context compression is insufficient

Anthropic rejects relying solely on expanded context windows for multi‑hour/day agents. Their approach externalizes cognitive state into structured artifacts and tools—mirroring software engineering practices like Git and task trackers—so successive agent instances read and persist structured state rather than depending on implicit model memory.

Relay architecture: Initializer and Coding Agents enforce structured handoffs

Anthropic describes a dual‑agent relay: an Initializer Agent crafts a closed, consistent environment and writes feature_list.json (structured, with category/description/steps/passes, set initially to passes:false), while Coding Agents follow a strict startup sequence—pwd, read progress and git logs, read feature_list.json, run init.sh, verify baseline—only flipping a single feature to passes:true per increment. This enforces incremental development and reduces hallucination risk from freeform text handoffs.

Bash and filesystem artifacts improve reproducibility and auditability

Anthropic engineers and community contributors recommend providing agents with Bash and file I/O to persist intermediate results: tools → write files → grep/filter → model processing. This yields reproducible, verifiable, and composable workflows. Anthropic pairs this capability with permissioned command parsing and layered controls to mitigate command injection and dangerous actions.

Source posts