This commit is contained in:
2026-06-01 10:46:01 +08:00
parent 2faf4bb002
commit e96b955fda
221 changed files with 10219 additions and 332 deletions

View File

@@ -0,0 +1,41 @@
---
title: "Context Management上下文管理"
created: 2026-05-23
updated: 2026-05-23
type: concept
tags: [agent, context, memory, prompt]
sources: [raw/papers/agent-harness-engineering-survey-2026.md]
confidence: high
---
# Context & Memory ManagementC 层)
> ETCLOVG 的 C 层:控制模型在短期、会话级和持久视野中能看到什么。从 Prompt Engineering 演进而来。
## 三层视野
- **短期Active Context Window**compaction、tool-result clearing、prompt-cache-aware ordering
- **中期Session State**:跨运行持久化、会话状态管理
- **长期Persistent Memory**:向量存储、知识图谱、写入-管理-读取循环
## 核心挑战上下文漂移Context Drift
最深的上下文问题不是装更多 token而是保持 Agent 的**工作状态与真实任务状态对齐**。
每次压缩、检索、遗忘操作都可能删除约束、扭曲优先级或保留过时假设。
## 重新框架:上下文作为状态估计
Zhang et al. (2025) 和 Du (2026) 将 Agent 记忆形式化为**写入-管理-读取循环**。未来系统需要:
- 不确定性感知摘要
- 事实溯源provenance
- 矛盾处理
- 显式陈旧标记
- 从持久化产物重建状态的恢复程序
## 相关概念
- [[context-state-estimation]] — 上下文作为状态估计
- [[reliable-state-long-running-agents]] — 长期状态维护
- [[prompt-to-harness-evolution]] — 从 Prompt 到 Context 的演进
- [[agent-harness-engineering-survey]]