TLDR · PROGRAMMING, DESIGN & DATA SCIENCE

CONTEXT ENGINEERING FOR AGENTS

rlancemartin.github.io12 min read

Summary from the TLDR newsletter

Context engineering is the art and science of providing agents with just the right amount of information at each step of a task. It involves providing the right instructions, knowledge, and tools to optimize output while reducing token use. There are four common approaches to context engineering: writing context (saving it outside the context window to help an agent perform a task), selecting context (pulling it into the context window to help an agent perform a task), compressing context (retaining only the tokens required to perform a task), and isolating context (splitting it up to help an agent perform a task). Understanding and using these patterns is a central part of building effective agents.