ACE Patterns Guide
This guide documents how Aegis implements patterns from two breakthrough research papers:- ACE Paper (Stanford/SambaNova): “Agentic Context Engineering” - treats contexts as evolving playbooks that accumulate strategies over time
- Anthropic’s Long-Running Agent Harnesses: Solving the multi-context-window problem for agents that work across sessions
Key Insight: Both papers demonstrate that structured, incremental context evolution dramatically outperforms static prompts or monolithic rewrites. ACE achieved +17.1% improvement on agent benchmarks.
The Problems These Patterns Solve
Context Collapse
Context Collapse
When an LLM rewrites its entire context, it can collapse valuable accumulated knowledge:Aegis Solution: Incremental delta updates that never rewrite the full context.
Brevity Bias
Brevity Bias
Prompt optimizers compress away domain-specific heuristics for “concise” instructions, losing critical task-specific knowledge.Aegis Solution: Memory types (reflection, strategy) that preserve detailed insights.
Premature Victory
Premature Victory
Agents declare tasks complete without proper verification.Aegis Solution: Feature tracking with explicit pass/fail status.
Lost Progress Between Sessions
Lost Progress Between Sessions
Each new context window starts fresh with no memory of previous work.Aegis Solution: Session progress tracking that persists between context windows.
Pattern 1: Memory Voting
ACE’s key insight: track which memories were helpful vs harmful for completing tasks.Why It Works
Memories with positive effectiveness scores consistently improve task performance. By voting on memories, agents learn what strategies actually work.Querying by Effectiveness
Pattern 2: Incremental Delta Updates
ACE’s breakthrough: never rewrite the full context. Use atomic, localized updates.Why It Works
Monolithic rewrites cause “context collapse.” Delta updates:- Only modify what needs to change
- Preserve accumulated knowledge
- Enable parallel updates
- Reduce latency by 86.9%
Pattern 3: Reflection Memories
Extract actionable insights from task trajectories.Pattern 4: Session Progress Tracking
Anthropic’sclaude-progress.txt pattern, structured and queryable.
Pattern 5: Feature Tracking
Prevent premature victory with explicit verification.Performance Impact
Based on the ACE paper’s benchmarks:| Metric | Without ACE | With ACE | Improvement |
|---|---|---|---|
| Agent Tasks (AppWorld) | 42.4% | 59.5% | +17.1% |
| Financial Analysis | 70.7% | 78.3% | +7.6% |
| Adaptation Latency | Baseline | -86.9% | 86.9% faster |
| Token Cost | Baseline | -83.6% | 83.6% cheaper |
Quick Reference
Memory Types
| Type | Purpose | Scope Default |
|---|---|---|
standard | Facts, preferences | agent-private |
strategy | Reusable patterns | global |
reflection | Lessons from failures | global |
progress | Session state | agent-private |
feature | Feature tracking | global |
Effectiveness Score
References
- ACE Paper: Zhang et al. “Agentic Context Engineering” (arXiv:2510.04618, Oct 2025)
- Anthropic Blog: “Effective Harnesses for Long-Running Agents” (2025)