Stash: The Shared Memory Hub That Finally Gives Your Coding Agents a Unified Brain
Your AI coding agents are generating thousands of dollars worth of insights every weekâand throwing most of it away.
When you run Claude Code or Cursor on a complex debugging session, youâre creating valuable transcripts: the hypotheses tested, the dead ends explored, the reasoning that led to a fix. But tomorrow, when your teammate hits the same bug, their agent starts from zero. When you switch machines, that context is gone. When you spin up a new agent instance, it reinvestigates paths you already ruled out.
Stash from Fergana Labs solves this by streaming every agent session into a shared, queryable memory layer.
The 49% Velocity Improvement
The Stash team ran an experiment that every engineering leader should see. They had Claude Code fix the same real bug multiple timesâsome instances with access to shared transcripts from previous attempts, some without.
The results were striking:
| Metric | Without Stash | With Stash |
|---|---|---|
| Tool calls | 272 | ~137 |
| Agent turns | 123 | ~71 |
| Wasted actions | 192 | ~5 |
97% reduction in wasted work. The agent with transcript access could skip past hypotheses that earlier sessions had already disproven. Instead of re-discovering that the memory leak wasnât in the webhook handler, it read that conclusion from history and moved on.
This aligns with Andrej Karpathyâs vision for LLM knowledge bases:
âRaw data from a given number of sources is collected, then compiled by an LLM into a .md knowledge base, then operated on by various CLIs by the LLM to do Q&A and to incrementally enhance it⌠I think there is room here for an incredible new product instead of a hacky collection of scripts.â
Stash is that product.
How It Works
The architecture is elegantly simple:
Your Agent â Stash CLI Hook â Shared Virtual Filesystem
â
Semantic Search + Keyword Search + Real-time Sync
â
Any Agent on Your Team
Sessions stream automatically. A hook for your coding agent pushes every transcriptâprompts, tool calls, artifactsâinto your Stash.
Agents query it like a filesystem. The virtual filesystem shell exposes your entire knowledge base:
stash vfs ls /
stash vfs "tree / -L 2"
stash vfs "rg \"database migration\" /"
Skills bundle shareable knowledge. Package pages and sessions into one link. Publish publicly or fork into your own Stash.
Real-World Usage
Hereâs what it looks like when an agent leverages shared memory:
> What did Sam conclude about the memory leak?
â stash history search "memory leak build() file_cache"
Sam's session from last night (22 events):
- Sam identified 10 build() calls/min from _draft_refresh_loop
- Sam fixed GmailClient with lazy init + context managers
- Leak is still active post-fix: 4.5-7.1 MB/min growth
â Reading Sam's commits and checking production metrics...
Sam's fix covered GmailClient. But CalendarClient has no close()
anywhere. Let me re-apply my __del__ fix on top of Sam's commits.
The agent didnât waste 20 minutes re-investigating the webhook handler. It read Samâs transcript, understood the current state, and picked up exactly where the team left off.
Installation
Getting started takes one command:
pip install stashai
stash signin
Or the one-liner that bootstraps everything:
bash -c "$(curl -fsSL https://joinstash.ai/install)"
The signin flow connects your current repo and wires up coding agent plugins automatically. Stash supports:
- Claude Code â native hook
- Cursor â native hook
- Codex â native hook
- OpenCode â native hook
- Gemini CLI â manual plugin
- OpenClaw â manual plugin
Different teammates can use different agents against the same shared brain.
Self-Hosting for Privacy
For teams that need data sovereignty, Stash is fully self-hostable:
git clone https://github.com/Fergana-Labs/stash.git
cd stash
cp .env.example .env
docker compose -f docker-compose.prod.yml -f docker-compose.local.yml up -d
Privacy-first design:
- LLM calls are optional (only used for âask the stashâ and auto-titles)
- Your Stash is private by default
- Transcript uploads are opt-in
- MIT licensed for commercial use
How Stash Fits With Other Memory Solutions
If youâve been following the agent memory space, you might wonder how Stash relates to tools like soul.py or AgentMemory.
The distinction is scope:
| Tool | Primary Use Case |
|---|---|
| Stash | Team-wide transcript sharing, cross-agent collaboration |
| soul.py | Per-agent persistent memory, RAG + RLM tiers |
| MEMORY.md patterns | Project-specific context, design decisions |
Stash excels at collaboration. When your teammateâs Claude Code session contains insights your Cursor instance needs, Stash bridges them.
soul.py excels at continuity. When your agent needs to remember your preferences, past decisions, and accumulated project knowledge across sessions.
Theyâre complementary. A sophisticated setup might use Stash for team-wide transcript sharing while each agent maintains its own soul.py memory layer for personal context. Weâve written extensively about building persistent memory for coding agents and the RAG patterns that make it work.
The Bigger Picture
Weâre watching the emergence of proper infrastructure for AI agent systems. Just as web development needed databases, caches, and message queues, agent development needs:
- Persistent memory â agents that remember (soul.py, MEMORY.md)
- Shared memory â agents that collaborate (Stash)
- Structured context â agents that understand codebases (codebase-memory-mcp)
- Knowledge protocols â agents that share formats (Google OKF)
Stash represents a significant step in category #2. The 49% velocity improvement isnât just a benchmarkâitâs a preview of what becomes possible when agents stop operating in isolation.
Try It
GitHub: Fergana-Labs/stash
Website: joinstash.ai
Discord: Join the community
If your team runs multiple coding agentsâor even multiple instances of the same agentâyouâre likely duplicating significant work. Stash is the missing infrastructure that makes agent collaboration possible.
Building agent memory systems? Check out our comparison of soul.py vs AgentMemory, our guide to adding soul.py to any repo in 5 minutes, and our deep dive into the RAG patterns powering modern agent memory.