Structured memory
How Agent Swarm captures project knowledge and keeps context from overflowing.
The context-window problem is really a memory problem. Agent Swarm solves it by treating project knowledge as structured, maintained data rather than an ever-growing transcript.
Beyond text files
Most tools store memory as flat files — rules, AGENTS.md, skills. Agent Swarm keeps those, but adds a materialized knowledge base: structured records capturing the project's architecture, decisions, and conventions.
When parts of the project change, a triggered agent updates the relevant knowledge asynchronously. The interactive agent doesn't carry that burden — it just reads the current knowledge when it needs it.
Automatic distillation
Long chats don't keep growing their context. When a thread exceeds a threshold of new messages since its last checkpoint, a distill sub-agent summarizes the conversation into durable documents.
- Agent streams are transitory audit trails.
- Documents are the source of truth fed to future runs.
chat turn ─┐
chat turn ─┤── distill ──▶ project-spec.md, decisions, conventions
chat turn ─┘ (loaded on demand, not replayed)
Automatic context
New chats don't require manually pre-loading important context. A request goes through a system that loads the appropriate context for that specific request — so you start productive without pasting in background every time.
Documents vs. streams
| Kind | Lifetime | Role |
|---|---|---|
| Stream | per turn | raw audit trail of one execution |
| Document | persistent | distilled truth fed to future agents |
| Knowledge | persistent | structured architecture & decisions |
The result: agents stay grounded in how your project actually works, without you babysitting the context window.