RuntimeAgent systems topic

Context engineering

Context engineering controls which instructions, examples, tools, retrieved facts, messages, and summaries reach the model at each step. The objective is not maximum context; it is the smallest current set that makes the desired behavior likely and reviewable.

Questions to answer

Resolve these before adding tools, frameworks, or automation.

  • Which information must always be present and which should load on demand?
  • What is the provenance and freshness of retrieved context?
  • How will context growth, conflict, distraction, and loss be detected?

Implementation lifecycle

Build the evidence in this order

  1. 01

    Inventory

    List every source of tokens and the decision each source is meant to support.

  2. 02

    Curate

    Rank, retrieve, summarize, and expire context based on relevance and authority.

  3. 03

    Measure

    Compare task quality, latency, token use, and failure modes under realistic context loads.

Artifacts to maintain

  • context budget
  • retrieval policy
  • compaction rules
  • provenance metadata

Evidence ledger

Primary documentation behind this guide

Next topic

Tools and MCP