에이전트 컨텍스트 관리: 메모리와 비용 문제를 라이프사이클 및 아키텍처 문제로 간주하여 해결하기
Agentic Context Management: Solving Agent Memory and Cost by Treating Them as Lifecycle and Architecture Problems
July 23, 2026
저자: Gaurav Dadhich
cs.AI
초록
프로덕션 AI 에이전트의 실패는 추론 능력의 부족보다는 대화 기록, 대규모 프롬프트, 방대한 도구 정의, 그리고 확장되는 도구 출력과 같은 추론 컨텍스트 내의 정보를 관리하지 못하는 데서 비롯되는 경우가 더 많다. 에이전트는 매 턴 증가하는 토큰 비용을 지불하면서 자체적으로 축적된 기록에 빠져들며, 대화 내부 및 대화 간 누락된 재호출을 발생시킨다. 현재의 대응 방식은 이를 저장 및 검색 문제로 간주한다. 우리는 이러한 프레이밍이 너무 협소하다고 주장한다. 에이전트가 마음속에 보유하는 정보를 능동적으로 관리하는 것은 단순한 저장소가 아닌 생애주기(lifecycle)에 해당한다. 즉, 무엇을 기억할지 결정하고, 이를 추출 및 구조화하고, 데이터 유형별로 적절한 저장소를 선택하며, 출처를 보존하면서 통합 및 망각을 수행하고, 현재 무엇이 관련성 있는지 판단하며, 다음에 필요한 것이 무엇인지 예측하고, 중요한 것을 잃지 않으면서 예산 내에서 컨텍스트를 압축하는 과정을 포괄한다. 본격적인 프로덕션 환경에서는 이 작업이 단일 사용자가 아닌 조직적 범위 계층 전반에 걸쳐 이루어진다. 우리는 이러한 학문 분야를 에이전트 컨텍스트 관리(Agentic Context Management, ACM)라고 명명하고, 이를 아키텍처링(architecting), 수집(ingesting), 스코핑(scoping), 예측(anticipating), 압축 및 통합(compacting & consolidation)의 다섯 가지 기본 요소로 분해한다. 그런 다음 경제적 측면을 제시한다. 즉, 단순 컨텍스트 누적은 대화 길이에 따라 토큰 비용을 이차적으로 증가시키고, 조잡한 요약은 정확도 급락을 대가로 선형 비용을 초래하며, 검증된 압축만이 충실도를 유지하면서 선형 비용을 달성한다. 우리는 다섯 가지 기본 요소를 다중 테넌트 서비스로 구현한 참조 구현체인 Maximem Synap을 설명하며, 섹션 6에 상세히 기술된 구성 하에 LongMemEval에서 92%, LoCoMo에서 93.2%의 성능을 보고한다. 마지막으로 기존 벤치마크가 아포착하지 못하는 차원들, 즉 지연 시간, 토큰 효율성, 컨텍스트 변질 저항(context-rot resistance), 그리고 이 범주가 지향하는 의사결정 수준 및 조직 수준 컨텍스트의 최전선을 언급하며 마무리한다.
English
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.