[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-77452":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":8,"htmlUrl":8,"language":9,"languages":8,"totalLinesOfCode":8,"stars":10,"forks":11,"watchers":12,"openIssues":12,"contributorsCount":13,"subscribersCount":13,"size":13,"stars1d":13,"stars7d":13,"stars30d":14,"stars90d":13,"forks30d":13,"starsTrendScore":13,"compositeScore":15,"rankGlobal":8,"rankLanguage":8,"license":16,"archived":17,"fork":17,"defaultBranch":18,"hasWiki":19,"hasPages":17,"topics":20,"createdAt":8,"pushedAt":8,"updatedAt":21,"readmeContent":22,"aiSummary":23,"trendingCount":13,"starSnapshotCount":13,"syncStatus":24,"lastSyncTime":25,"discoverSource":26},77452,"Anamnesis","Trapezohe\u002FAnamnesis","Trapezohe",null,"Rust",186,25,1,0,149,4.24,"Apache License 2.0",false,"main",true,[],"2026-06-12 02:03:43","\u003Cp align=\"center\">\n  \u003Cimg src=\".\u002Fbanner.png\" alt=\"Anamnesis banner\" width=\"100%\" \u002F>\n\u003C\u002Fp>\n\n# Anamnesis\n\n**A local-first interoperability layer that imports, normalizes, indexes, and serves existing agent memory across tools.**\n\nAnamnesis is not another memory product that asks users to start over. It is the bridge for memory that already exists in agent runtimes, SDKs, local caches, SQLite databases, JSON files, Markdown workspaces, and MCP resources.\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fversion-v0.1.0-1da1f2?style=for-the-badge&labelColor=555\" alt=\"Version v0.1.0\" \u002F>\n  \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Flicense-Apache--2.0-2ecc71?style=for-the-badge&labelColor=555\" alt=\"Apache-2.0 license\" \u002F>\n  \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Frust-%3E%3D1.85-f97316?style=for-the-badge&labelColor=555&logo=rust&logoColor=white\" alt=\"Rust >= 1.85\" \u002F>\n  \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FMCP-stdio%20%2B%20SSE-8b5cf6?style=for-the-badge&labelColor=555\" alt=\"MCP stdio and SSE\" \u002F>\n  \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FRAG-local%20hybrid-14b8a6?style=for-the-badge&labelColor=555\" alt=\"Local hybrid RAG\" \u002F>\n  \u003Cbr \u002F>\n  \u003Ca href=\"https:\u002F\u002Fx.com\u002FGhast_AI\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FX-@Ghast_AI-000000?style=for-the-badge&labelColor=555&logo=x&logoColor=white\" alt=\"X @Ghast_AI\" \u002F>\u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fdiscord.gg\u002Fghastai\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FDiscord-Join-5865F2?style=for-the-badge&labelColor=555&logo=discord&logoColor=white\" alt=\"Join Discord\" \u002F>\u003C\u002Fa>\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n  \u003Ca href=\"#overview\">Overview\u003C\u002Fa> ·\n  \u003Ca href=\"#supported-sources\">Supported Sources\u003C\u002Fa> ·\n  \u003Ca href=\"#architecture\">Architecture\u003C\u002Fa> ·\n  \u003Ca href=\"#quick-start\">Quick Start\u003C\u002Fa> ·\n  \u003Ca href=\"#cli\">CLI\u003C\u002Fa> ·\n  \u003Ca href=\".\u002FREADME.zh-CN.md\">简体中文\u003C\u002Fa> ·\n  \u003Ca href=\".\u002Fdocs\u002FBLUEPRINT.md\">Blueprint\u003C\u002Fa> ·\n  \u003Ca href=\"https:\u002F\u002Fdiscord.gg\u002Fghastai\">Discord\u003C\u002Fa>\n\u003C\u002Fp>\n\n---\n\n## Overview\n\nAgent memory is fragmented. A user may have months of context in Codex, structured memories in mem0, sessions in Claude Code, and workspace notes in OpenClaw. These systems usually store memory in different formats and locations, so the context cannot move cleanly between agents.\n\nAnamnesis solves that interoperability problem:\n\n- **Import existing memory** from supported local stores and registered MCP resources.\n- **Normalize records** into a shared schema with provenance, source identity, scope, timestamps, and content chunks.\n- **Index locally** with SQLite FTS plus optional embeddings.\n- **Serve memory back to agents** through CLI search, export, and MCP tools.\n- **Keep ownership at the source**: the original agent or framework still creates the memory; Anamnesis aggregates and retrieves it.\n\nThis README describes the current source tree. “Supported” means an adapter crate and a CLI import path exist. It does not mean every upstream format has perfect semantic extraction yet. Precision varies by adapter, and the limitations section calls out the important gaps.\n\n## Current Surface\n\n| Area | Current implementation |\n| --- | --- |\n| Language | Rust workspace, MSRV `1.85` |\n| Binaries | `anamnesis` CLI and `anamnesis-mcp` server |\n| Storage | SQLite metadata, chunks, audit events, lineage, FTS search |\n| Retrieval | Keyword, vector, and hybrid search with source, instance, kind, scope, and time filters |\n| Embeddings | Local deterministic embeddings by default, provider-ready interface |\n| Import | Shared importer service used by CLI and MCP admin import path |\n| MCP | stdio and HTTP\u002FSSE transports; search, read, list, doctor, and gated admin import tools |\n| Extraction | Session extraction crate and CLI command with mock\u002FOpenAI\u002FAnthropic provider options |\n\n## Supported Sources\n\n`anamnesis discover` probes known local conventions for local adapters. `anamnesis source add ... --path ...` or `--url ...` is the authoritative way to register a source when the default detector is not appropriate.\n\n### Agent Runtimes\n\n| Source | Adapter ID | How it is registered | Current scanner reads | Precision |\n| --- | --- | --- | --- | --- |\n| Claude Code | `claude-code` | Local path, usually the Claude projects directory | Project\u002Fsession files under the configured Claude Code root | Medium |\n| Codex | `codex` | Local path, usually the Codex home directory | Memory files and rollout summaries available under the configured Codex root | Medium |\n| Hermes | `hermes` | Local path | Hermes project and memory artifacts found by the adapter | Medium |\n| OpenClaw | `openclaw` | Local path | `AGENTS.md`, `SOUL.md`, `TOOLS.md`, workspace skills, sessions | Medium-high |\n\n### Memory Frameworks\n\n| Source | Adapter ID | How it is registered | Current scanner reads | Precision |\n| --- | --- | --- | --- | --- |\n| mem0 | `mem0` | Local SQLite path | mem0 SQLite memory rows | High when the schema matches |\n| Letta | `letta` | Local SQLite path | Letta archival\u002Frecall memory tables | High when the schema matches |\n| TDAI | `tdai` | Local path | OpenClaw-compatible TDAI memory directories | Medium |\n| OpenViking | `openviking` | Local path | AGFS-style local resources, agents, sessions | Medium |\n| MemPalace | `mempalace` | Local path | Identity text and local palace\u002Fchroma SQLite data | Medium |\n| Memori | `memori` | Local SQLite path | Memori SQLite rows | Medium-high when the schema matches |\n| MemOS | `memos` | Local path | MemOS MemCube textual memory JSON | Medium |\n| Memary | `memary` | Local path | Local Memary cache files | Medium |\n\n### MCP Sources\n\n| Source | Adapter ID | How it is registered | Current scanner reads | Precision |\n| --- | --- | --- | --- | --- |\n| Generic MCP server | `generic-mcp` | `source add generic-mcp --url \u003Cupstream-url> [--token-env ENV_NAME]` | `resources\u002Flist` and `resources\u002Fread` results from the upstream server | Depends on upstream metadata |\n\n## Architecture\n\n```mermaid\nflowchart LR\n    subgraph Sources[\"Existing memory producers\"]\n        A1[\"Agent runtimes\"]\n        A2[\"Memory frameworks\"]\n        A3[\"MCP resource servers\"]\n    end\n\n    subgraph ImportLayer[\"Import layer\"]\n        B1[\"Detector\"]\n        B2[\"Adapter scanner\"]\n        B3[\"Normalizer\"]\n        B4[\"Dedup + provenance\"]\n    end\n\n    subgraph Store[\"Local memory store\"]\n        C1[\"Records\"]\n        C2[\"Chunks\"]\n        C3[\"FTS index\"]\n        C4[\"Embeddings\"]\n        C5[\"Audit + lineage\"]\n    end\n\n    subgraph Access[\"Agent access\"]\n        D1[\"CLI\"]\n        D2[\"MCP stdio\"]\n        D3[\"MCP HTTP\u002FSSE\"]\n        D4[\"Export\"]\n    end\n\n    Sources --> ImportLayer --> Store --> Access\n```\n\n## Import Pipeline\n\n```mermaid\nsequenceDiagram\n    participant User\n    participant CLI as anamnesis CLI\n    participant Registry as Source Registry\n    participant Adapter\n    participant Importer\n    participant Store\n    participant Embedder\n\n    User->>CLI: source add \u002F import\n    CLI->>Registry: resolve source path or URL\n    CLI->>Adapter: scan(ScanOpts)\n    Adapter-->>CLI: normalized memory records\n    CLI->>Importer: import records\n    Importer->>Store: upsert records and chunks\n    Importer->>Store: write audit and lineage events\n    CLI->>Embedder: embed pending chunks unless disabled\n    Embedder->>Store: persist vectors\n```\n\n## Retrieval Flow\n\n```mermaid\nflowchart TD\n    Q[\"Agent query\"] --> M[\"Search mode\"]\n    M --> K[\"Keyword FTS\"]\n    M --> V[\"Vector search\"]\n    K --> H[\"Hybrid ranker\"]\n    V --> H\n    H --> F[\"Source \u002F instance \u002F kind \u002F scope \u002F time filters\"]\n    F --> R[\"Ranked chunks\"]\n    R --> C[\"MCP or CLI response\"]\n```\n\nSearch filters are pushed into the store API for keyword and vector search. Hybrid search combines ranked keyword and vector results and can be constrained to a source, instance, record kind, scope, and time range.\n\n## MCP Runtime\n\n```mermaid\nflowchart LR\n    Agent[\"MCP client\"] --> Transport[\"stdio or HTTP\u002FSSE\"]\n    Transport --> Server[\"Anamnesis MCP server\"]\n    Server --> Tools[\"Tools\"]\n    Tools --> Search[\"search_memory\"]\n    Tools --> Read[\"read_memory\"]\n    Tools --> List[\"list_sources\"]\n    Tools --> Doctor[\"doctor\"]\n    Tools --> Import[\"import_source\"]\n    Import --> Gate[\"Admin gate disabled by default\"]\n    Server --> Resources[\"MCP resources\u002Flist + resources\u002Fread\"]\n    Resources --> Store[\"Local SQLite store\"]\n```\n\nThe MCP server exposes read\u002Fsearch tools by default. Import is an admin operation and is hidden unless the server is started with admin tools enabled.\n\n## Quick Start\n\nBuild from the current repository:\n\n```bash\ncargo build --workspace\ncargo install --path crates\u002Fcli\ncargo install --path crates\u002Fmcp-server\n```\n\nInitialize the local store:\n\n```bash\nanamnesis init\nanamnesis status\n```\n\nDiscover local sources:\n\n```bash\nanamnesis discover\n```\n\nRegister an explicit local source:\n\n```bash\nanamnesis source add codex --path ~\u002F.codex\n```\n\nRegister an upstream MCP source:\n\n```bash\nanamnesis source add generic-mcp \\\n  --instance upstream \\\n  --url http:\u002F\u002F127.0.0.1:8787 \\\n  --token-env ANAMNESIS_UPSTREAM_TOKEN\n```\n\nImport and embed:\n\n```bash\nanamnesis import codex\nanamnesis import generic-mcp:upstream\n```\n\nSearch:\n\n```bash\nanamnesis search \"project preferences\" --source codex --limit 10\nanamnesis search \"long term profile\" --mode hybrid --since 2026-01-01T00:00:00Z\n```\n\nGenerate MCP client configuration:\n\n```bash\nanamnesis mcp config\nanamnesis mcp config --transport sse --sse-port 7331\n```\n\nRun the server:\n\n```bash\nanamnesis serve\nanamnesis serve --sse 7331\nanamnesis-mcp --sse 7331\n```\n\n## Agent Plugins\n\nAnamnesis ships a Claude Code marketplace plugin and Codex marketplace metadata in the same style as modern agent memory plugins: install the local binary first, add the marketplace, then let the client spawn Anamnesis through MCP.\n\n### Claude Code\n\nAdd the marketplace:\n\n```text\n\u002Fplugin marketplace add Trapezohe\u002FAnamnesis\n```\n\nInstall the plugin:\n\n```text\n\u002Fplugin install anamnesis@anamnesis-plugins\n```\n\nFor CLI installation with sparse checkout:\n\n```bash\nclaude plugin marketplace add Trapezohe\u002FAnamnesis --sparse .claude-plugin anamnesis-plugin\nclaude plugin install anamnesis@anamnesis-plugins\n```\n\nThe plugin includes:\n\n- MCP server config for `anamnesis serve`\n- `anamnesis-memory` skill for deliberate memory recall\n- `\u002Fanamnesis-status` and `\u002Fanamnesis-search` Claude Code commands\n- no lifecycle hooks by default\n\n### Codex\n\nFastest path, MCP only:\n\n```bash\ncodex mcp add anamnesis -- anamnesis serve\n```\n\nMarketplace path:\n\n```bash\ncodex plugin marketplace add Trapezohe\u002FAnamnesis --sparse .agents\u002Fplugins anamnesis-plugin\n```\n\nRestart Codex, open the plugin UI, and install Anamnesis from the Anamnesis Plugins marketplace. Do not enable both direct MCP and marketplace plugin in the same profile unless duplicate MCP registrations are intentional.\n\n## CLI\n\n```text\nanamnesis init\nanamnesis status\nanamnesis discover [--json] [--include-unregistered]\nanamnesis source add \u003Cadapter> [--instance \u003Cname>] [--path \u003Cpath>]\nanamnesis source add generic-mcp [--instance \u003Cname>] --url \u003Curl> [--token-env \u003CENV_NAME>]\nanamnesis source list [--json]\nanamnesis import \u003Csource[:instance]> [--dry-run] [--no-embed] [--full] [--since \u003CRFC3339>]\nanamnesis search \u003Cquery> [--mode keyword|vector|hybrid] [--source \u003Cid>] [--instance \u003Cname>] [--kind \u003Ckind>] [--scope \u003Cscope>] [--since \u003CRFC3339>] [--until \u003CRFC3339>] [--json]\nanamnesis extract \u003Csource[:instance]> [--provider mock|openai|anthropic] [--audit]\nanamnesis lineage \u003Crecord-id>\nanamnesis audit\nanamnesis export --format json|jsonl|markdown\nanamnesis doctor [--json] [--include-unregistered]\nanamnesis mcp config [--transport stdio|sse] [--sse-port \u003Cport>]\nanamnesis serve\n```\n\n## Data Model\n\n```mermaid\nerDiagram\n    SOURCE ||--o{ RECORD : imports\n    RECORD ||--o{ CHUNK : splits\n    CHUNK ||--o| VECTOR : embeds\n    RECORD ||--o{ LINEAGE : traces\n    SOURCE ||--o{ AUDIT_EVENT : records\n\n    SOURCE {\n      string source_id\n      string instance\n      string location\n      string config_json\n    }\n\n    RECORD {\n      string id\n      string source_id\n      string instance\n      string kind\n      string scope\n      string content_hash\n      datetime created_at\n      datetime updated_at\n    }\n\n    CHUNK {\n      string id\n      string record_id\n      int chunk_index\n      string text\n    }\n```\n\nThe store keeps provenance with each record so imported memory can be traced back to its source. Anamnesis should be able to answer “where did this memory come from?” before it answers “what did this memory say?”\n\n## Session Extraction\n\nThe extractor turns conversation\u002Fsession material into structured memory candidates. It is exposed through the `extract` command and supports mock, OpenAI, and Anthropic provider modes in the current source tree.\n\nExtraction is intentionally separate from import:\n\n- Import preserves source memory as faithfully as possible.\n- Extraction derives higher-level memories from sessions.\n- Audit and lineage commands make derived records reviewable.\n\n## Project Layout\n\n```text\ncrates\u002F\n  core\u002F                  Shared memory schema and adapter traits\n  store\u002F                 SQLite store, FTS, vectors, audit, lineage\n  importer\u002F              Import service and normalization pipeline\n  search\u002F                Keyword, vector, and hybrid search\n  embedder\u002F              Embedding provider abstraction\n  extractor\u002F             Session-to-memory extraction\n  cli\u002F                   anamnesis CLI\n  mcp-server\u002F            MCP server\n  adapter-*\u002F             Source adapters\ndocs\u002F\n  blueprint\u002F             Architecture and planning documents\npackaging\u002F               Packaging templates and scripts\n```\n\n## Current Limitations\n\n- Adapter precision is not uniform. SQLite-backed systems are more precise when schemas match; file-based systems can be coarser.\n- ghast AI is intentionally not supported as a memory source today. Its user memory database is encrypted, and prompts-only scanning is not enough to claim real memory import support.\n- Generic MCP import depends on the upstream server exposing useful `resources\u002Flist` and `resources\u002Fread` metadata.\n- Embedding storage and vector search are implemented locally, but production ANN tuning and sqlite-vec integration are separate follow-up work.\n- Default discovery paths are conventions, not guarantees. Use `source add --path` or `source add --url` for reproducible imports.\n- Release distribution status should be verified during each release. The repository supports source builds today.\n\n## Roadmap\n\n- Improve adapter-specific fidelity tests with realistic fixtures.\n- Add stronger conformance checks for source registries and import previews.\n- Extend MCP metadata conventions for upstream memory resources.\n- Add production-grade vector index integration and ranking evaluation.\n- Harden release packaging and published binary installation docs.\n- Re-evaluate ghast AI only if an official export path or MCP resource surface makes user memories readable without decrypting private databases blindly.\n\n## Community\n\n- X: [@Ghast_AI](https:\u002F\u002Fx.com\u002FGhast_AI)\n- Discord: [discord.gg\u002Fghastai](https:\u002F\u002Fdiscord.gg\u002Fghastai)\n\n## License\n\nApache-2.0.\n\n## Star History\n\n\u003Ca href=\"https:\u002F\u002Fwww.star-history.com\u002F#Trapezohe\u002FAnamnesis&Date\">\n  \u003Cpicture>\n    \u003Csource media=\"(prefers-color-scheme: dark)\" srcset=\"https:\u002F\u002Fapi.star-history.com\u002Fsvg?repos=Trapezohe\u002FAnamnesis&type=Date&theme=dark\" \u002F>\n    \u003Csource media=\"(prefers-color-scheme: light)\" srcset=\"https:\u002F\u002Fapi.star-history.com\u002Fsvg?repos=Trapezohe\u002FAnamnesis&type=Date\" \u002F>\n    \u003Cimg alt=\"Star History Chart\" src=\"https:\u002F\u002Fapi.star-history.com\u002Fsvg?repos=Trapezohe\u002FAnamnesis&type=Date\" \u002F>\n  \u003C\u002Fpicture>\n\u003C\u002Fa>\n","Anamnesis 是一个本地优先的互操作层，用于导入、规范化、索引和提供现有代理记忆。该项目使用 Rust 编写，能够从多种数据源（如本地缓存、SQLite 数据库、JSON 文件、Markdown 工作区等）中导入已有的记忆数据，并将其统一到共享模式下，支持元数据添加如来源标识、时间戳等。通过 SQLite FTS 与可选的嵌入技术实现本地索引，使得这些记忆可以被 CLI 搜索或导出功能访问。此外，它保持了原始数据的所有权不变，仅作为聚合和检索工具。适用于需要跨多个工具整合记忆数据以增强上下文理解和处理能力的场景。",2,"2026-06-11 03:55:27","CREATED_QUERY"]