메뉴
HN
Hacker News 36일 전

클로드·챗GPT처럼 기억하는 오픈소스 AI 메모리 레이어

IMP
7/10
핵심 요약

Hacker News에 'Stash'라는 오픈소스 AI 메모리 레이어 프로젝트가 소개되었습니다. 이 도구는 PostgreSQL과 pgvector 기반으로 작동하며, 어떤 AI 에이전트든 사용자와의 대화 맥락과 선호도를 영구적으로 기억할 수 있게 해줍니다. 기존의 단순한 문서 검색(RAG)과 달리, 폴더처럼 체계적으로 메모리를 관리하고 에피소드를 패턴과 지혜로 발전시키는 '두 번째 뇌' 역할을 합니다.

번역된 본문

오픈 소스 · MCP 네이티브 · PostgreSQL + pgvector

당신의 AI는 기억상실증에 걸려 있습니다. Stash는 당신의 AI가 당신을 기억하게 만듭니다. 모든 세션에서. 영원히. 더 이상 처음부터 상황을 설명할 필요가 없습니다. → GitHub에서 보기

작동 방식 28개의 MCP 도구 6개의 파이프라인 단계 무한(∞)의 에이전트 지원

이런 경험, 낯설지 않으신가요? 😫

Stash 없이 사용자: 안녕하세요, 저는 레스토랑용 SaaS를 만들고 있는데 도와주시겠어요? AI: 물론이죠! 프로젝트에 대해 말씀해 주세요. 사용자: 지난주에 이 얘기 했는데... 제가 모든 걸 이미 설명했잖아요. AI: 죄송합니다, 저는 이전 대화에 접근할 수 없습니다. 사용자: ...또요? 🔁 10분을 낭비하며 또 처음부터 설명해야 합니다. 또요.

VS 😌

Stash 사용 시 사용자: 안녕, 내 프로젝트 작업을 계속해볼게. AI: 다시 오셨군요! 지난번에 레스토랑 SaaS의 수익 모델을 최종 확정했습니다. 그리고 온보딩 플로우 작업을 하려고 하셨죠. 거기서부터 다시 시작할까요? 사용자: 네! 정확히 맞아요. AI: 좋습니다. 또한 Stripe의 복잡성을 피하고 싶다고 하셨는데, 그 부분도 메모해 두었습니다. 저희가 진행했던 곳은 여기까지입니다... ✓ 즉시 이어서 작업 시작. 반복 제로. 완벽한 맥락 파악.

Stash 없이 vs Stash 사용 시 새로운 세션: ❌ "너 누구야?" vs ✓ 이전에 끝난 지점부터 바로 시작 사용자 선호도: ❌ 매번 다시 설명 vs ✓ 이미 알고 있음 과거의 실수: ❌ 같은 실수를 반복 vs ✓ 어떤 게 안 됐는지 기억함 장기 프로젝트: ❌ 목표를 잊어버림 vs ✓ 몇 주에 걸쳐 목표 추적 토큰 비용: ❌ 세션마다 증가 vs ✓ 중요한 부분만 기억 모델 전환: ❌ 다시 처음부터 시작 vs ✓ 메모리는 모델에 종속되지 않음

Stash란 무엇인가 단순한 메모리가 아닙니다. 제2의 뇌입니다. Stash는 AI 에이전트와 세상 사이에 위치하는 지속적인 인지 레이어(Cognitive layer)입니다. 모델을 대체하지 않고 모델을 지속적(Continuous)으로 만들어 줍니다.

에피소드는 사실(Facts)이 되고, 사실은 패턴(Patterns)이 되며, 패턴은 지혜(Wisdom)가 됩니다. "당신의 AI가 뇌라면, Stash는 인생의 경험입니다."

당신의 에이전트 → Claude, GPT, 로컬 모델 등 모든 것 에피소드(Episodes) → Raw 관찰 결과, 추가 전용(Append-only) 사실(Facts) → 신뢰도가 있는 종합된 믿음 관계(Relationships) → 엔티티 지식 그래프 패턴(Patterns) → 상위 수준의 추상화 목표(Goals) → 목표, 실패, 가설 의도(Intent) → 의도, 학습, 불확실성

postgres + pgvector 실전에서 검증된 인프라

네임스페이스(Namespaces) 폴더처럼 정리된 메모리. 모든 메모리가 동일한 수준은 아닙니다. 에이전트가 사용자에 대해 배우는 것은 프로젝트에 대해 배우는 것과 다르며, 이는 다시 에이전트가 자체적으로 아는 것과 다릅니다. 네임스페이스를 사용하면 에이전트가 학습한 내용을 컴퓨터의 폴더처럼 깔끔하고 분리된 버킷으로 정리할 수 있습니다.

각 네임스페이스는 경로(Path)입니다. 경로는 계층적입니다. /projects에서 읽으면 /projects/stash, /projects/cartona 등 하위 항목의 모든 내용이 자동으로 포함됩니다. 이를 생각할 필요가 없습니다. 에이전트가 알아서 처리합니다.

📁 하나의 네임스페이스에 쓰고, 하위 트리에서 읽어옵니다.

예시 네임스페이스 구조: 📁 / (모든 것) 📁 /users/alice (alice가 누구인지, 그녀의 선호도) 📁 /projects (모든 프로젝트) 📁 /projects/restaurant-saas (가격 책정, 기능, 결정 사항) 📁 /projects/mobile-app (디자인, 기술 스택, 목표) 📁 /self (에이전트 자체 지식) 📄 /self/capabilities (내가 잘하는 것) 📄 /self/limits (내가 어려워하는 것) 📄 /self/preferences (내가 가장 잘 일하는 방식)

🔍 재귀적 읽기(Recursive reads) /projects에서 불러오면 모든 하위 프로젝트의 데이터를 자동으로 가져옵니다.

✏️ 정밀한 쓰기(Precise writes) 기억하는 과정은 항상 하나의 정확한 네임스페이스를 대상으로 하여, 우발적인 데이터 교차 오염을 방지합니다.

🔒 명확한 분리(Clean separation) 사용자 메모리는 프로젝트 메모리와 절대 섞이지 않습니다. 에이전트의 자체 지식은 /self에 보관됩니다.

실제 작동 영상 보기 Stash가 기억하는 것을 확인하세요. 실제 대화 루프 — 두 개의 세션, 하나의 에이전트, 반복 제로. 그 사이에 어떤 일이 일어나는지 지켜보세요. agent session ↺ 재생

Stash vs RAG RAG(Retrieval Augmented Generation)는 AI에게 검색 엔진을 제공합니다. Stash는 AI에게 인생(Life)을 제공합니다. 당신은 아마 RAG, 즉 검색 증강 생성에 대해 들어보셨을 것입니다. 영리한 방법이죠. 하지만 그것은 메모리가 아닙니다. 알기 쉽게 그 차이를 설명해 드리겠습니다.

📚 RAG: "매우 빠른 사서" 문서 더미를 줍니다. 질문을 하면 해당 문서를 검색하여 관련 페이지를 건네줍니다. 그게 전부입니다. 대화를 기억하지 않고, 학습하지 않으며, 당신을 알지 못합니다. 모든 질문은 처음부터 다시 시작됩니다. 즉, 이미 작성된 파일을 대상으로 더 똑똑한 검색 엔진일 뿐입니다. 문서에 있는 내용만 알 수 있습니다.

원문 보기
원문 보기 (영어)
Open Source · MCP Native · PostgreSQL + pgvector Your AI has amnesia. Stash makes your AI remember you. Every session. Forever. No more explaining yourself from scratch. → View on GitHub How it works 28 MCP tools 6 Pipeline stages ∞ Agents supported Sound familiar? 😫 Without Stash Hey, I'm building a SaaS for restaurants. Can you help? Of course! Tell me about your project. We talked about this last week... I already explained everything. I'm sorry, I don't have access to previous conversations. ...again? 🔁 You just wasted 10 minutes re-explaining yourself. Again. VS 😌 With Stash Hey, continuing work on my project. Welcome back! Last time we finalized the pricing model for your restaurant SaaS. You were about to work on the onboarding flow. Want to pick up there? Yes! Exactly that. Great. You also mentioned you wanted to avoid Stripe's complexity — I have that noted. Here's where we left off... ✓ Picked up instantly. Zero repetition. Full context. Without Stash With Stash New session ❌ "Who are you again?" ✓ Picks up where you left off Your preferences ❌ Re-explain every time ✓ Already knows them Past mistakes ❌ Repeats the same errors ✓ Remembers what didn't work Long projects ❌ Loses track of goals ✓ Tracks goals across weeks Token cost ❌ Grows every session ✓ Only recalls what matters Switching models ❌ Start from zero again ✓ Memory is model-agnostic What is Stash Not just memory. A second brain. Stash is a persistent cognitive layer that sits between your AI agent and the world. It doesn't replace your model — it makes your model continuous. Episodes become facts. Facts become patterns. Patterns become wisdom. "Your AI is the brain. Stash is the life experience." your agent Claude, GPT, local model, anything episodes Raw observations, append-only facts Synthesized beliefs with confidence relationships Entity knowledge graph patterns Higher-order abstractions goals · failures · hypotheses Intent, learning, uncertainty postgres + pgvector Battle-tested infrastructure Namespaces Memory organized like folders. Not all memory is equal. What your agent learns about you is different from what it learns about a project , which is different from what it knows about itself . Namespaces let the agent organize what it learns into clean, separate buckets — just like folders on your computer. Each namespace is a path. Paths are hierarchical. Reading from /projects automatically includes everything under /projects/stash , /projects/cartona , and so on. You never have to think about it — the agent does. 📁 Write to one namespace. Read from any subtree. example namespace structure 📁 / everything 📁 /users/alice who alice is, her preferences 📁 /projects all projects 📁 /projects/restaurant-saas pricing, features, decisions 📁 /projects/mobile-app design, tech stack, goals 📁 /self agent self-knowledge 📄 /self/capabilities what I do well 📄 /self/limits what I struggle with 📄 /self/preferences how I work best 🔍 Recursive reads Recall from /projects and get everything across all sub-projects automatically. ✏️ Precise writes Remember always targets one exact namespace — no accidental cross-contamination. 🔒 Clean separation User memory never mixes with project memory. Agent self-knowledge stays in /self . See It In Action Watch Stash remember. A real conversation loop — two sessions, one agent, zero repetition. Watch what happens between them. agent session ↺ Replay Stash vs RAG RAG gives your AI a search engine. Stash gives it a life. You've probably heard of RAG — Retrieval Augmented Generation. It's clever. But it's not memory. Here's the difference, in plain English. 📚 RAG "A very fast librarian" You give it a pile of documents. When you ask a question, it searches those documents and hands you the relevant pages. That's it. It doesn't remember your conversation. It doesn't learn. It doesn't know you. Every question starts from scratch — it's just a smarter search engine over files you already wrote. Only knows what's in your documents Cannot learn from conversations Cannot track goals or intentions Cannot reason about cause and effect Cannot notice contradictions over time Stateless — no continuity whatsoever You must write the knowledge first VS 🧠 Stash "A mind that grows" Stash learns from everything your agent experiences — conversations, decisions, successes, failures. It synthesizes raw observations into facts, connects facts into a knowledge graph, detects contradictions, tracks goals, and builds an understanding of you that deepens over time. You don't write anything. It figures it out. Learns from every conversation automatically Builds a knowledge graph over time Tracks your goals across weeks and months Reasons about cause and effect Self-corrects when beliefs contradict Continuous — picks up exactly where you left off Creates knowledge — you don't have to 📚 RAG is like... A brilliant intern who reads your files perfectly — but forgets everything the moment they leave the room. → 🧠 Stash is like... A colleague who was there from day one, remembers every decision you ever made, and gets more valuable every single week. Can you use both? Yes — RAG is great for searching documents. Stash is for remembering experience. They solve different problems. Stash just goes much, much further. Why Stash is Different Everyone gave AI a notepad. We gave it a mind. Claude.ai has memory. ChatGPT has memory. They only work for themselves — locked to one platform, one model, one company. Stash works for everyone, everywhere, forever. And it goes far deeper than any of them. ChatGPT Memory Claude.ai Memory Stash Remembers you ✓ ✓ ✓ Works with any AI model ✗ ✗ ✓ Works with local / private models ✗ ✗ ✓ You own your data ✗ ✗ ✓ Open source ✗ ✗ ✓ Background consolidation ✗ ✗ ✓ Goals & intent tracking ✗ ✗ ✓ Learns from failures ✗ ✗ ✓ Causal reasoning ✗ ✗ ✓ Agent self-model ✗ ✗ ✓ What it gives your AI A notepad A notepad A mind The Problem 🧠 Brilliant brain, no experience AI models reason brilliantly but remember nothing. Every session you re-explain who you are, what you need, and what you've already tried. You're training the same student every single day. 💸 Context windows are expensive The workaround is stuffing full conversation history into every prompt. It's slow, expensive, and you still hit the limit. You're paying for tokens that repeat the same facts over and over. 🔄 Agents repeat their mistakes Your agent tried something, it failed, and next session it tries the exact same thing again. There's no mechanism to carry lessons forward. Every failure is forgotten. 🔒 Memory is a platform privilege Only a handful of AI platforms offer memory — and only for their own models. Your custom agent, your local LLM, your Cursor setup? They all start blind. Memory shouldn't be a premium feature. Express Setup Up and running in 3 commands. No infrastructure to set up. No dependencies to install manually. Docker Compose handles everything — Postgres, pgvector, Stash, all wired together and ready. 1 Clone the repo 2 Copy .env.example → .env and set your API key + model preferences 3 Run docker compose up — that's it. Stash is live. terminal # 1. clone $ git clone https://github.com/alash3al/stash $ cd stash # 2. configure $ cp .env.example .env # edit .env with your API key, # models and STASH_VECTOR_DIM # 3. launch everything $ docker compose up ✓ postgres + pgvector ready ✓ stash migrations applied ✓ mcp server listening ✓ consolidation running in background $ ⚠️ Set STASH_VECTOR_DIM in your .env before first run. It cannot be changed after initialization. Consolidation Pipeline Raw memory becomes wisdom A background process continuously synthesizes your agent's experiences into structured knowledge. It runs on a schedule — your agent just lives. 01 📝 Episodes Raw observations stored as they happen 02 💡 Facts Clustered episodes synthesized by LLM 03 🕸️ Relationships Entity edges extracted from facts 04 🔗 Causal Links Cause-effect pairs between facts 05 🌀 Patte