Skip to content

CONCEPT Cited by 1 source

Context engineering

Definition

Context engineering is the discipline of allocating a fixed token budget across the components that compete for the LLM's context window — system prompts, tool descriptions, conversation history, tool outputs, summaries, retrieved context — so the model receives the right shape of information to do useful work without running out of budget.

Unlike "prompt engineering" (the earlier framing Fly.io dismisses as "magic spells"), context engineering is a legible programming problem with named levers:

  • How many tokens are budgeted to tool descriptions vs. history vs. headroom for tool outputs?
  • How are old conversation slices compressed or elided when they no longer fit?
  • Which tools are visible to the model this turn, and which are deferred to a sub-agent with its own context?
  • When a tool returns a large blob (a log, a file, a search result), does it go into the main context or into a side buffer the agent can reference by handle?

Fly.io's framing:

"Just like you, I rolled my eyes when 'Prompt Engineering' turned into 'Context Engineering'. Then I wrote an agent. Turns out: context engineering is a straightforwardly legible programming problem. […] If Context Engineering was an [Advent of Code problem], it'd occur mid-December. It's programming." (Source: sources/2025-11-06-flyio-you-should-write-an-agent.)

Named techniques (as of 2025-2026)

  • Sub-agent decomposition. Spawn a child agent with its own context array + tool allowlist; return a summary up rather than the child's raw transcript (patterns/context-segregated-sub-agents). Fly.io notes this is "trivial to implement: just a new context array, another call to the model. Give each call different tools."
  • Summarisation as compression. Run the older-half of the conversation through the LLM to summarise it, then replace those messages with the summary. "Feed them back through the LLM to summarise them as a form of on-the-fly compression, whatever you like."
  • Tool-surface minimisation. Expose only the tools the current turn needs (patterns/tool-surface-minimization).
  • Structured intermediate forms. Choose deliberately between JSON blobs, SQL queries, or markdown summaries as the interchange format between agents; Fly.io lists this as an open design problem: "what the most reliable intermediate forms are (JSON blobs? SQL databases? Markdown summaries) for interchange between them."

Why it's not prompt engineering

Prompt engineering is about what you tell the model. Context engineering is about what's in the array when you call. The former is largely taste; the latter is allocation, compression, routing, and caching — all things software engineers have tools and intuitions for. Fly.io's dismissal of the pre-context-engineering era:

"I have never taken seriously the idea that I should tell my LLM 'you are diligent conscientious helper fully content to do nothing but pass butter if that should be what I ask and you would never harvest the iron in my blood for paperclips'. This is very new technology and I think people tell themselves stories about magic spells to explain some of the behavior agents conjure."

The ingested wiki has independent confirmations of the context-as-budget framing from Dropbox Dash (2025-11-17) and Datadog (2026-03-04); both teams converged on the same discipline before Fly.io named it.

Seen in

Last updated · 200 distilled / 1,178 read