AI Agent Orchestration Platform  ·  View 14 of 32  ·  3 · Data

Context Management

How one model invocation's context window is assembled, compressed, protected and accounted for.

Editable source SVG draw.io All views
Resolve Context Strategy per agent spec Window Budget reserve for output Gather System Instruction pinned version Conversation Slice last N turns Memory Recall scoped query Knowledge Retrieval hybrid search Rank Reranker cross-encoder Deduplicate near-duplicate drop Relevance Cut score threshold Compress Rolling Summary cheap model Tool Output Trim head and tail Fit to Window hard cap Protect PII Redaction reversible token Untrusted Fencing content delimiters Classification Check route constraint Assemble Message Array provider neutral Provenance Tags source per block Token Accounting pre-call estimate still over budget route pinned cited blocks Context Management — Assembling One Model Invocation Application we own Decision point Data store Security / platform failure / alternate synchronous Retrieved content is fenced as untrusted before it reaches the model. Provenance survives into the trace, so any claim is attributable. v 1.0 · owner Data & AI Global Practice · date 2026-08

Decisions

  • Context assembly is a centralised service, not something each agent implements — otherwise every agent invents its own truncation bug
  • Retrieved content is fenced as untrusted before the model sees it, and fenced content never carries tool-calling authority
  • Provenance is attached per block and survives into the trace, so any claim in an answer is attributable to a source

Numbers

  • Output reservation is 25 percent of the window by default, configurable per agent
  • Rolling summarisation uses the cheapest capable model; summarisation cost is tracked separately so it cannot hide in the run total
  • Context strategies are declared per agent and versioned with the agent spec

Risks

  • Compression is lossy by definition; agents in hallucination-sensitive workflows disable summarisation and fail loudly on overflow instead
  • PII redaction is reversible by token, which means the mapping table is itself sensitive and lives in the tenant Key Vault