Agents Shouldn't Pass Context. They Should Share Memory
Описание и применение
Многопроцессорные цепочки агентов часто растягивают контекст, увеличивая стоимость и задержку. Решение – использовать совместную память с хранением в трех уровнях (эпизодический, семантический, процедурный) и ограничивать размер передаваемого контента токен‑бюджетом. Это стабилизирует расходы и ускоряет работу.
Задача
Multi‑agent chains accumulate token‑heavy context, driving up cost, latency, and diluting attention.
Результат
Token consumption per round became a fixed budget, eliminating linear growth; cost and latency stabilized across long chains and multi‑session use.
Рабочий процесс
- 1. Agent writes output to an append‑only episodic log (L1).
- 2. Asynchronously project new log entries into the semantic tier (L2) via LLM extraction.
- 3. Agent retrieves a token‑budgeted slice from both L1 (fresh events) and L2 (distilled facts).
- 4. Agent performs its task and appends its result to L1.
- 5. Repeat for each agent in the chain; on new sessions, L2 provides cross‑session beliefs.
- 6. Periodically rebuild L2/L3 from L1 if needed for consistency.
Доказательства
Agents do not hand anything to each other directly. Each agent writes its output to a shared memory layer, and the next agent retrieves only the slice it needs, capped to a token budget.
The episodic tier (L1) is an append‑only log of everything that happens in a session…
If Agent A produced forty thousand tokens of investigation and Agent B needs the three thousand tokens of conclusion, B receives three thousand.
- Дата записи: 2026-09-09T02:15:22.700Z