
Stateless Agent Memory Engine (SAME)
@sgx-labs
关于 Stateless Agent Memory Engine (SAME)
Memory with integrity for AI coding agents. SAME tracks provenance, flags stale knowledge, and surfaces contradictions; so your AI trusts what's current, not what's outdated.
基本信息
配置
使用下面的配置,将此服务器添加到你的 MCP 客户端。
{
"mcpServers": {
"same": {
"command": "npx",
"args": [
"-y",
"@sgx-labs/same",
"mcp",
"--vault",
"/path/to/your/notes"
]
}
}
}工具
12Create a session handoff note so the next session picks up where this one left off. Write what you worked on, what's pending, and any blockers. Args: summary: What was accomplished this session pending: What's left to do (optional) blockers: Any blockers or open questions (optional) Returns path to the handoff note.
Find notes that cover similar topics to a given note. Use this to discover related context, find notes that might conflict, or build a broader picture of a topic. Args: path: Relative path of the source note top_k: Number of similar notes (default 5, max 100) Returns list of related notes ranked by similarity.
Read the full content of a note. Use this after search_notes returns a relevant result and you need the complete text. Paths are relative to the vault root. Args: path: Relative path from vault root (as returned by search_notes) Returns full markdown text content.
Get orientation context for a new session. Returns pinned notes, the latest handoff, and recent decisions — everything you need to pick up where the last session left off. Returns structured session context.
Check the health and size of the note index. Use this to verify the index is up to date or to report stats to the user. Returns note count, chunk count, last indexed timestamp, embedding model info, and database size.
Get recently modified notes. Use this to see what's changed recently or to orient yourself at the start of a session. Args: limit: Number of recent notes (default 10, max 50) Returns list of recently modified notes with titles and paths.
Re-scan and re-index all markdown notes. Use this if the user has added or changed notes and search results seem stale. Incremental by default (only re-embeds changed files). Args: force: Re-embed all files regardless of changes (default false) Returns indexing statistics.
Log a project decision. Appends to the decision log so future sessions can find it. Args: title: Short decision title (e.g. 'Use JWT for auth') body: Full decision details — what was decided, why, alternatives considered status: Decision status — 'accepted', 'proposed', or 'superseded' (default 'accepted') Returns confirmation.
Create or update a markdown note in the vault. The note is written to disk and indexed automatically. Args: path: Relative path within the vault (e.g. 'decisions/auth-approach.md') content: Markdown content to write append: If true, append to existing file instead of overwriting (default false) Returns confirmation with the saved path.
Search across multiple registered vaults at once. Use this instead of search_notes when you need context from other projects or want a cross-project view. Vaults must be registered first via the CLI (`same vault add <name> <path>`). Args: query: Natural language search query top_k: Number of results (default 10, max 100) vaults: Comma-separated vault aliases to search. Omit to search all registered vaults. Unknown aliases are silently skipped. Returns ranked results with titles, paths, snippets, and source vault name.
Search the user's knowledge base for relevant notes, decisions, and context. Use this when you need background on a topic, want to find prior decisions, or need to understand project architecture. Args: query: Natural language search query (e.g. 'authentication approach', 'database schema decisions') top_k: Number of results (default 10, max 100) Returns ranked list of matching notes with titles, paths, and text snippets.
Search the user's knowledge base with metadata filters. Use this when you want to narrow results by domain (e.g. 'engineering'), workstream (e.g. 'api-redesign'), or tags. Args: query: Natural language search query top_k: Number of results (default 10, max 100) domain: Filter by domain (e.g. 'engineering', 'product') workstream: Filter by workstream/project name tags: Comma-separated tags to filter by Returns filtered ranked list.
概览
What is Stateless Agent Memory Engine (SAME)?
Stateless Agent Memory Engine (SAME) gives your AI persistent memory from your existing markdown notes (any folder of .md files) — no cloud, no API keys, one binary. It integrates with AI coding tools like Claude Code, Cursor, and Windsurf via MCP (Model Context Protocol), and is designed for developers who want their AI assistant to retain context across sessions.
How to use Stateless Agent Memory Engine (SAME)?
Install via curl -fsSL statelessagent.com/install.sh | bash or npm install -g @sgx-labs/same. Run same init inside your project directory to set up hooks and MCP configuration automatically. Then you can query your notes with same ask "your question" or add the MCP server manually to any MCP client using npx -y @sgx-labs/same mcp --vault /path/to/notes.
Key features of Stateless Agent Memory Engine (SAME)
- Semantic search via local Ollama embeddings (keyword fallback built‑in)
- Session handoffs and crash‑safe recovery between AI sessions
- Automatic decision extraction remembers architectural choices
- 12 MCP tools for reading, writing, and session management
- Three‑tier privacy structure:
_PRIVATE/never indexed - Works fully offline in Lite mode with zero external dependencies
Use cases of Stateless Agent Memory Engine (SAME)
- AI assistant picks up where you left off after a new session starts
- Past architectural decisions surface automatically without re‑debate
- Each project maintains its own separate memory vault
- Context survives accidental terminal closure via handoff notes
- Ask questions about your own notes and get cited answers
FAQ from Stateless Agent Memory Engine (SAME)
Does Stateless Agent Memory Engine (SAME) require a cloud service?
No. SAME runs entirely locally. All data stays on your machine; there is no cloud dependency, no telemetry, and no API keys required.
What runtime dependencies does SAME need?
SAME Lite operates with zero external dependencies (SQLite FTS5 for keyword search). For semantic search and RAG (same ask), Ollama must be installed to provide embeddings and a chat model. Without Ollama, all features still work with keyword fallback.
How does SAME compare to alternatives like mem0 or Letta?
Per the README comparison table, SAME requires one command to set up versus pip + config (mem0) or Docker + PostgreSQL (Letta). It has a ~10MB binary, is fully offline capable, provides 12 MCP tools, and includes Claude Code hook integration. Benchmarks show retrieval precision of 99.5% and MRR of 0.949.
Where does SAME store its data?
Your markdown notes remain in your chosen directory. SAME creates a local SQLite database (with vector and FTS5 indexes) within the vault directory. Notes marked _PRIVATE/ are never indexed; research/ notes are indexed but git‑ignored by default.
What license is SAME released under?
Business Source License 1.1 (BSL 1.1). Free for personal, educational, hobby, research, and evaluation use. Converts to Apache 2.0 on 2030‑02‑02.
记忆与知识 分类下的更多 MCP 服务器
Docs MCP Server
araboldGrounded Docs MCP Server: Open-Source Alternative to Context7, Nia, and Ref.Tools
Basic Memory
basicmachines-coAI conversations that actually remember. Never re-explain your project to your AI again. Join our Discord: https://discord.gg/tyvKNccgqN
Notion MCP Server
makenotionOfficial Notion MCP Server
mcp-local-rag
nkapila6"primitive" RAG-like web search model context protocol (MCP) server that runs locally. ✨ no APIs ✨
Notion MCP Server
awkoyNotion MCP server for Claude, Cursor, ChatGPT & Claude Desktop. Connect AI agents to Notion via Model Context Protocol — pages, databases, blocks, comments, files.
评论