context-engineering
Context engineering for chat and agent systems - context window budgeting, deciding what to include, ordering and placement, conversation history trimming, summarisation and compaction, memory tiers (working, session, long-term), tool result truncation, prompt caching friendly layout, avoiding context rot and distraction, per-request context assembly in TypeScript, and measuring context quality. Load when a conversation grows long, an agent loses track or degrades, token cost or latency is high, or when designing how history, memory, tools and retrieved data are assembled into a prompt.
Pinned to revision c74eff4a9f08, so it is the text this page describes rather than whatever the author pushed since.
Files
Every link opens the file at its source, pinned to the revision this page describes.