Stateless Agent Memory Engine (SAME)

by sgx-labs

305 downloads Not rated yet

About

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.

Explore

| Feature | Description | Requires Ollama? |
|---------|-------------|:-:|
| Semantic search | Find notes by meaning, not keywords | Yes |
| Keyword search (FTS5) | Full-text search fallback | No |
| same ask (RAG) | Ask questions, get cited answers from your notes | Yes (chat model) |
| Session handoffs | Auto-generated continuity notes | No |
| Session recovery | Crash-safe — next session picks up even if terminal closed | No |
| Decision extraction | Architectural choices remembered across sessions | No |
| Pinned notes | Critical context always included | No |
| File claims (same claim) | Advisory read/write ownership for multi-agent coordination | No |
| Context surfacing | Relevant notes injected into AI prompts | No |
| same demo | Try SAME in 60 seconds | No |
| same tutorial | 6 hands-on lessons | No |
| same doctor | 18 diagnostic checks | No |
| Push protection | Safety rails for multi-agent workflows | No |
| same seed install | One-command install of pre-built knowledge vaults | No
|
| Cross-vault federation | Search across all vaults at once | No |
| MCP server (12 tools) | Works with any MCP client | No
|
| Privacy tiers | _PRIVATE/ never indexed, research/ never committed | No |

*Semantic mode requires Ollama; keyword fallback is automatic.

---

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name Stateless Agent Memory Engine (SAME)
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

```bash

curl -fsSL statelessagent.com/install.sh | bash # direct binary
npm install -g @sgx-labs/same # or via npm

create_handoff

Create 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_similar_notes

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.

get_note

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_session_context

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.

index_stats

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.

recent_activity

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.

reindex

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.

save_decision

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.

save_note

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_vaults

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_notes

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_notes_filtered

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.

SAME exposes 12 tools via MCP for any compatible client.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "stateless agent memory engine (same)": {
            "same": {
                "command": "npx",
                "args": [
                    "-y",
                    "@sgx-labs/same",
                    "mcp",
                    "--vault",
                    "/path/to/your/notes"
                ]
            }
        }
    }
}

McpServers

{
    "same": {
        "command": "npx",
        "args": [
            "-y",
            "@sgx-labs/same",
            "mcp",
            "--vault",
            "/path/to/your/notes"
        ]
    }
}
License: BSL 1.1 Go Latest Release GitHub Stars MCP Tools Discord > Your AI forgets everything between sessions. Not anymore. Every time you start a new session with Claude Code, Cursor, or any AI coding tool, your agent starts from zero. Decisions you made yesterday? Gone. Context from last week? Gone. That architectural choice you spent 30 minutes discussing? You'll explain it again. SAME gives your AI persistent memory from your existing markdown notes (any folder of .md files — no Obsidian required). No cloud. No API keys. One binary.

See it in 60 seconds

``bash curl -fsSL statelessagent.com/install.sh | bash same demo ` same demo creates a temporary vault with sample notes, runs semantic search, and shows your AI answering questions from your notes — all locally, no accounts, no API keys. ---

Quickstart

``bash
No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.