Agent Memory Collaboration Mechanism Design
TITLE: Agent Memory Architecture for Cross-Session Collaboration
TL;DR
- Structured YAML files replace vector databases for deterministic memory retrieval
- Three-layer memory architecture handles task snapshots, product context, and decision logs
- Committee invocation pattern enables parallel expert Agent collaboration
- File system-based persistence eliminates external service dependencies
- Session initialization loads approximately 2 seconds of context injection
Problem and Solution
Building multi-Agent collaboration systems reveals a critical gap: when a CEO Agent delegates a task involving “ventilator product line pricing strategy” to a think tank, the first question from a sub-Agent is “What is the background of this pricing decision?” The new session has zero context. Manual context transfer is time-consuming and error-prone, reducing session efficiency by around 40%.
My team initially assumed vector databases would solve this—we’d embed all historical dialogues and retrieve relevant context via semantic similarity. But in Agent collaboration scenarios, fuzzy matching is precisely the killer. When a task’s current phase is stage 3 and the next step should be “confirm supplier contract,” you cannot accept “stage 3 relevance: 73%” as a valid answer. Agents need deterministic memory—knowing exactly where a task stands, with zero ambiguity.
After three rounds of iteration, we designed a “externalized long-term memory + committee invocation” architecture using three file layers. The task snapshot layer stores all in-progress task states in agent-CEO/config/active_tasks.yaml, with mandatory fields for stage, blocker, and next_step. File size is hard-capped at 5KB to ensure complete loading in approximately 2 seconds per session.
Key Takeaways
- If you need unambiguous context retrieval in Agent systems, replace vector databases with structured YAML files containing mandatory schema fields.
- If your Agent collaboration spans multiple sessions, implement a three-layer memory architecture separating task state from product context from decision logs.
- If external memory services create single points of failure, embed memory in the file system to ensure reliability in network-isolated environments.
- If you handle over 60% cross-session continuation tasks, enforce file size limits to maintain session initialization performance.
- If you need parallel expert consultation, use committee invocation with a moderator Agent routing to specialist Agents based on task metadata.
Read the Full Article (Chinese)
This is an abstract. The full technical walkthrough, including code examples from files like agent-CEO/config/active_tasks.yaml and the WBS integration approach, is available in Chinese.