Stash: The Shared Memory Hub That Finally Gives Your Coding Agents a Unified Brain

By Prahlad Menon 3 min read

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:

MetricWithout StashWith Stash
Tool calls272~137
Agent turns123~71
Wasted actions192~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:

ToolPrimary Use Case
StashTeam-wide transcript sharing, cross-agent collaboration
soul.pyPer-agent persistent memory, RAG + RLM tiers
MEMORY.md patternsProject-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:

  1. Persistent memory — agents that remember (soul.py, MEMORY.md)
  2. Shared memory — agents that collaborate (Stash)
  3. Structured context — agents that understand codebases (codebase-memory-mcp)
  4. 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.