Back to KB
Difficulty
Intermediate
Read Time
7 min

LLM-Wiki: Multi-Agent Memory Without RAG

By Codcompass TeamΒ·Β·7 min read

Structured Text as the Universal Agent Interface: Building Resilient Multi-Agent Workflows

Current Situation Analysis

Modern multi-agent architectures suffer from a fundamental memory crisis. As teams scale agent swarms, the mechanisms for sharing state between specialized models become the primary bottleneck. The industry has converged on two dominant patterns, both of which introduce significant technical debt.

The first pattern is JSON State Accumulation. Agents pass a growing JSON blob in the system prompt. This approach is simple to implement but degrades rapidly. The context window fills with redundant data, contradictions emerge as the blob grows, and token costs scale linearly with task length. Humans cannot audit the state, and the model's attention dilutes as irrelevant history accumulates.

The second pattern is Retrieval-Augmented Generation (RAG). This offloads memory to a vector database. While scalable, RAG introduces latency, embedding costs, and a "synthesis gap." The vector store holds raw chunks; the agent must re-synthesize facts on every query. Updates require re-embedding, and similarity search often returns fragmented or duplicate information. The memory is opaque, and the retrieval step adds a failure mode where relevant context is simply missed.

Both approaches treat memory as a retrieval problem. Andrej Karpathy's April 2026 analysis of the "LLM-Wiki" pattern identifies a critical insight: memory should be synthesis, not retrieval. By shifting the synthesis burden to write-time and using structured text files as the shared state, teams can eliminate vector infrastructure, reduce token bloat, and create a memory layer that is instantly auditable by humans.

This pattern replaces complex memory stacks with a shared directory of markdown files. Agents do not message each other; they edit a shared document. The next agent reads the result. This decouples agents, enforces structure, and leverages the robustness of filesystem semantics.

WOW Moment: Key Findings

The Wiki pattern fundamentally alters the cost and reliability profile of multi-agent systems. By moving synthesis upstream, the system optimizes for long-running, structured workflows where state integrity and human readability are paramount.

The following comparison highlights the operational differences between JSON state, RAG, and the Wiki pattern.

StrategyWrite CostRead CostHuman AuditabilityConcurrency SafetySynthesis Timing
JSON StateLowHigh (Bloat)LowLow (Race conditions)Every turn
RAGHigh (Embed)Low (Search)MediumMedium (Stale indices)Query-time
Wiki PatternMedium (Synthesis)Low (Direct)HighHigh (Optimistic locking)Write-time

Why this matters: The Wiki pattern incurs a moderate write cost because the agent must distill information into structured markdown. However, this investment pays dividends during reads. Subsequent agents fetch concise, synthesized sections directly without searching or parsing bloated JSON. The pattern enables optimistic concurrency control via version numbers, allowing humans to edit files mid-run without agents silently overwriting

πŸŽ‰ Mid-Year Sale β€” Unlock Full Article

Base plan from just $4.99/mo or $49/yr

Sign in to read the full article and unlock all 635+ tutorials.

Sign In / Register β€” Start Free Trial

7-day free trial Β· Cancel anytime Β· 30-day money-back