This is a knowledge site about choosing what a model can see. It starts from one model call and the block of text it receives, and climbs to retrieval, budgets, compaction, coding agents, memory, isolation between agents, security, measurement and production. At each step it asks three questions: what did the model see, what was left out, and can we prove why? It is written for engineers and architects who build agent systems, including backend engineers who are new to them.
One example runs through every page. An insurer receives a broker's request for a quote. An underwriting agent gathers evidence, retrieves the guidance and writes a recommendation. A human underwriter decides. The model recommends; a person decides.
What it is and is not#
| It is | It is not |
|---|---|
| A ladder: one idea per step, each word in plain English with a tiny example before it is used | A standard, or the only way to organize context work |
One running example, the shared cases UW-001 to UW-010 and this site's own UW-201 to UW-206 | A record of any real insurer. The cases, rules, fields, documents and provider are invented |
| A demonstration of mechanism: how a window is assembled, what a manifest records, what each stage removes | A measurement of any model, retriever or product. No page reports how good a real system is |
| Code that was run: a small assembler in standard-library Python, with its real output and 36 unit tests | A framework to install. It is short so that it can be read whole |
| Products described from their own documentation, by what context work each one does for you | A ranking or a buying guide. No product is called best, and no price is quoted |
What is original here and what is not#
Most of the ideas on this site were published by other people first. The conceptual starting point is Anthropic's article "Effective context engineering for AI agents" (September 2025). This site uses its ideas with attribution and none of its prose, examples or figures.
| Part | Status |
|---|---|
| Context as a finite resource; context rot; just-in-time retrieval; compaction; notes outside the window; subagents with clean windows | From the Anthropic article, used with the same meaning |
| Lexical search (BM25), embeddings, cosine similarity, reciprocal rank fusion, reranking, recall, precision, MRR | Standard information retrieval. The formulas appear with their assumptions on Retrieval and Measuring |
| Instruction versus data, and untrusted content having no authority | Stated in provider documentation read for Signals and Security; the conflict order of the example is a design of this site |
| The context manifest, the fixed list of omission reasons, the context version | Designs proposed on this site |
| The loss test for compaction, with probes for required facts | A design proposed on this site |
| Working context, durable memory and checkpoint state as three stores | An arrangement proposed on this site, to keep three things apart |
| The cases, the policy fixture, the 20 documents, the 3,000 past decisions, the coding-agent repository | Written for this site. All synthetic |
| The example code, its tests, the labs and the diagrams | Written for this site |
Where a page takes an idea from a source, the page says so. Where this site proposes something, it calls it a design.
How the facts were checked#
| Kind of claim | How it was checked |
|---|---|
| A named product, protocol or standard | Read on its own documentation on 2026-11-17 and logged with the address and the date in the repository's fact files (docs/facts/<page>.md). Where the documentation is silent, the page says so. Surprising facts (renames, deprecations, moved pages) were fetched a second time by a different agent before publication |
| An idea from a source | The source was opened and read on the day of writing and is listed below |
| The example | Run. Every command shown from examples/uw-context/ was executed, and the output on the page is the output it printed |
| The labs | They read data that a script generates from the example. Their arithmetic is a second implementation of the Python functions, and a test compares the two on 2,231 results |
| Numbers | Synthetic and illustrative unless a source is linked. Token counts come from a stand-in tokenizer |
| Other code | A block that was not run says so: "documented shape; not run here" |
| Links and structure | A build step checks every internal link, diagram and glossary reference before publication |
Documentation changes quickly in this field. Treat every statement about a product as true on the day it was read, and read the product's page again before you build on it.
What the example does not show#
The insurance example is an illustrative reconstruction for teaching. It follows the shape of a real project by the author, but the cases, the rules, the fields, the documents, the provider and every number are invented. Nothing here reports the quality of a real system or model. Example roof thresholds are synthetic, not insurance practice.
The agent here is a scripted stand-in, so these results show how the mechanism works, not how good any model is.
| In the example | What it really is |
|---|---|
| The underwriting agent | A script that reads only its window with fixed patterns. No model is called; no network, no key |
| The tokenizer | A stand-in rule (letters in pieces of four, digits in pieces of three). Not any provider's tokenizer |
| The embedding | A hand-written concept table hashed into 256 numbers. Not a neural model |
| The reranker | A script that counts covered concepts. Not a cross-encoder |
| The roof-data provider | A stand-in that returns what the case file says |
| The coding agent | A scripted session of tool calls over an invented repository |
Variation between trials (UW-010) | Produced by a fixed seed, so that every reader sees the same run |
Sources and reading list#
Each link was opened on 2026-11-17. Publication dates are those given by the source.
Start here#
| Source | Why read it |
|---|---|
| Effective context engineering for AI agents, Anthropic, September 2025 | The conceptual starting point: context as a finite resource and the strategies for long-running agents |
| Introducing Contextual Retrieval, Anthropic, September 2024 | Why lexical and vector search complement each other, and context added to chunks before indexing |
Provider documentation used on this site#
| Source | Used on |
|---|---|
| Context windows, Claude documentation | Context window |
| Prompt caching, Claude documentation | Budgeting, Frameworks |
| Compaction and Context editing, Claude documentation | Compaction, Frameworks |
| Citations, Claude documentation | RAG |
| Memory tool, Claude documentation | Memory boundary |
| How Claude remembers your project, Claude Code documentation | Coding agents, Memory boundary |
| OpenAI Model Spec | Signals |
| Model Context Protocol specification | Frameworks |
| AGENTS.md | Coding agents, Frameworks |
| pgvector | RAG |
The complete list, claim by claim with dates, is in the fact files of the repository. Frameworks names the documentation of every library and SDK it describes in its own sections.
Sister sites#
This site is one of a series of guides on engineering agentic software. At each boundary a page says what a concept is not and links the site that owns it.
| Site | Owns |
|---|---|
| Prompt Engineering | How instructions are written, composed, ranked, versioned and defended |
| Memory Engineering | Durable information and saved execution state |
| Agent Communication | Messages between agents; the A2A protocol |
| Observability Engineering | Logs, metrics, traces, audit events and replay |
| Guardrails Engineering | Enforceable checks around a probabilistic agent |
| Tools Engineering | Tool schemas, execution and MCP tools |
| Structured Output Engineering | Typed contracts: shape, validation, repair, evolution |
| Agent Orchestration | The control plane: what runs next, under which condition |
| Agent Reliability | Acceptable outcomes despite failures and retries |
| Harness Engineering | The runtime around a model call |
| Eval Engineering | Graders, golden sets, judges, trials and release gates |
| Diff to Deploy | Shipping a change with coding agents |
Written by Sam Muthu. Every case, rule, document and number in the example is synthetic.