long-context latency-optimization agent-memory token-cost conversation-history organization-scope agentic-context-management context-compaction
Abstract
Production AI agents' failures are less often due to an inability to reason well and more often because they cannot manage what is in their reasoning context: conversation histories, large prompts, large tool definitions, and ballooning tool outputs. Agents drown in their own accumulating history while paying a token cost that grows every turn, producing missing recalls within and across conversations. The incumbent response treats this as a storage-and-retrieval problem. We argue that framing is too narrow. Actively managing what an agent holds in mind is a lifecycle, not merely a store: it spans deciding what to remember, extracting and structuring it, choosing the right store per data type, consolidating and forgetting while preserving provenance, deciding what is relevant now, anticipating what is needed next, and compacting context to a budget without losing what matters. In serious production this operates not over a single user but across an organizational scope hierarchy. We name this discipline Agentic Context Management (ACM) and decompose it into five primitives: architecting, ingesting, scoping, anticipating, and compacting & consolidation. We then make the economic case: naive context accumulation grows token cost quadratically in conversation length, crude summarization buys linear cost at the price of an accuracy cliff, and only validated compaction achieves linear cost with preserved fidelity. We describe a reference implementation, Maximem Synap, that realizes the five primitives as a multi-tenant service and reports 92% on LongMemEval and 93.2% on LoCoMo under the configuration detailed in Section 6. We close with dimensions existing benchmarks do not yet capture, latency, token efficiency, and context-rot resistance, and the frontier of decision-level and organization-level context the category points toward.
한국어 요약
한 줄 요약
AI 에이전트의 실패 원인을 메모리 관리 문제에서 컨텍스트 라이프사이클 관리 문제로 재정의하고, 이를 구현한 ACM 프레임워크와 Maximem Synap 시스템을 제시한다.
핵심 기여도
- Agentic Context Management (ACM)를 5개의 원시적 개념(architecting, ingesting, scoping, anticipating, compacting & consolidation)으로 분해하여 정의.
- 무분별한 컨텍스트 누적은 토큰 비용을 O(n²)으로 증가시키며, 단순 요약은 정확도를 급격히 저하시키는 경제적 문제임을 입증.
- Maximem Synap 시스템은 LongMemEval에서 92.0%, LoCoMo에서 93.2%의 성능을 달성.
- 기존 벤치마크가 포착하지 못한 latency, token efficiency, context-rot resistance 등 새로운 평가 차원 제시.
핵심 아이디어
AI 에이전트는 단순히 정보를 저장하는 것이 아니라, 컨텍스트를 라이프사이클로 관리해야 한다는 새로운 통찰을 제시한다. 기존의 "메모리" 접근은 저장과 검색에만 집중하지만, ACM은 컨텍스트의 **라이프사이클**을 다섯 단계로 구분한다:
1. **Architecting**: 데이터 유형에 맞는 저장소 선택.
2. **Ingesting**: 정보를 추출하고 구조화.
3. **Scoping**: 조직 내 사용자 범위를 고려한 컨텍스트 적용.
4. **Anticipating**: 다음 턴에 필요한 정보를 예측.
5. **Compacting & Consolidation**: 예산 내에서 정보를 압축하고 중복을 제거.
이러한 접근은 단순히 저장소를 넘어, 컨텍스트의 **유지, 선택, 예측, 압축**을 포함한 전반적인 관리 프레임워크를 제시한다.
기술적 접근법
- **Agentic Context Management (ACM)**: 컨텍스트 라이프사이클을 다섯 원시적 개념으로 분해.
- **Maximem Synap**: 다중 테넌트 서비스로 ACM의 5개 원칙을 구현.
- **Compacting & Consolidation**: 토큰 예산 내에서 정보를 압축하면서도 정확도를 유지.
- **Token Cost 분석**: 무분별한 컨텍스트 누적은 O(n²) 비용을 유발, 단순 요약은 정확도를 급격히 낮춤.
- **하이퍼파라미터**: Section 6에 상세히 기술된 설정 기반으로 실험 수행.
주요 결과
- **LongMemEval**: 92.0% (460/500), **LoCoMo**: 93.2% (Cat 1–4).
- **Single-session-user**: 100.0% (70/70), **Temporal-reasoning**: 100.0% (133/133).
- **Multi-session**: 75.2% (100/133)로 가장 낮은 성능.
- **GPT-5-mini** 모델로도 높은 성능 달성, 이는 컨텍스트 레이어의 효과를 입증.
의의 및 한계
- **의의**: 컨텍스트 관리를 단순 저장소 문제에서 라이프사이클 관리 문제로 재정의함으로써, 에이전트의 확장성과 정확도를 동시에 향상.
- **경제적 효과**: 무분별한 컨텍스트 누적은 O(n²) 비용을 유발하지만, ACM은 선형 비용으로 정확도를 유지.
- **한계**: Multi-session 범주에서 낮은 성능을 보이며, 복수 세션 간 정보 통합이 여전히 어려움. 또한, 벤치마크는 latency, token efficiency, context-rot resistance 등을 포착하지 못함.
실용적 활용
- **기업 내 AI 에이전트 운영**: 대규모 조직에서 사용자별 컨텍스트를 효율적으로 관리할 수 있음.
- **고비용 토큰 환경**: 토큰 예산 내에서 정보를 압축하면서도 정확도를 유지할 수 있어, 비용 효율적인 대화형 시스템 구축에 적합.
- **복잡한 다단계 작업**: 여러 툴과 세션을 거치는 작업에서 컨텍스트 유지를 통해 일관된 결과를 제공.