Skip to decision

GAP-05 · Agent architecture

Context and Memory Strategy Evaluator

Compare the cost of keeping context with the consequences of losing it.

Current decision

All introduced facts fit in the full history at turn 6

Fidelity and risk are illustrative model scores. Inspect the actual retention rule before choosing the lower-cost strategy.
Working context budget
24k tokens
Full history
22k tokens
Facts introduced
6

Same instrument · 3 industries choosing a scenario replaces its inputs; save or share your current changes first

Prefer to read? The two minute case study · problem → approach → metric → outcome

Problem

A naive full history approach may preserve context but can become expensive and fragile. Summarization, compression, and handoff patterns reduce load but introduce fidelity tradeoffs, and the right answer depends on the business task and the risk of losing detail.

Approach

The evaluator compares full context, summarization, compression, and subagent handoff across the same growing task. It shows how token load, overflow risk, and fidelity change as conversations lengthen.

Why this way

This connects context design to unit economics, reliability, accuracy, user experience, and operating scalability.

The metric

Tokens and cost per call versus answer fidelity, by strategy.

The trade-off

Higher fidelity costs tokens; aggressive compression eventually hurts the answer.

Outcome

The context strategy to run per use case, with the point where compression starts to hurt.

Compared with turn 6

Turn change: 0. Compare the same supplied facts; new facts are not counted as memory losses.

No previously introduced fact changed its retention state.

6

Full dump

Send the whole history every call.

Context / call22k tok

$66/1k calls

Fidelity100%
Risk · overflow72%

Summarize

Rolling summary + last two turns.

Context / call12k tok

$36/1k calls

Fidelity76%
Risk · info loss24%

Compress

Semantic compression of history.

Context / call13k tok

$39/1k calls

Fidelity86%
Risk · detail loss12%

Subagent handoff

Only the current subtask's brief.

Context / call7k tok

$21/1k calls

Fidelity70%
Risk · coordination30%
Compare exact strategy values
Strategy values at turn 6
StrategyContextCost / 1k callsFidelity (modeled)Risk (modeled)
Full dump22k tokens$66100%72% overflow
Summarize12k tokens$3676%24% info loss
Compress13k tokens$3986%12% detail loss
Subagent handoff7k tokens$2170%30% coordination

If you act on this · the call → expected lift → how you'd measure it

The call

Select context strategy by use case, not by platform default.

Expected lift · illustrative

Reduces runaway token cost and overflow risk while preserving enough fidelity for the task.

How you'd measure it

Token cost per task, overflow events, answer quality, context recall, user rework.

It's a dial, not a default

Full dump is right for a short, high-stakes exchange; summarize or compress for a long assistant thread; handoff when specialized subagents each need only their slice. The mistake is picking one and calling it the platform standard.

Steering committee takeaway: Context strategy is a cost and fidelity decision. Set it based on the workflow, not enthusiasm for larger windows.

How this is built

Per strategy, context/call grows differently with turns (full = linear, summarize = ~flat, compress = log, handoff = flat small). Cost ≈ context × input price; fidelity and risk are modeled per strategy; overflow triggers when context exceeds a 24k working window. Memory retention applies each policy's eviction rule to a fixed fact set.

Stack: Next.js (static) + shared design system; deterministic client side.

Limitations: this is a modeled comparison. Production use would require actual conversation traces, task level evaluation, memory policies, privacy controls, and retention rules.