Field notes · v3

Laws of AI Agents

Hard-won heuristics for building agents that actually work.

Not proven theorems — field notes, each backed by a real source. Fifty model-agnostic principles spanning context, reasoning, retrieval, scope, instruction, evaluation, safety, architecture, operations, and the humans in the loop. Inspired by the format of Laws of UX; every card carries its receipt.

50 laws · 10 categories · Inspired by Laws of UX

The Expanded Digital Edition

Every law, in full — with a diagram for each.

The mechanism underneath, the warning signs, a worked example, an apply-it recipe, and the sources. 50 laws, expandable in one place.

Open the digital edition
50 laws
01

Law of Context Decay

Agents fail at context, not reasoning.

Context & Reliability
02

Compounding Error Law

Reliability multiplies, it doesn't add.

Context & Reliability
03

Position Is Power

Models read the edges; the middle gets lost.

Context & Reliability
04

The Model Optimizes for Looking Done

Agents declare victory early.

Context & Reliability
05

Design for the Worst Case

Plan around the ceiling, not the average.

Context & Reliability
06

Think Before You Touch

Spend reasoning tokens before you spend actions.

Reasoning & Planning
07

Don't Bet on One Chain

Sample many reasoning paths and let them vote.

Reasoning & Planning
08

Branch When the First Step Matters

For decisions you can't take back, explore before you commit.

Reasoning & Planning
09

Stop Tuning, Start Scaling

General methods plus compute beat your clever scaffolding.

Reasoning & Planning
10

More Thinking Can Hurt

Extra reasoning past the answer is wasted — or a wrong turn.

Reasoning & Planning
11

Retrieval Is the Ceiling

Your answer can only be as good as what you retrieved.

Retrieval & Memory
12

Grounding Is Not a Guarantee

Retrieval reduces hallucination; it does not eliminate it.

Retrieval & Memory
13

Relevant Beats Plenty

Near-misses poison context worse than random noise.

Retrieval & Memory
14

Keyword Still Carries Weight

Pure semantic search quietly loses to a 40-year-old baseline.

Retrieval & Memory
15

Memory Is a System, Not a Window

Give the agent a hierarchy, not just a bigger prompt.

Retrieval & Memory
16

Narrow Beats General

Three sharp tools beat thirty dull ones.

Scope & Design
17

Determinism at the Edges

Model in the middle, code at the boundaries.

Scope & Design
18

Observability Precedes Autonomy

You can't grant autonomy you can't trace.

Scope & Design
19

Decompose Before You Scale

When it's unreliable, split it — don't supersize it.

Scope & Design
20

The Cheapest Fix First

Reach for the prompt before the platform.

Scope & Design
21

The Tool Description Is the Prompt

An agent is only as capable as its tools are legible.

Instruction & Output
22

Show, Don't Tell

When prose fails, stop writing prose.

Instruction & Output
23

Confidence Is Not Calibrated

A model's certainty is not evidence.

Instruction & Output
24

Surface Ambiguity, Don't Resolve It

When the data is unclear, don't guess confidently.

Instruction & Output
25

Averages Lie

97% overall can hide a 60% segment.

Instruction & Output
26

Vibes Don't Scale

Eyeballing outputs feels like progress until you can't tell if a change helped.

Evaluation & Measurement
27

Look at Your Data

The highest-ROI activity in AI is the one teams skip first.

Evaluation & Measurement
28

The Judge Is Biased

An LLM grader reacts to length and position, not just substance.

Evaluation & Measurement
29

Goodhart's Trap

When your eval becomes the goal, it stops measuring what you cared about.

Evaluation & Measurement
30

Regress or Repeat

Every fixed bug is a future regression unless it becomes a test.

Evaluation & Measurement
31

The Lethal Trifecta

Private data, untrusted content, and an exfiltration path — pick at most two.

Safety & Security
32

Tokens Don't Wear Badges

The model can't tell your instructions from the attacker's — they're all just tokens.

Safety & Security
33

The Confused Deputy

An agent with your privileges will wield them on an attacker's behalf.

Safety & Security
34

Quarantine Untrusted Tokens

Let the privileged planner orchestrate, but never let it read the poison.

Safety & Security
35

Sandbox the Blast Radius

Assume the agent gets compromised — then contain what it can reach.

Safety & Security
36

Don't Build an Agent When a Workflow Will Do

Agents buy flexibility with latency, cost, and unpredictability.

Architecture & Operations
37

Cascade Before You Escalate

Try the cheap model first; only the hard cases deserve the expensive one.

Architecture & Operations
38

The Multi-Agent Tax

Every extra agent multiplies your token bill — make sure the task can pay it.

Architecture & Operations
39

Your Architecture Mirrors Your Org Chart

Ship a system shaped like your teams — so design the teams first.

Architecture & Operations
40

Retries Demand Idempotency

If an action can run twice, a retry will eventually run it twice.

Architecture & Operations
41

Trip the Breaker

Stop calling the thing that's already failing.

Architecture & Operations
42

The Ironies of Automation

The more you automate, the harder the leftover human job becomes.

Humans & Autonomy
43

Automation Bias

People will trust the machine over their own eyes.

Humans & Autonomy
44

Match the Level to the Stakes

Full autonomy is a setting, not a default.

Humans & Autonomy
45

Mind the Mode

Most automation surprises start with 'what mode is it in?'

Humans & Autonomy
46

The Handoff Is the Hard Part

In multi-agent systems, failures live in the seams.

Trust & Coordination
47

Trust Is Calibrated, Not Granted

Autonomy is earned in proportion to track record.

Trust & Coordination
48

The Escape Hatch Law

No clean exit means a fabricated one.

Trust & Coordination
49

Don't Let the Author Be the Judge

The thing that made it shouldn't grade it.

Trust & Coordination
50

Preserve Provenance

Don't lose where a fact came from.

Trust & Coordination

Further reading

The thinking these laws lean on — foundational essays, papers, and docs worth your time.

  1. 01 Building Effective Agents Anthropic Engineering The foundational map of agent patterns — when a workflow beats an agent, and when to add complexity at all. Underpins Narrow Beats General, Determinism at the Edges, and Don't Build an Agent When a Workflow Will Do.
  2. 02 How We Built Our Multi-Agent Research System Anthropic Engineering Coordinator / sub-agent design, the 15× token tax, and why the hard bugs live in the handoffs. Backs The Handoff Is the Hard Part and The Multi-Agent Tax.
  3. 03 Effective Context Engineering for AI Agents Anthropic Engineering Curating the context window — what to keep, what to drop, and why more context often hurts. Backs Context Decay and Preserve Provenance.
  4. 04 Writing Tools for Agents Anthropic Engineering Why tool descriptions are the real interface the model reasons over. Backs The Tool Description Is the Prompt.
  5. 05 Lost in the Middle: How Language Models Use Long Contexts Liu et al., 2023 The empirical basis for Position Is Power — models reliably use the start and end of long inputs and lose the middle.
  6. 06 The Bitter Lesson Richard Sutton, 2019 Seventy years of AI distilled: general methods plus compute beat hand-crafted cleverness. Backs Stop Tuning, Start Scaling.
  7. 07 Chain-of-Thought & Self-Consistency Wei et al. 2022 / Wang et al. 2022 Reasoning emerges when you ask for it, and sampling many paths to vote beats one greedy chain. Backs Think Before You Touch and Don't Bet on One Chain.
  8. 08 Retrieval-Augmented Generation (RAG) Lewis et al., 2020 The original RAG paper — retrieval supplies the facts the generator reasons over. Backs Retrieval Is the Ceiling.
  9. 09 MemGPT: Towards LLMs as Operating Systems Packer et al., 2023 Treats the context window as RAM and pages memory in and out. Backs Memory Is a System, Not a Window.
  10. 10 Your AI Product Needs Evals Hamel Husain, 2024 The case for evals as the central discipline of building with LLMs. Backs Vibes Don't Scale and Averages Lie.
  11. 11 Judging LLM-as-a-Judge (MT-Bench) Zheng et al., 2023 Position, verbosity, and self-enhancement biases in LLM graders, with mitigations. Backs The Judge Is Biased.
  12. 12 The Lethal Trifecta for AI Agents Simon Willison, 2025 Private data + untrusted content + exfiltration = exploitable. The defining agent-security heuristic. Backs The Lethal Trifecta and Quarantine Untrusted Tokens.
  13. 13 OWASP Top 10 for LLM Applications OWASP Gen AI Security Project, 2025 The industry-standard catalog of LLM application risks and mitigations. Backs Sandbox the Blast Radius and the safety laws.
  14. 14 FrugalGPT: Reducing LLM Cost Chen, Zaharia, Zou, 2023 Model cascades match top-tier quality at a fraction of the cost. Backs Cascade Before You Escalate.
  15. 15 Release It! / CircuitBreaker Nygard 2007 / Fowler 2014 Distributed-systems resilience patterns — circuit breakers, bulkheads, fail-fast. Backs Trip the Breaker.
  16. 16 Ironies of Automation Lisanne Bainbridge, 1983 The foundational human-factors paper: automating the easy work leaves humans the hardest residual role. Backs The Ironies of Automation.
  17. 17 Trust in Automation: Designing for Appropriate Reliance Lee & See, 2004 The two-sided model of trust — misuse from over-trust, disuse from under-trust. Backs Trust Is Calibrated, Not Granted.
  18. 18 Laws of UX Jon Yablonski The format that inspired this deck: durable principles, one card each, named and memorable.