Shared history artifact marries agent memory, context, and cache design
A blog post by Slavozard argues that memory, context management, and cache design in compound agentic systems should be optimized jointly rather than independently, proposing a structured shared history artifact as a practical middle ground.
Score breakdown
The structured shared history design directly resolves the tradeoff between inter-module context blindness and context rot, recovering cache prefix consistency while keeping per-module token consumption bounded in enterprise agentic systems.
- 01The post argues memory, context management, and cache design in compound agentic systems should be optimized jointly, not independently.
- 02A task-oriented dialogue (TOD) architecture — comprising a manager/router, domain expert modules, and a synthesizer — is used as the primary example.
- 03Per-module append-only history creates inter-module information blindspots: the router cannot see what experts did in prior turns.
Slavozard's post addresses a core design tension in compound agentic systems: how to balance memory, context visibility, and cache efficiency without letting any one concern undermine the others. The post uses a task-oriented dialogue (TOD) system — a common enterprise architecture with a manager/router, domain-specific expert modules, and a final synthesizer — to illustrate how per-module append-only history creates harmful information boundaries. The router cannot see what expert modules did in prior turns, experts lack visibility into sibling modules' contributions, and the synthesizer has no connected view of the full execution journey. These gaps can degrade both routing decisions and expert query parsing over time.
The post proposes a structured middle ground: a single shared history artifact with standardized, constrained contents.
The naive fix — dumping the full execution trajectory into a single shared artifact — solves the visibility problem but introduces context rot: after a few turns, context windows bloat, per-module token consumption grows unbounded, and system quality degrades both quantitatively and qualitatively. The post proposes a structured middle ground: a single shared history artifact with standardized, constrained contents. For each prior turn, this artifact includes the user's request, the names and query parameters of tool calls (but not full tool results), and the final synthesizer output. Heavy artifacts like tool results and API responses are offloaded to a separate memory and context management system.
This design gives all modules — router, experts, and synthesizer — a chronological, bird's-eye view of system activity without carrying the full execution trajectory. The standardized format also recovers cache prefix consistency across modules and turns, though the post notes the cache hit ratio takes a slight hit compared to per-module stable prefixes, since some input tokens such as tool results are discarded. The implementation syntax shown uses DSPy, but the post explicitly frames the arguments as framework-agnostic and applicable to any compound agentic system.
Key facts
- 01The post argues memory, context management, and cache design in compound agentic systems should be optimized jointly, not independently.
- 02A task-oriented dialogue (TOD) architecture — comprising a manager/router, domain expert modules, and a synthesizer — is used as the primary example.
- 03Per-module append-only history creates inter-module information blindspots: the router cannot see what experts did in prior turns.
- 04Sharing the full execution trajectory across all modules causes context rot and unbounded per-module token growth.
- 05The proposed solution is a single shared history artifact containing, per turn: the user's request, tool call names and query parameters (not full results), and the final synthesizer output.
- 06Heavy artifacts like tool results and API responses are offloaded to a separate memory and context management system.
- 07Implementation syntax is built on DSPy, but the arguments are described as framework-agnostic.
Topics
Summary and scoring are generated automatically from the original article. We always link back to the publisher and never republish images or paywalled content. Last processed Jun 19, 2026 · 10:25 UTC. How this works →