Glossary

Complete vocabulary of AI Agent engineering plus foundational disciplines — 11 categories from program basics through testing & observability to cross-disciplinary complex systems. Each term: one-line definition + link to the chapter or roadmap that teaches it. Quick reference after finishing a chapter.

Program Basics

Function · 函数

See Foundations Chapter 02

A named, reusable piece of code logic — takes inputs, returns outputs. Agent tools are functions at their core.

A template for objects — defines data (attributes) + behavior (methods). The class itself doesn't exist; it's the blueprint.

Callback · 回调

See Foundations Chapter 02

Hand a function to the system so it calls you back at a specific moment. Streaming relies heavily on callbacks.

Handler · 处理器

See Foundations Chapter 02

A function that handles a specific event or request type — tool_handler, error_handler, etc.

A system-provided extension point where you can insert custom logic at specific lifecycle moments.

Software Architecture

Abstraction · 抽象

See Foundations Chapter 02

Hide complex implementation, expose only a simple stable interface — about hiding complexity (vs encapsulation's controlling access).

Implementation · 实现

See Foundations Chapter 02

The concrete code behind an interface. One interface can have multiple implementations.

Encapsulation · 封装

See Foundations Chapter 02

Bundle data with the operations on it and expose only a controlled access surface, hiding internal state — about controlling access (vs abstraction's hiding complexity).

SDK · 软件开发工具包

See Foundations Chapter 02

An official toolkit a platform provides for developers (client + types + helpers).

Framework · 框架

See Foundations Chapter 02

Provides app structure + development pattern. Library = you call it; Framework = it calls you.

Middleware · 中间件

See Foundations Chapter 02

A layer of logic inserted in the request pipeline — auth, logging, rate limiting, caching.

Adapter · 适配器

See Foundations Chapter 02

Converts different systems' interfaces into a unified one, so downstream can swap implementations.

Separation of Concerns · 关注点分离

See Foundations Chapter 02

Each module owns its own concerns and nothing else. The core target behind high cohesion + low coupling.

Orchestrator · 编排器

See Agent Engineering Chapter 08

The central lead in an orchestrator-worker topology: dynamically spawns/dispatches workers and aggregates results. Parallelizes breadth (beyond a single context window) but workers can't see each other → fragmentation risk, patched by delegation engineering. The architecture of Anthropic's multi-agent research system.

The layer where the agent harness actually executes — loop, tools, state, events, error handling (the Codex `core` crate walked in Ch11 is exactly this). Distinct from the eval harness used for testing, and from the SDK wrapper that only exposes an interface.

An extension capability that mounts onto a main system without requiring major changes to the host.

Wrapper · 包装器

See Foundations Chapter 02

A layer around an original function, adding logging, retry, caching, format conversion, etc.

Source Walkthrough · 源码巡礼读法

See Agent Engineering Chapter 11

A capstone reading method: which earlier chapter this maps to, how a real system does it (crate / file + pinned commit), and a judgment-training point. The goal is to make abstractions concrete and concrete things named — pinning learned abstractions onto real code, not teaching new concepts.

Pin-Commit Discipline · pin-commit 纪律

See Agent Engineering Chapter 11

The discipline for citing a live repository: pin every line-level reference to a commit SHA + date, prefer crate names and official walkthroughs, and for closed-source systems cite only public behavior, never leaked or reverse-engineered filenames. Code drifts; the subsystem-to-abstraction mapping does not.

Harness Engineering · harness 工程

See Agent Engineering Chapter 12

The whole body of engineering that turns a stateless, amnesiac, error-prone model into a system that reliably perceives, plans, acts, and self-corrects in a real environment (loop / tools / isolation / adversarial defense / context / memory / coordination / measurement). The model decides whether it can think; the harness decides whether it can reliably act — the thesis of the whole #8 roadmap.

Harness Stack · harness 九层

See Agent Engineering Chapter 12

Reorganizing #8's first eleven chapters into nine layers of one harness: control (loop) / capability (tools) / containment (sandbox) / adversarial (security) / supply (context) / persistence (memory + self-improvement) / coordination (multi-agent) / measurement (eval + failure) / empirical (real systems). Each layer corresponds to a current wall.

Training vs Production Harness · 训练 ≠ 生产 harness

See Agent Engineering Chapter 12

A training harness is wide on purpose (maximize the action space so the optimizer discovers strategies); a production harness is narrow on purpose (least privilege, deny-by-default, observe everything) — two different artifacts. Two symmetric failures: over-locking in training (the model never learns to recover from a tool error) / under-fencing in production (an injection through a tool output exfiltrates secrets).

Memory Wall · 内存墙

See System Design Chapter 02

The physical constraint that a model's weights far exceed one GPU's memory — a frontier model can be 10–20× a single card (a 671B model is ~1.34TB in BF16 vs 80GB per card). The root reason large models must be distributed.

Data Parallelism · 数据并行

See System Design Chapter 02

Replicate the whole model on each GPU, split the data, sync with all-reduce. Key distinction: it requires each card to hold the full model, so it does NOT solve 'won't fit' — it scales throughput; in serving it appears as multiple full replicas.

Tensor Parallelism · 张量并行

See System Design Chapter 02

Split a single layer's matrix multiply across GPUs (intra-layer). Fits a layer too big for one card, but every layer needs an all-reduce to merge — the most communication-heavy, only worthwhile over fast intra-node NVLink. From Megatron-LM.

Pipeline Parallelism · 流水线并行

See System Design Chapter 02

Split the layer stack by depth into stages, one per GPU; micro-batches flow through like an assembly line (inter-layer). Light communication, but 'bubbles' idle the pipeline at fill/drain — disliked for low-latency serving. From GPipe.

Expert Parallelism · 专家并行

See System Design Chapter 02

MoE-specific: distribute experts across GPUs; each token is routed to the card holding its expert and back. The cost is all-to-all communication. DeepSeek-V3 scales it to an EP320 deployment.

MoE · 混合专家

Belongs to #4 Model Design (TBD)

Mixture-of-Experts: many expert sub-networks, only a few activated per token. Systems implication: activated count sets compute, but total params set memory — all experts must be resident, so don't conflate the two. Architecture details in #4 Model Design.

ZeRO 零冗余优化器

Belongs to #5 Pre-training (TBD)

Zero Redundancy Optimizer: a data-parallel memory optimization that shards optimizer states (ZeRO-1), gradients (ZeRO-2), and parameters (ZeRO-3) across cards, gathering on demand — trading communication for memory. A training-side technique; details in #5 Pre-training.

Collective Communication · 集合通信

See System Design Chapter 03

A set of standard primitives for many GPUs to move data in concert (all-reduce / all-gather / all-to-all, etc.). The engineered answer to 'after splitting compute, the pieces must be recombined'; executed by libraries like NCCL.

A collective primitive: reduce each rank's partial (usually a sum), then give every rank the same full result. Used by tensor-parallel merge and data-parallel gradient averaging. Equivalent to reduce-scatter + all-gather.

A collective primitive: every rank sends a distinct piece to every other rank and receives one from each — the busiest and costliest of the group. The core of routing tokens in MoE expert parallelism.

A crossbar switch chip that wires multiple NVLinks into a non-blocking fabric where any two GPUs talk at full speed simultaneously. An 8-GPU node typically has several. Without it, GPUs only connect point-to-point with shared bandwidth.

A high-speed network between nodes (machine to machine). Hopper-era NDR is ~50 GB/s per GPU (the DeepSeek-V3 figure), the slow side of the bandwidth gap; 2026 XDR reaches ~200 GB/s per GPU, still ~an order of magnitude slower than intra-node NVLink. Usually paired with RDMA.

Remote Direct Memory Access: a NIC reads/writes a remote machine's memory directly, bypassing the remote CPU and kernel for ultra-low latency. GPUDirect and IBGDA are the GPU-memory-aware versions.

NVIDIA Collective Communications Library: the engine for GPU collective communication, translating an all-reduce into a topology-optimal data movement (who goes over NVLink, who over the network). AMD's equivalent is RCCL.

Prefill / Decode · 推理的两个阶段

See System Design Chapter 04

The two phases of one LLM inference. Prefill processes the whole prompt in a single parallel pass (large matmuls, GPU saturated — compute-bound; sets TTFT); decode generates the answer token by token autoregressively (each step moves all weights + KV just to produce one token — memory-bandwidth-bound; sets TBT). Their opposite resource profiles are why PD-disaggregation (splitting the phases onto separate machines) exists.

TTFT · 首字延迟

See System Design Chapter 04

Time To First Token: from request arrival to the first output token. Dominated by prefill compute (longer prompt → longer) plus queueing/scheduling overhead in the system — so it is not just model speed but a systems problem. Prefix caching is the main lever to lower it.

TBT · 字间延迟

See System Design Chapter 04

Time Between Tokens: the gap between successive output tokens after the first (also TPOT or ITL, with slight differences — TPOT is conventionally the mean, ITL the distribution). Governed by the decode phase, which is bottlenecked by GPU memory bandwidth, so TBT is essentially a mirror of that bandwidth.

Memory-bound / Compute-bound

See System Design Chapter 04

Where a computation's bottleneck sits: memory-bound means limited by the bandwidth of moving data from memory into the compute units, leaving the ALUs idle; compute-bound means limited by raw arithmetic. In LLM inference, decode is the classic memory-bound case (each step moves all weights + KV to produce one token), prefill the classic compute-bound case (one parallel pass over many tokens). Roofline analysis (see Ch8) formalizes the dividing line.

连续批处理 · Continuous Batching

See System Design Chapter 05

Also iteration-level scheduling. Re-forms the running batch every decode step instead of per whole batch: a finished request frees its slot and a queued request joins on the next step, so the GPU leaves no bubbles. Contrast static batching (the whole batch waits for its longest-generating member while early finishers idle). Introduced by Orca (OSDI'22), popularized by vLLM; the gain grows with output-length variance.

Chunked Prefill · 分块预填充

See System Design Chapter 05

Splits a large prefill into near-equal chunks and interleaves them with ongoing decode steps, so a long prefill no longer monopolizes the GPU and stalls everyone's decode (a TBT spike). The key way to balance compute-bound prefill against memory-bound decode contending for one GPU. From Sarathi-Serve (OSDI'24); on by default in vLLM's newer architecture.

缓存感知路由 · Prefix-aware Routing

See System Design Chapter 05

Also cache-aware routing: in a multi-replica cluster, route requests that share a prefix (e.g. the same long system prompt) to the same replica so the second hits a warm KV cache and skips recomputing the prefill. Contrast round-robin, which scatters them and forces recompute. SGLang's RadixAttention (radix-tree prefix reuse) plus a cache-aware load balancer is a representative implementation.

PD 分离 · Prefill/Decode Disaggregation

See System Design Chapter 06

Split the two phases of inference onto two specialized fleets: a compute-optimized prefill fleet computes the prompt and produces the KV cache, transferred over RDMA to a memory-bandwidth-optimized decode fleet that generates token by token. Motivation: the phases' opposite resource profiles interfere when colocated and can't each pick hardware or scale independently. The RDMA transfer is cheap (overlaps with compute); it pays off only at scale because you need enough traffic to keep both pools full. From Splitwise (ISCA'24) / DistServe (OSDI'24); the large-scale standard since 2025 (NVIDIA Dynamo / llm-d).

冗余专家 · Redundant Experts

See System Design Chapter 06

In MoE expert-parallel deployments, duplicate high-load (hot) experts across multiple GPUs so the GPU holding a hot expert doesn't become the all-to-all straggler that stalls the whole step. DeepSeek-V3's decode deployment dedicates ~64 GPUs to redundant + shared experts. The companion EPLB (Expert Parallelism Load Balancer, open-sourced by DeepSeek in 2025) computes a replication + placement plan from estimated expert loads and rebalances dynamically (a hierarchical policy for prefill, a global one for decode).

自动扩缩 · Autoscaling

See System Design Chapter 06

Dynamically adjusting the number of serving replicas to match load. The LLM-serving twist: a new replica must first load tens-to-hundreds of GB of weights into VRAM, so cold start is measured in minutes (versus seconds for stateless web services) and doesn't fit inside one autoscaler cycle, forcing pre-provisioned warm headroom (at a multiple of GPU spend). Capacity's real unit isn't QPS but the KV-cache memory budget — how much concurrency × context fits in the VRAM left after weights load.

vLLM's signature mechanism (SOSP'23): split the KV cache into fixed-size blocks (16 tokens by default) and use a block table to map logical blocks to physical blocks scattered in GPU memory, like OS virtual-memory paging — logically contiguous, physically scattered, nearly eliminating fragmentation (the paper reports naive allocation's effective memory can be as low as ~20%), with prefix sharing (ref-counting + copy-on-write). In today's vLLM V1, paging lives in core while attention compute is in pluggable backends (FlashAttention / FlashInfer); the classic standalone CUDA kernel is a fallback path.

块表 · Block Table

See System Design Chapter 07

A per-sequence 'logical block → physical block' mapping — the core data structure of paged KV-cache management: it lets a sequence be logically contiguous yet physically scattered across GPU memory. In vLLM's code it corresponds to KVCacheBlock (physical block_id + ref_cnt + content hash); analogous to an OS page table.

Roofline · 屋顶线模型

See System Design Chapter 08

A visual model (Williams et al., CACM 2009) for locating a computation's bottleneck. X-axis is arithmetic intensity (FLOPs/byte), y-axis is attainable speed; the flat roof is peak compute, the slanted roof is bandwidth × intensity, and attainable speed is the lower of the two. The ridge point where they meet sits at peak-compute ÷ bandwidth. Left of the ridge = memory-bound; right = compute-bound. In LLM inference, decode lands left, prefill right.

算术强度 · Arithmetic Intensity

See System Design Chapter 08

How many floating-point ops a computation does per byte read from memory (FLOPs/byte) — the x-coordinate on the roofline. Whether it sits above or below the card's ridge value (peak compute ÷ bandwidth) decides whether the workload is compute- or memory-bound. Single-sequence LLM decode is ≈1 (reads 2N bytes of weights for only 2N ops, independent of model size); prefill is far higher because it processes a large batch of tokens in one parallel pass. Batching raises decode's intensity toward the batch size, but KV-cache reads don't amortize.

MFU · 模型浮点运算利用率

See System Design Chapter 08

Model FLOPs Utilization: measured model-required FLOP/s ÷ hardware peak FLOP/s. It counts only the math the model definition requires (not recompute or implementation tricks), so it's comparable across systems and hardware; from the PaLM paper (2022). Handy conversion: ~2N FLOPs per token for inference / 6N for training (N = #params). Frontier training is commonly 35–55% (PaLM's benchmark 46.2%); for memory-bound decode, MFU is intrinsically low — use MBU (bandwidth utilization) instead.

Profiling · 性能剖析

See System Design Chapter 08

Recording a real run to see where time and data actually go, instead of guessing the bottleneck — the operational form of the rule 'never optimize what you haven't measured.' The loop: measure → place on the roofline to read which roof binds → optimize the binding constraint → re-measure. Common tools: PyTorch Profiler (exports a trace viewed in chrome://tracing / Perfetto), NVIDIA Nsight Systems (whole-timeline), Nsight Compute (per-kernel, with a built-in roofline chart). DeepSeek's profile-data repo is a public example of real traces.

量化 · Quantization

See System Design Chapter 09

Representing weights/activations in fewer bits to save memory, raise arithmetic intensity in the memory-bound phase, and use faster low-precision compute units. Two axes: post-training quantization (PTQ — calibration only, the common serving path) vs quantization-aware training (QAT — simulated during training, steadier at very low bits); weight-only (GPTQ/AWQ — cuts memory traffic, helps decode) vs weight+activation (SmoothQuant migrates activation outliers into weights to unlock low-precision math). Scaling granularity ranges from per-tensor to per-block (microscaling); finer is more accurate.

混合精度 · Mixed Precision

See System Design Chapter 09

Rather than quantizing the whole model uniformly, push the bulk matrix multiplications (GEMMs — the vast majority of compute) to low precision while keeping a few low-FLOP but highly sensitive components in high precision. DeepSeek-V3 第 3.3 节's 'do-not-quantize' list is the template: embeddings, output head, MoE gating, normalization, attention — plus master weights/gradients/optimizer states. Intuition: quantize the bulk for throughput, protect the delicate machinery so errors don't poison everything.

FP8 · 8 比特浮点

See System Design Chapter 09

8-bit floating point, the current production-precision workhorse (hardware-native since Hopper). Two standard variants: E4M3 (4 exponent, 3 mantissa bits; range ±448; precision-favoring; for weights/activations) and E5M2 (5 exponent, 2 mantissa; range-favoring; for gradients). Versus INT8's uniform spacing, FP8's logarithmic spacing better tolerates outliers in LLM activations. Quantizing the KV cache to FP8 roughly doubles context/concurrency at equal VRAM.

微缩放 · Microscaling

See System Design Chapter 09

The trick that makes 4-bit usable: a small block of contiguous numbers shares one scale factor — each element is stored as a coarse 4-bit value, then multiplied by the block's scale to recover its true magnitude, so the 4-bit grid needn't span the whole tensor's outliers. Two production formats: NVFP4 (blocks of 16, an FP8 scale that can take fractional multiples, plus an FP32 tensor-level scale) is more accurate than MXFP4 (blocks of 32, power-of-two-only scale), and is the frontier format native to 2026 Blackwell hardware.

SLO · SLI · 错误预算

See System Design Chapter 10

The language that turns reliability into a measurable target. An SLI (indicator) is what you actually measure, from the user's view, with latency as a percentile (p95/p99) not a mean; an SLO (objective) is your internal target (e.g. 99.9% over 30 days); an SLA (agreement) is the legal promise to customers with penalties. Error budget = 1 − SLO (99.9% ≈ 43.2 minutes of downtime per month), treated as a budget to spend: ship fast while it lasts, freeze and harden when it's gone, and alert on its burn rate, not instantaneous dips.

请求对冲 · Request Hedging

See System Design Chapter 10

A weapon against tail latency: if a request exceeds, say, its p95 expected latency without returning, fire an identical one to another replica and take whichever finishes first (tied requests have the first to start executing cancel the other). From Google's 'The Tail at Scale' — in a large fan-out system, rare per-server slowness becomes near-universal per-request slowness; measured across 100 servers, hedging after a 10ms delay cut p99.9 from 1800ms to 74ms while sending only ~2% more requests.

3FS · KVCache-as-storage

See System Design Chapter 10

DeepSeek's open-source distributed file system (Fire-Flyer FS): it aggregates the bandwidth of thousands of NVMe SSDs across hundreds of nodes into one shared store, reaching ~6.6 TiB/s aggregate read on 180 nodes. Strong consistency via CRAQ (Chain Replication with Apportioned Queries) — writes traverse the full chain (bounded by the slowest node), reads hit any replica; metadata is stateless, on FoundationDB. Its key serving use is offloading the KV cache to it (~40 GiB/s per client), adding a memory tier for KV that is cheaper and far larger than DRAM.

成本经济学 · Cost-to-Serve

See System Design Chapter 10

The cost structure of serving a model. GPUs burn money by the hour (in 2026 a supply crunch even pushed prices back up and sold out capacity, so the binding constraint is often availability). Output tokens cost 5–6× input, consistently across vendors — because input is prefill (compute-bound) and output is decode (memory-bound); the FLOPs are nearly equal, so the premium is all memory traffic ('decode is memory-bound' printed on the invoice). The top cost lever is prompt caching (cached input ~10% of price); agents use ~4× and multi-agent ~15× the tokens.

Agent Fleet · 把 agent 当服务运营

See System Design Chapter 11

Operating thousands of agent sessions as a production service at scale — the intersection of #2's distributed infra and #8's agent semantics. The new wall: one harness running ≠ tens of thousands of concurrent sessions being operable, because an agent session's shape (long-lived minutes-to-hours / stateful / side-effecting and hard to retry / must survive deploys) is the opposite of a stateless web request. This topic covers only the distributed/ops face at scale; single-harness internals (loop / context / tools / single sandbox / single-agent durability) belong to Agent Engineering (#8).

编排 Backplane · 控制面/数据面

See System Design Chapter 11

The infrastructure for operating agent sessions, borrowing networking's control-plane/data-plane split: the control plane decides routing, scheduling, quota policy, and who owns a session's state; the data plane executes the agent and its tool calls. Separating them lets you change routing/policy without touching running agents. A reverse proxy's stateless assumptions break for long-lived stateful sessions; state is layered user→session→run (the session is the isolation boundary). Pitfalls: don't use the user ID as the session key, and don't treat worker-local memory as the source of truth.

Sandbox Fleet · sandbox-as-a-fleet

See System Design Chapter 11

The distributed infrastructure that schedules and recycles tens of thousands of isolated execution sandboxes (what a single sandbox is, and how to pick an isolation tier, is in #8 Ch4). The central knob is idle-reaping vs cold-start: reaping saves money but makes the next request wait seconds. The 2026 winning approach is snapshot-to-standby (snapshot a configured sandbox, suspend it, resume near-instantly) plus active-CPU billing plus a warm pool sized against arrival rate. The at-scale security practice: one microVM per session, memory wiped on teardown.

多租户网关 · Multi-tenant Gateway

See System Design Chapter 11

The gateway that meters, rate-limits, and routes agent traffic across tenants safely. The key correction: rate-limiting by request count is the wrong primitive (a 10k-token call and a 50-token call both count as 'one request'); meter by tokens (per minute/day, input and output separately). A 'tenant × workload × model' bucket key does rate-limiting + cost ledger + audit at once; quotas cascade org→team→user→virtual-key; a virtual key is the tenant isolation boundary, returning 429 on quota (which agent frameworks read as backoff). Cross-tenant prefix-cache sharing creates a timing side-channel, mitigated by per-tenant namespace hashing.

判断力 lens · 四维取舍

See System Design Chapter 12

The four-axis trade-off lens for designing a serving system: latency × throughput × cost × reliability. The four pull on each other and there is no free knob — batching raises throughput but raises latency, lowering precision raises throughput but risks correctness, PD-disaggregation pays off only at scale, adding replicas raises reliability but doubles cost (even capacity is fundamentally a KV-cache memory budget). Judgment is not memorizing which trick is best, but asking 'in this scenario, which of the four matters most, and which will I trade away for which'.

能耗墙 · Power Wall

See System Design Chapter 12

By 2026 the #1 binding constraint on AI systems shifted from compute to power: what decides whether AI can be deployed is grid-interconnection capacity, not chips, capital, or algorithms (WEF 2026). The bottleneck isn't even generation but equipment and queues — high-voltage transformer lead times stretched from ~2 to ~5 years, electrical gear is under 10% of datacenter cost yet 100% of the bottleneck, and capacity prices rose 10×+ in two years. Together with the memory wall (Patterson: 'the bottleneck is memory and interconnect, not compute') it marks the shift from chasing FLOPs to chasing power and memory bandwidth.

Agent Loop

Agent · 智能体

See Foundations Chapter 04

A software system that autonomously decides next actions based on goal, context, tools, and state.

Agent Loop · Agent 循环

See Foundations Chapter 04

Model reasoning → tool call → result feedback → reasoning → repeat until done. The Agent's core execution loop.

① 模型推理决定下一步② 调用工具执行动作③ 观测回填结果进 contextactobs带着新观测再推理 —— 这就是「循环」完成? → 退出每轮先判终止
模型推理 → 调用工具 → 把结果回填进 context → 再推理,直到每轮的终止判断说「完成」才退出 · 这个循环就是 agent 的核心(能停是硬要求 · #8 Ch2)

Trajectory · 执行轨迹

See Agent Engineering Chapter 09

The complete record of an Agent's run — every call, result, error, and output. It is the basic object of agent evaluation and diagnosis (see Ch9 trajectory eval).

The strong model in the planner-executor pattern that decomposes a task into a multi-step plan; a cheap executor runs each step. Cost logic: the strong model is only called for (re)planning. Pitfalls: too-coarse plans → executor hallucination, too-fine → token bloat; set a re-planning cap (see Ch2).

The (usually cheap/weak) model that executes single steps and calls tools in the planner-executor pattern. Honest caveat: in mature-harness tests, a strong planner + cheap executor often loses on quality to a single frontier model → letting the model decide when to delegate beats hand-fixed mixing.

Guardrail · 护栏

Belongs to #8 Agent Engineering (TBD)

Rules that constrain Agent behavior — permissions, safety, approval gates, output limits.

Control Loop · 控制循环

See Foundations Chapter 04

Observe state → decide action → execute → update state → repeat. Classic control-theory pattern; Agent Loop is its LLM instance.

Event Loop · 事件循环

See Foundations Chapter 06

Loop mechanism that continuously waits for and processes events; common in UI, browser, Node.js. The async implementation underlying LLM agents runs on top of one.

Termination · 终止条件

See Foundations Chapter 04

Conditions that stop the Agent Loop — task complete / max iterations / timeout / failure / user interrupt / cost cap.

Max Iterations · 最大迭代次数

See Foundations Chapter 04

Cap on agent loop iterations; prevents infinite loops and cost blowups. Required in production.

Resource limits during an agent run — token, time, tool calls, API cost. Required in production.

Observation · 观察结果

See Foundations Chapter 04

The result returned to the model after a tool call. Third step of ReAct's think-act-observe loop.

An external behavior the Agent decides to execute — search, read file, write code, call API.

Reflection · 反思

Belongs to #8 Agent Engineering (TBD)

Have the model inspect its own process or result — for correction, summarization, deciding whether to continue. Foundation of self-correction.

Self-Correction · 自我修正

Belongs to #8 Agent Engineering (TBD)

Agent modifies its plan or output based on error feedback — application of reflection.

Model + Harness = Agent · 命题

See Agent Engineering Chapter 01

The roadmap's central thesis: an agent's capability = model capability × the quality of the harness around it. The harness is a layer co-equal with the model — the same model under a different harness can score multiples higher.

Harness · 智能体马具

See Agent Engineering Chapter 02

The engineering layer wrapped around a model that makes it reliably do work — loop, tools, termination, recovery, context. Agent ≈ model × harness quality.

Done Tool · 完成工具

See Agent Engineering Chapter 02

A dedicated no-op tool the model calls to signal 'I'm done', stopping the loop cleanly — more reliable than waiting for the model to stop on its own.

Circuit Breaker · 熔断器

See Agent Engineering Chapter 02

A deterministic kill-switch — N steps / $X / K consecutive errors trips it and terminates the whole run, preventing runaway cost.

Reasoning State · 推理状态

See Agent Engineering Chapter 02

The private reasoning a reasoning-model produces before answering. The harness must carry it across tool calls, or cache breaks and the model degrades.

Thinking Block · 思考块

See Agent Engineering Chapter 02

Anthropic's carrier for reasoning state. In a tool-use loop it must be passed back unmodified on the prior assistant message, or the API errors.

Goal Drift · 目标漂移

See Agent Engineering Chapter 10

With no single step failing, each step's immediate context gradually overrides the original intent and the task as a whole goes off course ('fix a bug' becomes a big refactor five steps later). A classic emergent failure.

Runaway Loop · 失控循环

See Agent Engineering Chapter 10

The agent won't stop, repeating the same action and burning tokens without delivering; rooted in the lack of a clean termination signal plus reasoning models' looping tendency. The opposite pole, same root, as premature termination. Mechanism fix in Ch2.

Premature Termination · 过早终止

See Agent Engineering Chapter 10

The agent declares done on partial progress, marks a feature complete without testing. Same root as the runaway loop — the agent can't reliably assess whether the task is actually finished.

Error Cascade · 错误级联

See Agent Engineering Chapter 10

One step's error (e.g. a tool error summarized as if it were a result) silently poisons every later step; rooted in tool returns that don't structurally separate success from failure. Amplified in multi-agent settings (A's dirty output enters B's context as fact).

Sycophancy · 谄媚 / 社会锚定

See Agent Engineering Chapter 10

The moment a user expresses disagreement, the agent changes a correct answer to a wrong one, even with no new facts. Its training-level root (preference for what users like to hear) belongs to post-training (#6); this chapter teaches recognizing it in a trajectory.

Tool Use

Function Calling · 函数调用

See Foundations Chapter 03

Model outputs structured function name + arguments; an external program actually runs the function.

Tool Schema · 工具模式

See Foundations Chapter 03

Structured spec describing a tool's parameter format, field types, required fields, and constraints.

MCP · Model Context Protocol

See Foundations Chapter 03

Standardized protocol between LLMs and tools/data sources. Supported by major AI hosts (Claude, Cursor, Codex) in 2026.

没有 MCPhosthosthost工具工具工具M × N = 9 条有 MCPhosthosthost工具工具工具MCP标准层M + N = 6 条
没有统一协议时,M 个 AI host 要各自对接 N 个工具/数据源 = M×N 条各写各的集成(左,缠成一团)· MCP 当中间标准层,降到 M+N 条(右):每个工具实现一次 MCP,就被所有 host 复用

Rate Limit · 速率限制

See Foundations Chapter 05

Limit on calls per unit time, common for APIs and model services. HTTP 429 maps to it.

Argument · 参数

See Foundations Chapter 03

Data passed when calling a tool or function. The input_schema in a tool schema defines each argument's type + constraints.

Validation · 校验

See Foundations Chapter 03

Verify that arguments, results, or outputs match schema, rules, and business requirements. LLM outputs must be validated (models occasionally produce invalid JSON).

Tool Registry · 工具注册表

Belongs to #8 Agent Engineering (TBD)

Central record of available tools — name, description, schema, handler, permissions.

Tool Handler · 工具处理器

See Foundations Chapter 03

The function or module that actually executes a tool. Handler is the implementation; schema is its interface.

Tool Result · 工具结果

See Foundations Chapter 03

Output returned by a tool, fed back into the prompt as a tool_result block in the next loop iteration.

Tool Error · 工具错误

See Foundations Chapter 03

Error returned when a tool fails — permission denied, bad arguments, network timeout. Must be propagated back to the LLM so it can adapt.

Try again after a tool failure. Must classify (retryable vs not) + use backoff + jitter + cap max retries.

Permission · 权限

Belongs to #8 Agent Engineering (TBD)

Controls whether the Agent can invoke a tool or perform an action. High-stakes tools (send email, delete file, payment) must be gated.

Human-in-the-loop · 人类介入

Belongs to #8 Agent Engineering (TBD)

Require user confirmation before high-risk actions — send email, delete file, payment, publish. HITL is the last line of agent safety.

ACI · Agent-Computer Interface

See Agent Engineering Chapter 03

An interface designed for the model as a new class of user (tool naming / returns / UI actions). Invest in it like HCI — the same model on a better ACI can score multiples higher.

Tool Consolidation · 工具合并

See Agent Engineering Chapter 03

Folding the multiple steps of a workflow into one tool (e.g. schedule_event) instead of mapping every API endpoint 1:1. More tools ≠ better.

Structured Outputs · 结构化输出

See Agent Engineering Chapter 03

Hand the schema to the API and the model is constrained at the decode layer — it physically cannot emit tokens that violate the schema. Unlike JSON mode, which only asks then you validate.

Code Execution as Tool · 代码即工具

See Agent Engineering Chapter 03

Present tools as a code API and let the model write code to orchestrate them instead of calling each directly — cuts both tool-definition and intermediate-result token cost by 1-2 orders of magnitude.

Set-of-Mark · 标记截图

See Agent Engineering Chapter 03

Overlaying numbered boxes on interactive elements in a screenshot fed to the model. Expensive (hundreds of tokens per shot) but works on almost any UI. One observation format for GUI agents.

Accessibility Tree · 无障碍树

See Agent Engineering Chapter 03

Representing a UI by the browser's semantic tree (role / name / state) fed to the model. Far cheaper than screenshots, but depends on site markup quality (most sites are messy in practice).

Agent Skills · SKILL.md + 渐进披露

See Agent Engineering Chapter 07

A skill = a directory + `SKILL.md` (YAML name/desc + body). Three-level progressive disclosure: name resident at startup → body loaded when relevant → attachments explored on demand. Shares the 'load on demand' mechanism with Ch6. An open cross-platform standard as of 2025.

渐进披露 ↓① name + 一句话描述启动即常驻 · 每轮 ambient② SKILL.md 正文判定相关时才载入③ 附件 / 脚本 / 资源用到才按需深挖
一个 skill = 一个目录 + SKILL.md(YAML name/desc + 正文)· 三级渐进披露:name 启动即常驻 → 相关时才载入正文 → 附件 / 脚本按需深挖 · 与 context engineering 共享「load on demand」省 context

State & Memory

Information the system needs to remember at a given moment — task progress, tools called, current context summary.

Stateless · 无状态

See Foundations Chapter 05

System doesn't remember prior requests; each request is independent. LLM APIs are stateless.

Stateless 无状态 · 每次从零请求 1请求 2请求 3彼此独立,不记得上一次Stateful 有状态 · 状态累积请求 1请求 2请求 3状态在请求间传递,连续推进
无状态:每次请求独立、不记得上一次(LLM API 本身就是)· 有状态:状态在请求间累积、可连续推进任务 · memory engineering 就是在 stateless API 之上造出 stateful

Stateful · 有状态

See Foundations Chapter 05

System retains process information; can progress a task continuously.

Stateless 无状态 · 每次从零请求 1请求 2请求 3彼此独立,不记得上一次Stateful 有状态 · 状态累积请求 1请求 2请求 3状态在请求间传递,连续推进
无状态:每次请求独立、不记得上一次(LLM API 本身就是)· 有状态:状态在请求间累积、可连续推进任务 · memory engineering 就是在 stateless API 之上造出 stateful

Agent's ability to save + reuse historical information. Primitive vocab in Ch 04; production engineering in #8.

Short-term Memory · 短期记忆

See Foundations Chapter 04

Information in the current context window; directly participates in model reasoning.

Long-term Memory · 长期记忆

See Agent Engineering Chapter 07

Persistent storage outside the model's window (files / DB / vector store / graph) that survives across steps, sessions, and tasks — vs the volatile in-window working memory (Ch6). MemGPT's virtual-memory metaphor: context = RAM, external = disk, the agent pages between them with tools.

Context Window = RAMworking / short-term · 快 · 小 · 易失外部存储 = Disklong-term:文件 / DB / 向量库 / 图谱 · 慢 · 大 · 持久写出读入用工具分页
MemGPT 虚拟内存隐喻:context window = RAM(快 / 小 / 易失,放 working memory),外部存储 = disk(慢 / 大 / 持久,放 long-term:文件 / DB / 向量库 / 图谱)· agent 用工具在两层间分页

Episodic Memory · 情节记忆

See Agent Engineering Chapter 07

Memory of "what happened" — past trajectories / conversation history, kept in recall storage and retrieved by relevance + recency. Reflexion's reflection buffer is its engineering form (storing verbal lessons from failed trajectories for the next retry).

Semantic Memory · 语义记忆

See Agent Engineering Chapter 07

Memory of stable knowledge and facts — user preferences / project constraints / world knowledge, kept in a structured store or knowledge graph (e.g. Zep's temporal graph, which understands state changes rather than coexisting facts).

Working Memory · 工作记忆

See Foundations Chapter 04

The most important information in the current task. Usually placed at the top of the context window / start of the system prompt.

Memory Store · 记忆存储

See Agent Engineering Chapter 07

Where memory is persisted — the five memory types map to three storage forms: vector / key-value-or-file / knowledge graph. Choice trades integration speed against architectural depth (mem0 fast-shallow · Letta deep-managed · Zep/Cognee graph-structured).

Persistence · 持久化

See Foundations Chapter 05

Save data so it survives program restarts. LLM system state must be persisted (else users lose history on reconnect).

Checkpoint · 检查点

Belongs to #8 Agent Engineering (TBD)

A save point during execution — used for failure recovery, resume, and rollback. Required for long-running agents.

Context unit covering one continuous interaction or task. A session ID ties multiple LLM calls together.

Memory Ops · 记忆四操作

See Agent Engineering Chapter 07

The four verbs of any memory system: write (when to record — not everything; at milestones or model-judged), read (on-demand recall scored by recency·importance·relevance, originating with Generative Agents), update (handle staleness + state-change conflicts), forget/compress (dedup & summarize, wary of over-compression's 'lobotomy').

Procedural Memory · 过程记忆

See Agent Engineering Chapter 07

Know-how — i.e. Skills. Distilling reusable multi-step workflows into callable procedural knowledge; ProcMEM turns passive episodic narratives into executable skills with activation/execution/termination conditions (no parameter updates).

Sleep-time Compute · 睡眠期计算

See Agent Engineering Chapter 07

Letta: split the agent in two — a primary agent that only converses and searches external store, and a sleep-time agent that asynchronously tidies memory during idle turns (consolidating archives / rewriting messy blocks / summarizing recent dialogue). Keeps conversation un-slowed + proactively refined. 'The agent does chores while idle.'

CLAUDE.md / AGENTS.md auto-memory

See Agent Engineering Chapter 07

The everyman version of self-improvement: a markdown read at the start of each session, written back as you learn — read→work→learn→update→start-better, a compounding loop (the plainest form of the Reflexion loop). Honest failures: bloat (blowing up context) / staleness (stale architecture left in) / instruction dilution → memory must self-govern.

Context Engineering

Context · 上下文

See Foundations Chapter 03

Everything the model can see right now — system prompt + conversation + tool results + files + retrieved snippets.

System Prompt · 系统提示

See Foundations Chapter 03

High-priority instructions defining model role, behavior bounds, safety rules, output requirements.

Developer Prompt · 开发者提示

See Foundations Chapter 03

Behavior instruction set by the application developer; higher priority than user input, lower than system prompt.

Prompt Template · 提示模板

See Foundations Chapter 03

A reusable prompt structure with variable slots filled in at runtime. Production prompts are almost always templated.

Context Compression · 上下文压缩

Belongs to #8 Agent Engineering (TBD)

Compress long context into a short summary; saves tokens while preserving key info. A core action in the Context Engineering sub-discipline.

Summarization · 摘要

Belongs to #8 Agent Engineering (TBD)

Boil long content down to short content — a common technique for context compression.

Distillation · 提炼

Belongs to #8 Agent Engineering (TBD)

Extract refined, more usable knowledge or rules from complex content. More structured than summarization.

Instruction Hierarchy · 指令层级

Belongs to #8 Agent Engineering (TBD)

Priority order across instruction sources — system > developer > user > web/tool content. A key LLM safety design.

优先级System prompt平台 / 安全规则 · 最高Developer prompt应用开发者设定User input终端用户的话工具 / 网页返回内容不可信 · 提示注入从这进
指令优先级从高到低:system > developer > user > 工具/网页内容 · 冲突时高层压低层 · 最底层是不可信的外部内容 —— 提示注入正是想把自己伪装成更高层的指令(LLM 安全的关键设计)

Context Ceiling · 上下文天花板

See Agent Engineering Chapter 12

An agent's (not a pure reasoning model's) performance peaks between 3 and 7 turns; beyond that, accumulated external state (tool outputs / failed attempts / environment responses) becomes contradictory or overwhelming and results actively degrade. Same root as context rot — more is not better; stacking sequential reasoning has a ceiling for agents.

Context Engineering · 上下文工程

See Agent Engineering Chapter 06

The set of strategies for curating and maintaining the optimal token set at each step (Anthropic). Karpathy's analogy: the context window is the agent's RAM and the model is the CPU, so this is OS-level scheduling of what to load into RAM. Principle: find the smallest high-signal token set.

Context Rot · 上下文腐化

See Agent Engineering Chapter 06

Passive degradation: the more input tokens, the worse the model recalls/reasons, even when the task isn't harder. Root cause: n² attention stretched thin + short-sequence-heavy training. Consequence: the claimed window far exceeds the effective window (NoLiMa: most models drop below half baseline by 32K).

召回 / 推理准确率50% 基线更多 token ≠ 更好context 长度(token)→
被动退化:输入 token 越多,准确召回 / 推理越差,即使任务没变难(根因 n² attention 被摊薄)· 后果:声称的 window ≫ 有效 window(NoLiMa:32K 时多数模型已掉到基线一半以下)

Lost in the Middle · 迷失在中间

See Agent Engineering Chapter 06

Position bias: information at the start or end of context is recalled best, the middle much worse — a U-shaped curve (Liu 2023, mirroring the serial-position effect). Newer models mitigate it on simple tasks but complex long tasks still suffer. Fix: recite key info to the end (the high-attention zone).

召回准确率首尾:召回高中间:显著下降开头中间结尾
相关信息放 context 首尾,召回最好;放中间显著下降,性能呈 U 形(Liu 2023 · 对应心理学首因 / 近因效应)· 对策:把关键信息复述到末尾(attention 高区)

Context Collapse · 上下文坍缩

See Agent Engineering Chapter 06

Active degradation: repeatedly rewriting/compressing context loses a little detail each time, eroding cumulatively (named by ACE). Comes with brevity bias (dropping domain insight for concision). Orthogonal to context rot. Fix: reversible + incremental delta updates, not monolithic rewrites; keep key constraints elsewhere.

KV-cache · 前缀缓存

See System Design Chapter 04

During decode, the Key and Value computed for each token are stored and reused, cutting each step's work from recomputing the whole history to computing just one new token. The cost is a cache that grows linearly with context length and dominates GPU memory — serving's capacity constraint is fundamentally about it (first principles in #2 Ch4). A high-leverage derived use: a shared prefix can be reused across requests (prefix caching), hitting at ~1/10 the price of a miss and sharply cutting time-to-first-token — the top cost lever for agents and multi-turn chat, with the disciplines of a stable prefix (no timestamps), append-only history, and explicit cache breakpoints (see #8 Ch6).

四个 context 策略 · Write/Select/Compress/Isolate

See Agent Engineering Chapter 06

Four directions for managing the context RAM (LangChain's canonical skeleton): Write out of the window (scratchpad/memory), Select in on demand, Compress to essentials (lossy), Isolate across sub-agents' own windows. Each treats one ailment: poisoning / distraction / confusion / clash (Breunig).

Write 写到窗外scratchpad / memorySelect 按需选进JIT 检索 · 用时才拉Compress 压缩摘要留必要(有损)Isolate 隔离拆给子 agent 各自的窗
管 context 这块 RAM 的四个方向(LangChain):Write 写到窗外 · Select 按需选进 · Compress 压缩留要 · Isolate 拆给子 agent · 各治一种 context 病(中毒 / 分心 / 混淆 / 冲突)

Just-in-Time Retrieval · 按需检索

See Agent Engineering Chapter 06

The core pattern of the Select strategy: don't preload — keep lightweight identifiers (file paths / URLs / queries) and pull with a tool only when the current step truly needs it. Mirrors human cognition — you don't memorize the whole filesystem. Claude Code doesn't load the whole codebase, it explores files on demand.

Compaction · 压缩重开窗口

See Agent Engineering Chapter 06

Summarize a conversation nearing the limit and reinitialize a new window from the summary (Anthropic) — the first lever for long-task coherence. Tuning: maximize recall first, then precision. Lossy (collapse risk) → keep key constraints in CLAUDE.md. Three takes: encrypted (Codex) / human-readable (Claude Code) / model-decided (OpenCode).

Offload · 卸载到窗外

See Agent Engineering Chapter 06

Write large, re-readable, not-immediately-needed content (web pages / logs / PDFs / big tool outputs) to a file, keeping only a pointer in context. Lossless (the original stays on disk), so preferred over lossy compaction. 'Offload before you compact; isolate before you let it into the main window.'

Dynamic Context Budget · 动态预算

See Agent Engineering Chapter 06

Treat the window as a budget scheduled at runtime: allocation (four consumers — system+tools / history / retrieved / scratchpad — compete; stable goes first, goals go last), eviction (who gets swapped out; LRU (least-recently-used)/hot-tail; eviction ≠ deletion but moving to a recallable external), thresholds (percentage / absolute tokens / task boundary).

← 稳定放前 · 目标放末 →系统+工具对话历史检索资料草稿区满了 → 按 LRU 驱逐:换出到可召回外部,非删除
把 window 当固定预算做运行时调度:4 个消费者(系统+工具 / 历史 / 检索 / 草稿区)互挤一条带 · 稳定的放前、目标放末 · 满了按 LRU(最近最少用)驱逐 —— 换出到可召回的外部,不是删除

Observation Engineering · 观测工程

See Agent Engineering Chapter 06

The input side of context engineering: what representation of each step's perceived environment to feed into context (not perception quality = #7, but 'what tokens to feed'). Techniques: tool-result truncation / cite-don't-dump / structured over prose / fidelity of error observations. A bad representation manufactures context rot at the source.

Signal-to-Noise · 信噪比 > 总量

See Agent Engineering Chapter 06

The principle running through context engineering: the signal-to-noise ratio of relevant information matters more than total volume. The Five Sigma case — curated, schema-ized relevant data exceeds 95% accuracy, while dumping the whole document corpus is far lower. In short: feeding everything is not feeding the right thing.

RAG / Retrieval

RAG · 检索增强生成

See Foundations Chapter 03

Retrieval-Augmented Generation — retrieve relevant material, then generate based on it.

问题Query知识库检索相关片段增强后的 prompt问题 + 检索资料生成答案基于资料 · 有出处检索增强生成
先检索(从知识库取回与问题相关的片段),把片段和原问题一起拼进 prompt(增强),再让模型基于这些资料生成答案 —— 答案有出处、更少幻觉,这就是 RAG

Embedding · 嵌入

See Foundations Chapter 03

Compress text into a fixed-dimension vector (commonly 1536); similar meanings produce close vectors.

向量空间 · 1536 维 → 2D 投影宠物意思相近 → 距离近股票意思远 → 距离远
把文本压成固定维度的向量(常 1536 维)· 意思相近的词在向量空间里挤成一团(猫 / 狗 / 宠物),意思远的落在另一边(股票)—— 语义检索就是在量这个距离

Vector Database · 向量数据库

See Foundations Chapter 03

Database specialized for storing + searching vectors — Pinecone, Weaviate, Chroma, Milvus, Qdrant.

A small piece resulting from splitting a long document; used for embedding and retrieval.

Reranking · 重排序

Belongs to #3 Data Engineering (TBD)

Re-sort retrieved results using a stronger model or algorithm. Not taught in foundations — see #3.

Chunking · 分块

See Foundations Chapter 03

The process of splitting a long document into chunks. Bad chunking tanks retrieval quality.

Recall · 召回率

Belongs to #3 Data Engineering (TBD)

Whether relevant content is retrieved at all. One of two retrieval-quality metrics (the other is precision).

相关检索到FN命中TP误召FPRecall 召回 = 命中 / 全部相关找全了吗 · 相关的有没有漏Precision 精确 = 命中 / 全部检索找准了吗 · 检索的对不对
相关(该被找到的)与检索到(实际找到的)两个集合,交集=命中 · Recall 召回=命中/全部相关(找全了吗),Precision 精确=命中/全部检索(找准了吗)· 两者通常此消彼长

Precision · 精确率

Belongs to #3 Data Engineering (TBD)

Whether retrieved content is actually relevant. Typically trades off against recall.

相关检索到FN命中TP误召FPRecall 召回 = 命中 / 全部相关找全了吗 · 相关的有没有漏Precision 精确 = 命中 / 全部检索找准了吗 · 检索的对不对
相关(该被找到的)与检索到(实际找到的)两个集合,交集=命中 · Recall 召回=命中/全部相关(找全了吗),Precision 精确=命中/全部检索(找准了吗)· 两者通常此消彼长

Index · 索引

Belongs to #3 Data Engineering (TBD)

A data structure built for fast retrieval. Vector DBs use HNSW / IVF / etc. index types.

Metadata · 元数据

See Foundations Chapter 03

Data about data — filename, page, section, timestamp, permission tags. Used as retrieval filters.

Citation · 引用

See Foundations Chapter 03

Show where an answer came from for verification and traceability. A core production feature of RAG systems.

Workflow & Multi-Agent

Workflow · 工作流

Belongs to #8 Agent Engineering (TBD)

An explicit chain of task steps. Production workflow orchestration belongs in #8.

DAG · 有向无环图

Belongs to #8 Agent Engineering (TBD)

Directed Acyclic Graph — represents task dependencies; common in workflow orchestration.

ABCDE箭头只朝前 → 无环 → 总能排出执行顺序
有向无环图:节点是任务,箭头 A→B 表示「A 必须先于 B」· 箭头只朝前、不回头 = 无环 = 依赖关系总能排出一个执行顺序(拓扑排序)· 工作流编排的底层结构

Router · 路由器

Belongs to #8 Agent Engineering (TBD)

Dispatch requests to the right module, tool, or Agent based on task type.

Supervisor · 监督 Agent

Belongs to #8 Agent Engineering (TBD)

Higher-level Agent that manages other Agents.

Sub-Agent · 子 Agent

See Foundations Chapter 04

A specialized Agent invoked by a main Agent. Vocabulary only in foundations; production design in #8.

An encapsulated capability bundle — includes description, applicability, tools, constraints, execution flow.

State Machine · 状态机

Belongs to #8 Agent Engineering (TBD)

Control flow using explicit states + transitions — e.g., Draft → Review → Approved → Published.

Draft草稿Review评审中Approved已批准Published已发布评审不过 · 驳回
用明确状态 + 转移规则控制流程:Draft → Review → Approved → Published,评审不过则驳回回 Draft · 每个转移都是受控、可审计的 —— 把「接下来能去哪」写死,比放任 agent 自由发挥更可控

Node · 节点

Belongs to #8 Agent Engineering (TBD)

A processing unit in a workflow or graph.

Edge · 边

Belongs to #8 Agent Engineering (TBD)

Path, dependency, or transition between nodes.

Dispatcher · 分发器

Belongs to #8 Agent Engineering (TBD)

Dispatches requests, events, or tasks to the matching handler or worker.

A main agent assigns a task to a subagent. Delegation engineering (Anthropic): each subagent must get an objective + output format + tool guidance + clear boundaries; effort-scaling writes 'how many agents' into the budget (simple 1 / comparison 2-4 / complex 10+). Fixing shared assumptions upfront engineers away the parallel conflicts Cognition warned about.

The core primitive of decentralized topologies: a function returning 'another agent'; calling it transfers control plus the full current conversation history to the target → context stays continuous. The design axis is how much state to pass (full / filtered / structured payload): too much is costly + noisy, too little loses consistency.

Skill Registry · 技能注册表

Belongs to #8 Agent Engineering (TBD)

Registry of available skills. Loaded at Agent runtime startup.

Capability · 能力

Belongs to #8 Agent Engineering (TBD)

What the system can do — search, write code, read file, generate image, query DB. Capability is a more abstract description than skill or tool.

Policy · 策略

Belongs to #8 Agent Engineering (TBD)

Rules that guide system decisions — when to call a tool, when to require confirmation, when to stop.

The agent-to-agent protocol (vs MCP's agent-to-tool): agents discover each other's capabilities and hand off tasks. v1.0 by 2026, 150+ orgs in production. Depth → Ch8.

Skill / Tool / Subagent 三边界

See Agent Engineering Chapter 07

tool = atomic primitive providing access (fetch/read/write/search, no internal decisions) · skill = reusable workflow know-how (MCP handles access, Skills handle workflow) · subagent = a born-isolated worker (clean context, restricted perms, returns only a result). Three layers compose, not either-or; high-token intermediate work → subagent, need to restrict perms → subagent.

Gradient-free Self-Improvement · 无梯度自我改进

See Agent Engineering Chapter 07

Making an agent better via verbal feedback + accumulated memory/skills, where the policy is text in the context and weights don't change = what #8 teaches. Weight-updating RL (SFT/RLHF/RLVR) = #6. Hard line: touch weights → #6, don't → #8; #8 produces trajectories that feed #6's training. Division: #8 designs the action space, #6 learns the policy.

Reflexion · 口头强化学习

See Agent Engineering Chapter 07

The root of gradient-free self-improvement: Actor acts → Evaluator judges the trajectory → Self-Reflection verbally distills failures into a text lesson → stored in an episodic buffer → fed into context next time. The policy is accumulated reflection text, not weights (hence 'verbal RL'). HumanEval 91%.

Trajectory Distillation · 轨迹蒸馏成技能

See Agent Engineering Chapter 07

Distilling past experience into reusable skills: Voyager (ancestor of skill libraries) → ExpeL (cross-task natural-language insight) → Trace2Skill (parallel-analyze a pool of trajectories → a conflict-free SKILL.md, cross-model transferable) → ProcMEM (executable procedural memory). 'Memory is distillation, not storage'; distilled skills transfer across model scales.

Multi-agent Trade-off · 多 agent 不是更强

See Agent Engineering Chapter 08

Ch8's spine: multi-agent is not a free lunch — it trades token cost + fragmentation risk for parallel throughput + breaking the single context window. Decision framework = parallelizability × shared-context need. Anthropic (+90%/15× tokens · breadth research) and Cognition (single-threaded · coding) are both right; workload decides.

可拆性(能否拆成独立子任务)→共享上下文需求 →难拆 · 高共享→ 单 agent(Cognition)可拆但高共享谨慎 · 同步成本都低 · 简单任务单 agent 够用高可拆 · 低共享✓ 多 agent 甜点
multi-agent 不是免费午餐:决策框架 = 可拆性 × 共享上下文需求 · 高可拆 + 低共享 = 多 agent 甜点(Anthropic 并行研究);难拆 + 高共享 = 单线程(Cognition 编码)· workload 决定成败

Topology Ladder · 拓扑阶梯

See Agent Engineering Chapter 08

From simple to complex: single agent + tools → sequential pipeline → orchestrator-worker (central) → decentralized handoff/swarm → conversational network → debate. Stay simple: prove the level below is insufficient before climbing. First watershed = centralized (parallel/fragments) vs decentralized (continuous/hard-to-parallelize).

简 → 繁① 单 agent + 工具默认起点 · 最简② pipeline 顺序固定步骤串行③ orchestrator-worker中心 lead 派活 · 并行广度── 中心化 ↑ · 去中心 ↓ ──④ handoff / swarm移交控制权 + 历史 · 连续⑤ network 对话多 agent 互相通信⑥ debate故意分歧再投票收敛
从简到繁:单 agent → pipeline → orchestrator-worker → 去中心 handoff → network → debate · 守 simplicity:每升一级先证明上一级不够 · 第一分水岭 = 中心化(并行 / 会碎)vs 去中心(连续 / 难并行)

Context Fragmentation · 上下文碎片化

See Agent Engineering Chapter 08

The first cost of multi-agent (deeper than money · Cognition's insight): parallelism disperses decisions and full agent traces aren't shared → subagents act on unstated, conflicting upstream assumptions → fundamentally inconsistent, irreconcilable outputs (the Flappy Bird example). Token cost is the symptom; lost decision-consistency is the essence.

Agent Debate · 多 agent 辩论

See Agent Engineering Chapter 08

A topology: multiple agents propose→critique→converge over rounds with voting. Opposite to 'fix conflict upstream', debate deliberately creates disagreement then aggregates, using conflict itself to refine reasoning and resist hallucination — good for math/strategy reasoning (trading tokens for accuracy).

Result Aggregation · 结果聚合

See Agent Engineering Chapter 08

How multi-agent outputs are combined. Deterministic aggregation (voting / schema-check / dedup): reliable, auditable, cheap, but only for structured outputs. LLM-merge (one agent synthesizes semantically): can reconcile semantic conflicts but is costly and fails on fundamentally inconsistent outputs. Hence the fix is upstream (fix assumptions at dispatch), not downstream merging.

Model Mixing · 模型混搭降本

See Agent Engineering Chapter 08

Splitting work across models to cut cost (strong planner + cheap executor). The cost logic holds, but 2026 hands-on tests show a strong planner + cheap executor often loses on quality to a single frontier model in a mature harness → let the model decide when to delegate. Folk 'cut cost N×' multipliers often lack first-hand sourcing — use the qualitative direction, don't hard-code numbers.

Deployment & Backend

Streaming · 流式输出

See Foundations Chapter 03

Return results as they're generated. LLM streaming drops first-token latency (TTFT) from seconds to ~100ms — feels 10× faster.

Database · 数据库

See Foundations Chapter 05

Persistent storage + complex queries. Typical Agent stack: Postgres + Redis + Vector DB.

Cache expensive things (slow queries, LLM calls) for reuse. Watch for stale + consistency pitfalls.

Queue · 消息队列

See Foundations Chapter 05

Async buffer — producer pushes, consumer pulls at its own pace. Solves peak smoothing + decoupling.

Container · 容器

See Foundations Chapter 06

Package an app + its deps into a reproducible, deployable runtime. Docker is the most common.

RPC · Remote Procedure Call

See Foundations Chapter 06

Call a remote service like a local function. gRPC is a common implementation.

Protocol for bidirectional real-time client-server communication. Required for agent progress notifications, chat UIs.

Frontend · 前端

See Foundations Chapter 06

What the user directly sees and interacts with. LLM app frontends often handle streaming display and tool confirmation UI.

Relational database query language. Used by Postgres, MySQL, SQLite. Preferred for strongly structured data.

Worker · 后台工作进程

See Foundations Chapter 05

Process that consumes queue tasks and does the work. Standard component in long-running agent architectures.

Cron Job · 定时任务

See Foundations Chapter 06

Task that runs on a fixed schedule — e.g., 'reindex documents every day at 2am'.

Serverless / Cloud Run

See Foundations Chapter 06

Deployment without directly managing servers; runs services per-request or per-container. GCP Cloud Run, AWS Lambda, Vercel Functions.

Environment Variable · 环境变量

See Foundations Chapter 06

Config injected at deployment time — API keys, DB URLs, model names. Never hard-code these.

Sensitive config — API keys, DB passwords, OAuth tokens, private keys. Must live in a Secret Manager, encrypted.

Common authorization protocol; lets apps access user resources on third-party platforms (GitHub, Google, Slack).

Durable Execution · 持久化执行

See Agent Engineering Chapter 02

A runtime that checkpoints each step to a DB so a crashed/restarted process resumes from the last checkpoint instead of re-running — keeps long agents from losing progress.

Idempotency Key · 幂等键

See Agent Engineering Chapter 02

A key identifying a side-effecting operation; checked before replay so actions like writes/orders/emails aren't executed twice.

A restricted environment that contains model-generated code as semi-trusted code; its goal is to limit the blast radius when the model errs. Built on isolation + least privilege + defense in depth.

共享宿主内核独立内核 · 硬件边界seccomp过滤 syscallLandlock内核对象 LSMgVisor用户态 syscallFirecracker独立内核 VM隔离强度 →
隔离强度阶梯:seccomp(过滤 syscall)< Landlock(内核对象访问控制)< gVisor(用户态重实现 syscall)< Firecracker(独立内核 microVM)· 前三者仍共享宿主内核,Firecracker 跨到硬件边界 · 互补叠加,非二选一

Approval ⊥ Sandbox · 审批与隔离正交

See Agent Engineering Chapter 04

Two independent knobs: approval is the autonomy axis (does an action need a human first?), sandbox is the containment axis (how much damage if it runs?). Freely combinable — stronger isolation buys higher autonomy.

隔离强度 (containment) →自主程度 (autonomy) →弱隔离 · 高自主✕ 危险:能炸又放手强隔离 · 高自主✓ 甜点区弱隔离 · 每步审批保守 · 慢强隔离 · 每步审批过度保守
两个独立旋钮:审批管「动作要不要先问人」(autonomy 轴),隔离管「跑了能炸多大」(containment 轴)· 两轴正交、可任意组合 —— 强隔离能换来更高自主(右上甜点区)

seccomp · 系统调用过滤

See Agent Engineering Chapter 04

A Linux mechanism that filters which syscalls (and arguments) a process may issue. Complements Landlock (it filters syscalls; Landlock guards kernel objects).

Landlock · 内核对象访问控制

See Agent Engineering Chapter 04

A Linux Security Module that does access control at the kernel-object level (files, ports), and lets an unprivileged process restrict itself. Not the same as seccomp — the two stack complementarily.

gVisor · 用户态内核

See Agent Engineering Chapter 04

Reimplements most Linux syscalls in userspace so the contained code's syscalls don't hit the host kernel directly, shrinking the attack surface. Cost: incomplete syscalls + workload-dependent overhead. Still shares the kernel.

Firecracker · 微虚拟机(microVM)

See Agent Engineering Chapter 04

A minimal microVM giving each workload its own kernel (hardware boundary), emulating only 5 devices, ~125ms boot / <5MiB. The de-facto standard for multi-tenant untrusted code (e2b / Vercel Sandbox).

Egress Control · 网络出口管控

See Agent Engineering Chapter 04

Deny-by-default outbound control: the sandbox has no network interface; its only exit goes through an out-of-sandbox proxy enforcing a domain allowlist. A resource boundary in Ch4, the anti-exfiltration linchpin in Ch5. Limit: the proxy doesn't inspect TLS, so trusted domains remain exfil channels.

Credential Proxy Injection · 凭证代理注入

See Agent Engineering Chapter 04

The agent sends credential-free requests; an out-of-sandbox proxy injects the real credentials and forwards them — the agent never sees the secret. Credentials stay centralized, loggable, and endpoint-allowlisted.

Permission Gate ≠ Sandbox · 权限闸门与沙盒之别

See Agent Engineering Chapter 04

An approval rule (parsing/AST matching) is a permission gate deciding 'was it asked?' — arg-level patterns can be bypassed, so it's not a security boundary. The OS sandbox decides 'is it allowed?' — that's the enforced isolation. Both layers are needed.

Prompt Injection · 提示注入

See Agent Engineering Chapter 05

Hijacking an agent by hiding malicious instructions in content it reads. Original sin: instructions and data share one token channel, and natural language has no 'parameterization' to fix it (unlike SQLi's prepared statements). Direct (user jailbreak) vs indirect (third-party content — the agent-era main battlefield).

Lethal Trifecta · 致命三连

See Agent Engineering Chapter 05

Willison 2025: access to private data + exposure to untrusted content + ability to communicate externally — all three present make data theft possible. The most reliable defense is removing one leg architecturally (not adding a prompt guardrail).

① 访问私有数据② 暴露于不可信内容③ 能对外通信数据被盗拆掉任意一条腿 → 完美风暴瓦解
三种能力单独都无害 —— 唯独三者同时具备(中心那块曲边交集)才构成窃数据的完美风暴 · 最可靠的防御是架构上拆掉任意一条腿,而非加 prompt 护栏(Willison 2025)

Confused Deputy · 混淆代理

See Agent Engineering Chapter 05

The essence of injection: the agent is a deputy holding the user's high privilege, and injection lets untrusted content 'borrow' that authority. The failure isn't reading hostile content — it's that hostile content can borrow the model's authority. So defense = keep dirty data away from high-privilege decisions.

不可信内容网页 / 文档 / 工具返回Agent持用户高权限 🔑高权限操作删库 / 转账 / 外发注入指令借走权限
Agent 是持用户高权限的「代理」· 注入让不可信内容借走它的权限去执行高权限操作 —— 失败点不是「读到」坏内容,而是坏内容能借走权限 · 防御:让脏数据触不到高权限决策

Tool Poisoning / Line Jumping / Rug Pull · MCP 投毒

See Agent Engineering Chapter 05

MCP-specific attacks: instructions hidden in a tool description (the model reads them, the user UI doesn't), 'line-jumping' into context during the handshake before any call, or changing behavior after approval (rug pull). Measured ASR ≈ 66%, refusal < 23% — model alignment doesn't stop it.

Constraint ≠ Filter · 约束不是过滤

See Agent Engineering Chapter 05

The chapter's key distinction. Filter: detect and block bad content (necessarily bypassed by adaptive attacks). Constraint: architecturally ensure that even a successful injection can't reach high-privilege decisions — a guarantee, not a probability. Prefer architectural patterns + least privilege + egress over piling on classifiers.

① Filter 过滤 —— 概率拦截,自适应攻击会绕不可信输入过滤器检测坏内容高权限决策注入部分漏过② Constraint 约束 —— 架构上让注入碰不到高权限(保证)不可信输入约束 架构墙高权限决策注入挡墙外
Ch5 最重的一刀 —— 过滤:识别并拦截坏内容(概率,自适应攻击必绕);约束:从架构上让注入即使成功也碰不到高权限决策(给保证)· 优先架构 pattern + 最小权限 + egress,而非堆分类器

Dual-LLM · 双模型特权分离

See Agent Engineering Chapter 05

Willison 2023. A privileged P-LLM orchestrates and calls tools but never touches untrusted content; a quarantined Q-LLM processes dirty data but has no tools; Q returns results only as symbolic variables ($VAR) to P. Untrusted data never reaches the tool-calling LLM — OS-level privilege separation.

CaMeL · 可证明的注入防御

See Agent Engineering Chapter 05

Google+DeepMind+ETH. The P-LLM generates sandbox-DSL code; data carries capability labels (source + allowed destination) tracked end-to-end; policy is enforced at each tool call. No model changes — a pure architectural guarantee. 77% of AgentDojo tasks with provable safety vs 84% undefended (cost ≈ 7 points).

Rule of Two · 三选二规则

See Agent Engineering Chapter 05

Meta 2025. Within one session an agent may satisfy at most two of three properties (process untrusted input / access sensitive data / change state or communicate externally); if all three are needed it must not run autonomously — requiring human-in-the-loop + context reset. The actionable checklist version of the lethal trifecta.

① 处理不可信输入② 访问敏感数据③ 改状态 / 对外通信任意 ≤ 2 个 → 可自主运行三个全需要 → 不得自主运行必须人在环 + 重置 context
一个 session 内,三个高危属性最多占两个 → 可自主运行;三个全需要 → 不得自主,必须人在环 + 重置 context · 致命三连的可落地 checklist 版(Meta 2025)

Excessive Agency · 过度代理

See Agent Engineering Chapter 05

OWASP LLM06. Its three root causes are the three knobs of least privilege: excessive functionality (too many tools → narrow the toolset), excessive permissions (over-broad credentials → task-scoped least-privilege tokens), excessive autonomy (acting without approval → a human gate).

Confirmation Fatigue · 确认疲劳

See Agent Engineering Chapter 05

A known failure mode of human-in-the-loop (OWASP ASI09): too many approval prompts → users reflexively click yes, so approval becomes meaningless. Implication: approval-UI design is itself security engineering (defaults, how key info is shown, whether dangerous details are force-expanded).

Quality × Speed × Cost · 三角权衡

See Agent Engineering Chapter 12

A production harness finds a point among three pulling goals — quality, speed, cost — with no free lunch: chasing one usually sacrifices the others. The engineering move is to fix the workload's acceptable floor (how accurate / how long it can wait / how much it can spend) first, then find a point inside the triangle that meets it.

质量 · 准速度 · 快成本 · 省你的取舍点
质量、速度、成本三个相互拉扯,没有免费午餐:把取舍点拉向任一个顶点,就离另外两个更远 · 工程姿势是先定 workload 底线(多准 / 多快 / 多省),再在三角里找满足底线的点

Prompt Caching · 提示缓存(成本杠杆)

See Agent Engineering Chapter 12

Caching the attention key-values of the prefix an agent loop re-sends each turn (system prompt + tool definitions + history); a hit skips prefill, reads at about 0.1× base, and input cost drops 5-10× — the top lever for controlling agent cost. Top failure mode: a changing element at the top of the prefix (e.g. a timestamp) invalidates the whole cache and silently bills full price.

Testing / Evaluation / Observability

Unit Test · 单元测试

See Foundations Chapter 07

Tests a single function, module, or handler. Applies to LLM systems too — test prompt + tool outputs.

Standard task set for evaluating Agent performance. 4-layer stack: unit / behavior / A/B / human.

严格 / 成本 ↑human 人评少 · 贵A/B 实验behavior 行为测unit 单元测多 · 廉 · 机械判定
评估 agent 的 4 层叠加,从下到上逐层加严:底层 unit 单测(多 · 廉 · 机械判定)→ behavior 行为测 → A/B → 顶层 human 人评(少 · 贵 · 人判)· 越上越接近真实质量、越贵

Benchmark · 基准测试

See Foundations Chapter 07

Standardized, comparable evaluation. Used for cross-model / cross-version comparisons.

Golden Set · 黄金数据集

See Foundations Chapter 07

Human-verified test set with correct answers. The bedrock of Eval; grows continuously.

Record what the system did and when. LLM systems need structured logging to be analyzable.

Trace · 链路追踪

See Foundations Chapter 06

The complete execution path of one request, end to end. LLM traces include every step of the agent loop.

Observability · 可观测性

See Foundations Chapter 06

Whether you can see what happened when something breaks. Three pillars: logs + metrics + traces.

Time from request to response. LLM systems track TTFT + tokens/sec, not just total time.

Resources + money the system consumes. LLM systems track token cost + infra cost + human cost.

Verify the system works as expected. LLM systems add an eval layer (behavior quality) on top of traditional testing.

Integration Test · 集成测试

See Foundations Chapter 05

Test that multiple modules work together. LLM integration tests typically include real LLM calls.

End-to-End Test · 端到端测试

See Foundations Chapter 05

Test the full pipeline from user input to final output. The heaviest and slowest test type.

Regression Test · 回归测试

See Foundations Chapter 07

Prevent new changes from breaking existing functionality. Golden sets are the basis for LLM regression tests.

Assertion · 断言

See Foundations Chapter 07

Test condition like `assert output.contains('citation')`. LLM evals often use loose asserts (contains / startsWith / in set).

Quantitative data about system performance — success rate, latency, token usage, tool failure rate. One of the observability trio.

METR Time Horizon · 时间视界

See Agent Engineering Chapter 01

Quantifies agent capability as how long a task — in human work-time — a model can finish at 50% reliability. Roughly doubling every 7 months (accelerating); Opus 4.5 ≈ 320 min. A trend anchor, but 50% reliability ≠ production-grade (~99%).

1 分10 分100 分16 时每 ~7 月翻倍Opus 4.5 ≈ 320 分20232026
把 agent 能力量化成:模型以 50% 可靠度完成的任务 ≈ 多长的人类工时 · 每 ~7 月翻倍(近年加速),Opus 4.5 ≈ 320 分钟 · 注意:50% 口径 ≠ 生产可用(~99%)

Training Environment · 训练环境

See Agent Engineering Chapter 04

A training environment = sandbox (isolation + stateful reset + reproducibility) + reward (a verifiable signal) + reset (to baseline). #8 makes the execution sandbox reusable by a training loop; data/algorithms belong to #3/#6.

Attacker Moves Second · 攻击者后手

See Agent Engineering Chapter 05

A 2025 result: 12 published injection defenses were all broken by adaptive attacks, most >90% ASR (their papers reported near-zero), and human red-teamers succeeded 100%. Lesson: static self-evaluation gives false security → defensive eval must use adaptive red-teaming; 'passing eval' ≠ 'secure'.

AgentDojo · 对抗鲁棒性 benchmark

See Agent Engineering Chapter 05

The de-facto benchmark for agent adversarial robustness. Three metrics: Benign Utility (completion with no attack) / Utility Under Attack (still completing correctly under attack) / ASR (fraction executing all malicious steps). Judged by formally checking environment state, not an LLM judge (which the same injection would fool).

Trajectory Eval · 轨迹评测

See Agent Engineering Chapter 09

Moving the unit of evaluation from a single input-output pair down to the whole multi-step, stateful trajectory. Scoring only final output systematically misses failures (a 2026 consensus puts it at 20-40%), because agent failures often emerge only across steps.

Outcome vs Process · 结果评测 vs 过程评测

See Agent Engineering Chapter 09

The core trade-off in agent eval. Default to grading the environment's final state (so you don't kill valid approaches the designer didn't anticipate), supplemented by process signals for cheating, partial credit, efficiency, and diagnosis. Key distinction: outcome is environment state, not the agent's self-reported transcript.

pass^k / pass@k · 可靠性 vs 能力

See Agent Engineering Chapter 09

A pair of metrics for non-deterministic agents. pass@k (at least one success in k tries) is the capability ceiling, optimistic; pass^k (all k succeed) is the reliability floor, decaying as p^k. Production cares about pass^k: a 90%-per-try agent succeeds 8-in-a-row only about 43% of the time.

100%90%50%0%k=1k=8k = 连续步数(p = 0.9)pass@k 能力上限(乐观)pass^k 可靠性(生产要的)连成 8 次只剩约 43%
同一个单次成功率 p = 0.9 的 agent:问「至少成一次」(pass@k,蓝)几乎总成,乐观;问「连续 k 次全对」(pass^k,黄)按 0.9ᵏ 指数衰减,8 连只剩约 43% · 生产要的是黄线

Partial Credit · 部分给分

See Agent Engineering Chapter 09

Agent tasks are inherently staged, so 'half right' is meaningful. Scoring intermediate milestones preserves the improvement signal a binary solve-rate erases (an agent that identifies the problem and verifies identity but fails the refund beats one that fails immediately).

SWE-bench / Pro · coding benchmark

See Agent Engineering Chapter 09

An execution-based coding benchmark on real GitHub issues, once the de-facto standard. Its Verified subset became contaminated (tasks verbatim in training) and was widely reported as dropped; SWE-bench Pro resists contamination with multi-language + private codebases + a standardized scaffold — the same model scores 81% on Verified but 46% on Pro.

Benchmark Contamination · 基准污染

See Agent Engineering Chapter 09

When a benchmark's answers leak verbatim into pretraining, or are publicly retrievable (gold answers on HuggingFace, browsing agents finding walkthroughs), inflating scores by 5-15 points. Countermeasures: private data and network isolation.

Benchmark Validity · 基准有效性

See Agent Engineering Chapter 09

Whether a benchmark actually measures what it claims. In 2026 UC Berkeley's BenchJack gamed 8 major agent benchmarks to near-100% without solving anything (10 lines to pass all tests, swapping the curl binary, an empty JSON, injecting the judge) — validity became a trust crisis, 'like web security in 2005.'

LLM-as-Judge · LLM 裁判

See Agent Engineering Chapter 09

Using an LLM to score open-ended outputs that can't be judged mechanically. Scalable and flexible, but the real engineering problem isn't using it — it's validating it (agreement with humans) and operating it (guarding against bias and drift).

Cohen's κ · 裁判一致性

See Agent Engineering Chapter 09

The right metric for judge-human agreement — it measures actual agreement, not linear correlation (a judge can correlate perfectly yet be systematically biased). Thresholds: above 0.80 strong, 0.60-0.80 acceptable, below 0.60 redo the rubric; human-human agreement is itself about 0.80.

Judge Bias · 裁判偏见

See Agent Engineering Chapter 09

Systematic biases in LLM judges: position (favoring a slot), verbosity (favoring longer answers), self-preference (favoring same-family models, hardest to fix), format, and calibration drift (distribution shifting when the model version bumps). Unaudited, bias gets mistaken for signal.

Panel of LLMs · PoLL 裁判组

See Agent Engineering Chapter 09

The meta-principle for mitigating judge bias: a single judge is unreliable, so use a panel of smaller, cross-family judges scoring independently and then aggregate (vote or average) — more robust than one strong judge; aggregation must account for inter-judge correlation (same-family judges share errors).

Eval-Ops · 版本契约

See Agent Engineering Chapter 09

Operating an LLM judge like a drifting measurement instrument: a version contract pinning (judge model id, rubric version, prompt template hash), treating a judge upgrade as a suite migration, and monthly recalibration against human samples. Cautionary tale: a dashboard can stay green and lie for three months (a measured κ of just 0.31).

Failure Attribution · 失败归因四象限

See Agent Engineering Chapter 09

Attributing the root cause of an agent failure to one of four quadrants — harness (scaffold), model (the model itself), inference (sampling/decoding), product (task/grader) — to decide where the fix lands. Methods: controlled variables (swap scaffold not model, and vice versa), isolated trials, and suspecting the eval first at the 0%/100% extremes. Ch9 defines the framework; Ch10 invokes it for step-by-step diagnosis.

Harness · 脚手架编排 / 工具 / 循环 → 修 harnessModel · 模型能力不足 → 换 / 微调(#6)Inference · 采样解码 / 温度 → 调参Product · 任务 / gradereval 设计 → 0%/100% 先查这
把一次 agent 失败的根因归到 harness / model / inference / product 四象限之一,决定修复落在哪 · 手法:控制变量(换 scaffold 不换模型)· 0%/100% 先怀疑 eval(Ch9 立框架,Ch10 诊断时调用)

Eval Harness · 评测系统

See Agent Engineering Chapter 09

The eval test system: running tasks concurrently in batch, recording every step's trace, applying graders, aggregating results. Distinct from the runtime agent harness (orchestrating tools, managing memory, producing output) — the two must be separated, like a CI/CD pipeline versus an application runtime.

Eval-Driven Development · eval 驱动开发

See Agent Engineering Chapter 09

Treating evals as a CI quality gate on every change (tiered: dev subset → staging full → prod plus safety), plus a flywheel where every production regression becomes a new test case, compounding reliability upward. Trigger: run the full suite on every model, prompt, or tool change.

Failure-Mode Taxonomy · 失败模式分类

See Agent Engineering Chapter 10

A canonical classification of agent failures: 5 families (A tool/action, B reasoning/control, C context/memory, D coordination/verification, plus E a security pointer) of ~19 named modes, each carrying a 'which chapter fixes it' column. Diagnose by synthesizing a usable view, not memorizing any one academic taxonomy.

Root-Cause vs Propagated · 根因 vs 传播错误

See Agent Engineering Chapter 10

The iron rule of diagnosing a failing trajectory: a long downstream chain of errors usually stems from one upstream root-cause error. Locate and fix only the root; don't chase the propagated errors it dragged off course (AgentDebug's core distinction).

First Divergence · 首处偏离

See Agent Engineering Chapter 10

The earliest step along a failing trajectory where the model's output or action begins to diverge from the correct path (empirically often around step 2). It is the anchor for locating the root cause in the post-mortem SOP.

Trajectory Postmortem · 失败轨迹尸检(SOP-A)

See Agent Engineering Chapter 10

The 6 steps a human walks to diagnose a failing run's full trajectory: get the whole trace, find the first divergence, attribute to AgentDebug's four modules, map to Ch9's failure-attribution quadrants, name it and point to the fixing chapter, then fix and harden into a regression.

Design Review · 设计前评审(SOP-B)

See Agent Engineering Chapter 10

Reviewing an un-run agent design with the three pillars (reliable/scalable/maintainable), the roadmap's chapter spine, and the failure taxonomy; the key move is to pause for a first-impression judgment before checking item by item.

Version Drift · 版本漂移

See Agent Engineering Chapter 10

Agent behavior silently shifts after a model / prompt / tool-schema upgrade, often as several seemingly harmless changes stacking up (Anthropic's 2026-04 Claude Code incident was exactly this). Guarded by per-model evals on every change plus a soak period.

Failure-to-Fix Loop · 人主导修复闭环

See Agent Engineering Chapter 10

Triage (what's worth fixing), package into a targeted eval, investigate the root cause (read trace / eval / repo / skills), fix and verify, then harden into a regression; ambiguous cases routed back to humans. The human-in-the-loop counterpart to Ch7's automatic agent self-evolution.

Complex Systems

Complex System · 复杂系统

See Complex Systems Chapter 01

A system whose overall behavior emerges from many simple local interactions and can't be reduced to any single part. The test isn't how many parts it has, but whether the interactions can be decomposed away.

Complicated · 复杂繁琐

See Complex Systems Chapter 01

A system that, however many parts it has, can be decomposed, predicted, and reassembled with unchanged behavior (e.g. an airplane). The foil to 'complex' — a useful on-ramp from the Cynefin framework.

A new whole-system property arising from many local interactions at a larger scale that can't be derived from the parts. The core concept of complex-systems science (Anderson, 'More Is Different').

Self-organization · 自组织

See Complex Systems Chapter 01

Global order forming spontaneously out of local interactions, with no central controller and no external blueprint.

Feedback Loop · 反馈回路

See Complex Systems Chapter 03

A system's output routed back as its own input. Reinforcing loops (positive feedback) amplify change toward exponential growth; balancing loops (negative feedback) suppress it toward stability; a balancing loop with delay oscillates (Meadows).

Nonlinearity · 非线性

See Complex Systems Chapter 03

Output not proportional to input — small causes can have large effects and vice versa. In complex systems, cause and effect stop being a straight line.

Sensitivity to Initial Conditions · 对初始条件敏感

See Complex Systems Chapter 05

In a deterministic system, tiny differences in the starting point are amplified exponentially (roughly ε·e^(λt)), making long-term prediction impossible (Lorenz 1963). It describes error growth, not a lever to steer outcomes; the famous 'butterfly' image comes from a later Lorenz talk, not the 1963 paper.

Complex Adaptive System · 复杂适应系统

See Complex Systems Chapter 07

A complex system made of adaptive agents: each carries an internal model and strategy that change with experience, while the whole population is shaped and evolved under selection pressure — adding, on top of self-organization (fixed rules emerging order), a layer where the rules themselves change and the system is selected (named by John Holland).

Preferential Attachment · 偏好连接

See Complex Systems Chapter 04

New nodes tend to attach to already-popular nodes, producing a 'rich-get-richer' hub structure that explains the scale-free hubs common in networks (whether scale-free is universal, and whether the internet counts, has been contested since 2019; Barabási & Albert 1999).

Stigmergy · 共识主动性

See Complex Systems Chapter 02

Parts coordinate not by talking directly but by leaving perceptible traces in a shared environment (e.g. pheromones): write a trace, read traces, act accordingly — positive and negative feedback converge local actions into global order (Grassé 1959).

Tipping Point · 临界点

See Complex Systems Chapter 03

Crossing a threshold makes a system reorganize and jump to another stable state (often nonlinearly); the IPCC definition adds that removing the trigger doesn't necessarily return it to the original state.

Hysteresis · 滞后

See Complex Systems Chapter 03

After a system flips to a new state, removing the original trigger doesn't retrace the path back — recovery costs far more than the trigger did (a ball in a valley).

Metastable Failure · 亚稳态失效

See Complex Systems Chapter 03

A trigger kicks the system into a bad state and a reinforcing loop (e.g. a retry storm) locks it there, so it can't escape even after the trigger is gone — feedback and hysteresis combined, in distributed systems (Bronson et al. 2021).

Drawing a system as nodes (points) and edges (lines); the number of edges at a node is its degree. Describe and explain behavior by the shape of the connections rather than the parts themselves.

Small-world · 小世界

See Complex Systems Chapter 04

A network with both high clustering and short path lengths — a few long-range shortcuts compress a clustered, large world into one where any two points are close (Watts & Strogatz 1998).

Scale-free Network · 无标度网络

See Complex Systems Chapter 04

A network whose degree distribution follows a power law, dominated by a few hubs, with no 'typical' degree. Hub dominance is a real and common pattern, but strict scale-freeness being universal is contested (Broido & Clauset 2019).

A high-degree node with far more connections than the rest. It makes a network robust to random failure but fragile to targeted attack (two faces of the same structure), and acts as a super-spreader in propagation.

Deterministic Chaos · 混沌

See Complex Systems Chapter 05

A fully deterministic system (no randomness in its rules) becoming unpredictable long-term due to extreme sensitivity to initial conditions; the strict criterion is 'at least one positive Lyapunov exponent in a bounded phase space.' Chaos ≠ random (it's deterministic) and ≠ complex (it can be low-dimensional, like the single-variable logistic map).

Strange Attractor · 奇怪吸引子

See Complex Systems Chapter 05

The phase-space set a chaotic system is drawn onto long-term: bounded, never exactly repeating (aperiodic), and fractal. Lorenz gave the first concrete example; Ruelle & Takens (1971) named the class.

Lyapunov Exponent · Lyapunov 指数

See Complex Systems Chapter 05

Measures the average exponential rate at which nearby trajectories separate in phase space. A positive exponent in a bounded system is the fingerprint of chaos (positive alone isn't enough — it must also be bounded); the inverse of the largest exponent (Lyapunov time) roughly equals the prediction horizon.

Predictability Horizon · 预测视界

See Complex Systems Chapter 05

Exponential error growth makes a deterministic system's forecast trustworthy only within a finite time window, on the order of the inverse of the largest Lyapunov exponent. It's an intrinsic limit no perfect model or compute can cross (e.g. mid-latitude weather, Zhang 2019).

Phase Transition · 相变

See Complex Systems Chapter 06

A whole-system, qualitative jump in macroscopic state when a control parameter (e.g. temperature) crosses a critical value (water↔ice, a ferromagnet gaining/losing magnetism at the Curie point). Abrupt, not gradual; the rich 'a local move shifts the whole' critical phenomena appear at continuous transitions.

Criticality · 临界

See Complex Systems Chapter 06

The state of a system sitting right at a phase-transition boundary: correlation length diverges, fluctuations span all scales, and different systems share critical exponents (universality). Complementary to Ch3's tipping point — that covers the dynamics of flipping past a threshold, this covers the statistical structure near the critical point.

Self-organized Criticality · 自组织临界

See Complex Systems Chapter 06

A system driven by its own dynamics toward and held at the critical point, with no external fine-tuning, showing events of every size (a power law); the canonical toy model is the BTW sandpile (Bak, Tang & Wiesenfeld 1987). Its universality is contested — even real sandpile/rice-pile experiments don't always yield power laws.

A distribution of event sizes with no characteristic scale: many small events, few large ones that aren't negligible (a fat tail), self-similar across scales. Here it's the size distribution of events/cascades/avalanches, distinct from Ch4's scale-free network (a power law in node degree). Empirical claims of strict power laws are often overstated (Clauset et al. 2009).

Percolation · 渗流

See Complex Systems Chapter 06

As connection probability or density rises, a system abruptly forms a giant cluster spanning the whole at a critical value — the cleanest intuition for a 'suddenly connected' phase transition (Broadbent & Hammersley 1957; forest fires, random-graph connectivity).

A local failure spreading along the couplings between parts to engulf the whole; in a critical system, cascade sizes follow a power law (mostly small, occasionally system-wide). Ch3's metastable failure and Ch4's hub blast radius are both instances.

Adaptive Agent · 适应性主体

See Complex Systems Chapter 07

The basic unit of a complex adaptive system: a part that senses its environment, acts on rules, and carries an internal model and strategy that update with experience. Contrast with Ch2's parts, which only run fixed local rules — this one's rules change.

Variation–Selection–Retention · 变异-选择-保留

See Complex Systems Chapter 07

The engine by which a population of strategies improves over time with no designer: variation generates diversity, selection keeps what works, retention passes it on — repeat, and it 'climbs.' Genetic algorithms are a computational instance; it's a biology-inspired model, not literal biology.

Agent-based Model · 基于主体的模型

See Complex Systems Chapter 07

A modeling method that, instead of writing system-level equations, gives each agent a simple local rule, lets them interact, and observes the macro-level emergence (Schelling segregation, Sugarscape, the Santa Fe artificial stock market).

Fitness Landscape · 适应度景观

See Complex Systems Chapter 07

Picturing 'how fit each strategy or genotype is' as a terrain of peaks and valleys, with evolution climbing it; rugged, multi-peaked terrain traps you at local optima. Coevolution keeps the terrain itself moving, so living systems have no final equilibrium.

Coevolution · 协同演化

See Complex Systems Chapter 07

Multiple agents act as each other's selection pressure, each one's fitness landscape reshaped as the others move (the Red Queen: you run flat out just to stay in place). It's the source of 'the landscape moves.'

Leverage Point · 杠杆点

See Complex Systems Chapter 08

A place to intervene in a complex system where a small change shifts the whole system's behavior. Donella Meadows ranked them in twelve levels from weakest (constants/parameters/numbers) to strongest (transcending paradigms), noting that people instinctively push the weakest end — often in the wrong direction — while the high-leverage points (paradigms, goals, rules, self-organization, information flows) are the most powerful yet hardest to move. Note: it's Meadows's practitioner heuristic ordering, not a verified law (she called the order 'slippery').