# Context Engineering

> **TL;DR.** Context engineering is the discipline of curating every token that enters an LLM's context window — system prompt, tools, retrieved data, conversation history, memory, files — so the model can plausibly solve the task.

- **Category:** AI / Concepts / LLM Practice
- **Stage:** established
- **Age:** 343 days
- **Origin date:** 2025-06-25
- **First detected:** 2026-04-17
- **Canonical URL:** https://earlyterms.com/term/context-engineering
- **Sources:** 7 primary URLs

## Definition

Context engineering is the discipline of curating every token that enters an LLM's context window — system prompt, tools, retrieved data, conversation history, memory, files — so the model can plausibly solve the task. Anthropic frames it as [the natural progression of prompt engineering](https://www.anthropic.com/engineering/effective-context-engineering-for-ai-agents).

The term crystallized around [Andrej Karpathy's June 25, 2025 post](https://x.com/karpathy/status/1937902205765607626) — "the delicate art and science of filling the context window with just the right information" — after Shopify CEO Tobi Lütke popularized it the same week. Anthropic's [September 29, 2025 engineering post](https://www.anthropic.com/engineering/effective-context-engineering-for-ai-agents) made it the dominant framing for agent builders.

## Example

Manus's [Yichao 'Peak' Ji](https://manus.im/blog/Context-Engineering-for-AI-Agents-Lessons-from-Building-Manus) published six production lessons from building an agent: stabilize prompts for KV-cache hits, mask tools instead of removing them, treat the file system as unbounded memory, periodically rewrite task summaries, keep failures visible, and vary action sequences to avoid mimicry.

## Analogy

Prompt engineering is writing a good question; context engineering is arranging every book on the desk before the student reads the question.

## Why it's emerging now

Context engineering went from a Karpathy tweet in late June 2025 to a first-class engineering discipline by April 2026. Anthropic's 148-point HN post, Gemini Embedding's 278-point launch post, and the philschmid.de 915-point flagship thread built the canon; autocomplete now returns 'context engineering vs prompt engineering' and 'context engineering anthropic' ahead of any product name.

## Related terms

- *parent:* prompt engineering
- *related:* Agent Harness
- *related:* Agent Loop
- *related:* Managed Agents
- *related:* Claude Agent SDK
- *related:* MCP Server
- *related:* Context Window
- *related:* Model Context Protocol
- *competitor:* RAG
- *child:* context rot
- *related:* Spec-driven Development
- *related:* Harness Engineering

## Sources

1. [Anthropic — Effective context engineering for AI agents](https://www.anthropic.com/engineering/effective-context-engineering-for-ai-agents)
2. [Karpathy tweet — context engineering over prompt engineering](https://x.com/karpathy/status/1937902205765607626)
3. [Philipp Schmid — The new skill is context engineering](https://www.philschmid.de/context-engineering)
4. [Simon Willison — Context engineering](https://simonwillison.net/2025/jun/27/context-engineering/)
5. [Manus — Context Engineering for AI Agents](https://manus.im/blog/Context-Engineering-for-AI-Agents-Lessons-from-Building-Manus)
6. [LangChain — Context Engineering](https://blog.langchain.com/context-engineering-for-agents/)
7. [Elasticsearch Labs — Context engineering vs prompt engineering](https://www.elastic.co/search-labs/blog/context-engineering-vs-prompt-engineering)

---
_Generated by EarlyTerms · https://earlyterms.com/term/context-engineering_
