Stash Gives Your AI Agents a Memory That Actually Persists
If you've been building with AI agents for any length of time, you've hit the wall. You know the one — your agent finishes a brilliant multi-step task, you close the session, and next time it starts from absolute zero. No memory of what it learned. N...
alan-west.hashnode.dev5 min read
the "agent finishes a task, then starts from zero" wall is real — i kept hitting it from a different angle than postgres-backed stash: file-system based.
my version: one tiny
MEMORY.md(≤200 lines, loaded every turn) as index +.skills/<feature>.mdper subsystem loaded conditionally +replay.mdnext to each skill containing the actual prompts that produced the rule (when behavior drifts, re-derive instead of patch).honest trade-off vs postgres approach: file-system is grep-able + git-versioned (blame why a rule exists), but doesn't scale to 100k facts. does stash support expiry / decay? half my pain isn't "no memory" but "too much stale memory polluting context".
the part that resonated most: "starts from zero" is the easy failure. the silent worse one is when memory IS persisted but diverges from current code state → agent acts on yesterday's truth.
been collecting these patterns (skill files / AGENTS.md / MEMORY shards / MCP configs) on tokrepo.com/en — public registry, mostly file-system patterns; postgres/vector ones welcome to add.