# simplemem - Doramagic AI Context Pack

> Positioning: a pre-install experience and judgment asset. It helps the host AI get off to a good start, but it does not mean the project has already been installed, run, or validated.

## Sufficiency Principle

- **Sufficiency over compression**: The AI Context Pack should be sufficient for the host AI to understand the project's value, capability boundaries, entrypoints, risks, and evidence sources before starting work; it may be layered, but it does not aim for the shortest possible summary.
- **Compression policy**: Compress only noise and duplication, never context that affects judgment or the quality of the work.

## How the Host AI Should Use This

You are reading the AI Context Pack that Doramagic compiled for simplemem. Treat it as pre-work context: help the user understand who it fits, what it can do, how to start, what must be verified after install, and where the risks are. Do not claim that you have already installed, run, or executed the target project.

## Claim Consumption Rules

- **Fact source**: Repo Evidence + Claim/Evidence Graph; the Human Wiki only supplies salience, terminology, and narrative structure.
- **Minimum status for a fact**: `supported`
- `supported`: May be used as a project fact, but the answer must cite the claim_id and evidence path.
- `weak`: Usable only as a low-confidence lead; the user must be asked to keep verifying.
- `inferred`: Usable only for risk notes or open questions; must not be packaged as a project fact.
- `unverified`: Must not be used as fact; state clearly that evidence is insufficient.
- `contradicted`: Must show the conflicting sources and must not force a single version on the user's behalf.

## Who It Fits Best

- **AI researchers or builders of research-oriented Agents**: The README clearly centers on research, experiment, or paper workflows. Evidence: `README.md` Claim: `clm_0003` supported 0.86
- **Developers already using host AIs such as Claude/Codex/Cursor/Gemini**: The README or plugin config mentions multiple host AIs. Evidence: `README.md` Claim: `clm_0004` supported 0.86
- **Users who want to bring professional workflows into a host AI**: The repo contains Skill documents. Evidence: `simplemem/integrations/simplemem-skill/SKILL.md`, `SKILL/simplemem-skill/SKILL.md` Claim: `clm_0005` supported 0.86

## What It Can Do

- **AI Skill / Agent Instruction Asset Library** (Previewable before install): The project contains Skill or Agent instruction files that a host AI can read, useful for bringing professional workflows into hosts like Claude, Codex, or Cursor. Evidence: `simplemem/integrations/simplemem-skill/SKILL.md`, `SKILL/simplemem-skill/SKILL.md` Claim: `clm_0001` supported 0.86
- **Command-Line Startup or Install Flow** (Verify after install): The project documentation contains runnable commands; real use requires running them in a local or host environment. Evidence: `README.md` Claim: `clm_0002` supported 0.86

## How to Start

- `git clone https://github.com/aiming-lab/SimpleMem.git` Evidence: `README.md` Claim: `clm_0006` supported 0.86
- `pip install -r requirements.txt` Evidence: `README.md` Claim: `clm_0007` supported 0.86
- `pip install -e .                  # default: text + multimodal + evolver` Evidence: `README.md` Claim: `clm_0008` supported 0.86
- `pip install -e ".[server]"        # + MCP / HTTP server (mcp, fastapi, ...)` Evidence: `README.md` Claim: `clm_0009` supported 0.86
- `pip install -e ".[all]"           # everything, including dev tools` Evidence: `README.md` Claim: `clm_0010` supported 0.86

## Continue-or-Stop Decision Card

- **Current recommendation**: Needs admin / security approval
- **Why**: Continuing may involve secrets, accounts, external services, or sensitive context; get admin or security approval first.

### 30-Second Read

- **What to do now**: Needs admin / security approval
- **Minimum safe next step**: Run Prompt Preview first; if credentials or an enterprise environment are involved, get approval before trialing
- **Do not trust yet**: Real output quality cannot be trusted before install.
- **Continuing will touch**: Command execution, Host AI configuration, Local environment or project files

### What You Can Trust Now

- **Target-audience signal: AI researchers or builders of research-oriented Agents** (supported): Backed by a supported claim or project evidence, but that still is not the same as real install results. Evidence: `README.md` Claim: `clm_0003` supported 0.86
- **Target-audience signal: Developers already using host AIs such as Claude/Codex/Cursor/Gemini** (supported): Backed by a supported claim or project evidence, but that still is not the same as real install results. Evidence: `README.md` Claim: `clm_0004` supported 0.86
- **Target-audience signal: Users who want to bring professional workflows into a host AI** (supported): Backed by a supported claim or project evidence, but that still is not the same as real install results. Evidence: `simplemem/integrations/simplemem-skill/SKILL.md`, `SKILL/simplemem-skill/SKILL.md` Claim: `clm_0005` supported 0.86
- **Capability exists: AI Skill / Agent Instruction Asset Library** (supported): You can trust that the project contains signals of this capability; whether it fits your specific task still needs trial or after-install verification. Evidence: `simplemem/integrations/simplemem-skill/SKILL.md`, `SKILL/simplemem-skill/SKILL.md` Claim: `clm_0001` supported 0.86
- **Capability exists: Command-Line Startup or Install Flow** (supported): You can trust that the project contains signals of this capability; whether it fits your specific task still needs trial or after-install verification. Evidence: `README.md` Claim: `clm_0002` supported 0.86
- **There are Quick Start / install-command signals** (supported): You can trust that the docs mention a startup or install entrypoint; do not run it directly in your primary environment because of that. Evidence: `README.md` Claim: `clm_0006` supported 0.86

### What You Cannot Trust Yet

- **Real output quality cannot be trusted before install.** (unverified): Prompt Preview can only show how it guides you; it cannot prove result quality in the real project.
- **Host AI version compatibility cannot be trusted before install.** (unverified): Host loading rules and version differences across Claude, Cursor, Codex, Gemini, and others must be verified in a real environment.
- **That it will not pollute your existing host AI's behavior cannot be trusted directly.** (inferred): Skill, plugin, and AGENTS/CLAUDE/GEMINI instructions may change the host AI's default behavior. Evidence: `SKILL/simplemem-skill/SKILL.md`, `simplemem/integrations/simplemem-skill/SKILL.md`
- **Safe rollback cannot be assumed by default.** (unverified): Unless the project clearly provides uninstall and recovery instructions, verify in an isolated environment first.
- **After a real install, is it compatible with the user's current host AI version?** (unverified): Compatibility can only be verified in the actual host environment.
- **Does the project's output quality meet the user's specific task?** (unverified): The pre-install preview can only show flow and boundaries; it cannot replace real evaluation.
- **Do the install commands require network access, permissions, or global writes?** (unverified): This affects install risk in both enterprise and personal environments. Evidence: `README.md`

### What Continuing Will Touch

- **Command execution**: Package managers, network downloads, the local plugin directory, project config, or the user's home directory. Why: Running the very first command can already change your environment; decide whether it is worth running first. Evidence: `README.md`
- **Host AI configuration**: The plugin, Skill, or rule-loading config of hosts like Claude/Codex/Cursor/Gemini/OpenCode. Why: Host configuration changes how the AI works afterward and may conflict with the user's existing rules. Evidence: `SKILL/simplemem-skill/SKILL.md`, `simplemem/integrations/simplemem-skill/SKILL.md`
- **Local environment or project files**: Install results, plugin caches, project config, or local dependency directories. Why: The write scope and rollback path cannot be proven before install and need isolated verification. Evidence: `README.md`
- **Environment variables / API keys**: Project entry docs explicitly showing API key, token, secret, or account credential configuration. Why: If a real install needs credentials, use test credentials first and go through a permission/compliance review. Evidence: `MCP/README.md`, `MCP/run.sh`, `README.md`, `docs/i18n/README.ar.md` et al.
- **Host AI context**: The AI Context Pack, Prompt Preview, Skill routing, risk rules, and project facts. Why: Importing context affects the host AI's later judgment, so avoid packaging unverified items as facts.

### Minimum Safe Next Steps

- **Run Prompt Preview first**: Use a pre-install interactive trial to judge whether the way of working fits; it needs no authorization or environment change. (applies when: Applies to any project, especially when output quality is unknown.)
- **Trial-install only in an isolated directory or a test account**: Avoid letting install commands pollute your primary host AI, real projects, or home directory. (applies when: When there are signals of command execution, plugin config, or local writes.)
- **Back up your host AI configuration first**: Skill, plugin, and rule files may change the default behavior of Claude/Cursor/Codex. (applies when: When there is a plugin manifest, a Skill, or a host rule entrypoint.)
- **Do not use real production credentials**: Once an environment variable / API key enters the host or toolchain, it can create account and compliance risk. (applies when: When environment signals like API, TOKEN, KEY, or SECRET appear.)
- **After install, verify just one minimal task**: Verify loading, compatibility, output quality, and rollback first, then decide whether to use it deeply. (applies when: When moving from a trial into a real workflow.)

### Exit Plan

- **Preserve the pre-install state**: Record the original host config and project state so you can later judge whether it is recoverable.
- **Be ready to remove the host plugin / Skill / rule entrypoint**: If behavior is off after the trial install, you can restore the host AI to its pre-trial state.
- **Record the install commands and written paths**: Without clear uninstall instructions, you at least need to know which directories or configs to clean up manually.
- **Be ready to revoke test API keys or tokens**: If test credentials leak or are misused, you can cut losses quickly.
- **If there is no rollback path, do not enter your primary environment**: No rollback is a blocker before continuing; do not proceed on trust or luck.

## What Can Only Be Previewed

- Explain who the project fits and what it can do
- Demonstrate a typical conversation flow based on project docs
- Help the user decide whether it is worth installing or researching further

## What Must Be Verified After Install

- Actually installing the Skill, plugin, or CLI
- Running scripts, modifying local files, or accessing external services
- Verifying real output quality, performance, and compatibility

## Boundary & Risk Decision Card

- **Mistaking the pre-install preview for a real run**: The user may overestimate how much configuration, permission, and compatibility verification the project has already done. Mitigation: Clearly separate prompt_preview_can_do from runtime_required. Claim: `clm_0011` inferred 0.45
- **Command execution will modify the local environment**: Install commands may write to the user's home directory, the host plugin directory, or project configuration. Mitigation: Run in an isolated environment or a test account first. Evidence: `README.md` Claim: `clm_0012` supported 0.86
- **To confirm**: After a real install, is it compatible with the user's current host AI version?. Why: Compatibility can only be verified in the actual host environment.
- **To confirm**: Does the project's output quality meet the user's specific task?. Why: The pre-install preview can only show flow and boundaries; it cannot replace real evaluation.
- **To confirm**: Do the install commands require network access, permissions, or global writes?. Why: This affects install risk in both enterprise and personal environments.

## Pre-Work Working Context

### Loading Order

- First read how_to_use.host_ai_instruction to establish the boundaries of this pre-install judgment asset.
- Read claim_graph_summary to confirm facts come from the Claim/Evidence Graph, not the Human Wiki narrative.
- Then read intended_users, capabilities, and quick_start_candidates to judge whether the user is a match.
- When you need to carry out a concrete task, check role_skill_index first, then evidence_index.
- For real install, file modification, network access, performance, or compatibility questions, turn to risk_card and boundaries.runtime_required.

### Task Routes

- **AI Skill / Agent Instruction Asset Library**: Use role_skill_index / evidence_index to help the user pick a usable role, Skill, or workflow first. Boundary: Can be experienced via a pre-install Prompt. Evidence: `simplemem/integrations/simplemem-skill/SKILL.md`, `SKILL/simplemem-skill/SKILL.md` Claim: `clm_0001` supported 0.86
- **Command-Line Startup or Install Flow**: State that this is an after-install capability first, then give a pre-install checklist. Boundary: Must be verified after a real install or run. Evidence: `README.md` Claim: `clm_0002` supported 0.86

### Context Scale

- Total files: 424
- Important-file coverage: 40/424
- Evidence index entries: 77
- Role / Skill entries: 2

### Handling Insufficient Evidence

- **missing_evidence**: State that evidence is insufficient and ask the user for the target file, a README section, or after-install verification records; do not fill in facts.
- **out_of_scope_request**: State that the task is beyond the current AI Context Pack's evidence scope and suggest the user check the Human Manual or verify after a real install.
- **runtime_request**: Provide a pre-install checklist and command sources, but do not run commands for the user or claim they have been run.
- **source_conflict**: Show the conflicting sources side by side, mark them as unverified, and do not force a single version.

## Prompt Recipes

### Fit assessment

- Goal: Judge whether this project fits the user's current task.
- Expected output: A fit conclusion, key reasons, evidence citations, what can be previewed before install, what must be verified after install, and a next-step recommendation.

```text
Based on the AI Context Pack for simplemem, ask me 3 necessary questions first, then judge whether it fits my task. The answer must cover: who it fits, what it can do, what it cannot do, whether it is worth installing, and where the evidence comes from. Every project fact must cite evidence_refs, source_paths, or a claim_id.
```

### Pre-install experience

- Goal: Let the user feel the core workflow before installing, while avoiding packaging the preview as real capability or a marketing promise.
- Expected output: An experience script with boundary labels, an after-install verification checklist, and a cautious recommendation; with no real-run promises or strong marketing language.

```text
Treat simplemem as a pre-install experience asset, not an already-installed tool or a real runtime environment.

Output exactly four parts:
1. Ask me 3 necessary questions first.
2. Give an "experience script": use the three labels [Previewable before install], [Must verify after install], and [Insufficient evidence] to show how it might guide the workflow.
3. Give an after-install verification checklist: list which capabilities can only be confirmed after a real install, real host loading, and a real project run.
4. Give a cautious recommendation: only "worth researching/trialing further", "add information before deciding", or "not recommended to continue"; do not endorse the project.

Hard boundaries:
- Do not claim you have installed, run, executed tests, modified files, or produced real results.
- Do not write promise-like phrasing such as "auto-adapts", "guarantees passing", "perfect fit", or "strongly recommend installing".
- If you describe how it works after install, you must use a conditional such as "if installed successfully and the host loads the Skill correctly, it might...".
- The experience script may only be written as "example lines / hypothetical flow": use "might ask / might suggest / might show", not "has written, has generated, has passed, is running, is generating".
- Prompt Preview does not hand out install commands; if the user is ready to trial, only prompt them to read Quick Start and the Risk Card first and to verify in an isolated environment.
- Every project fact must come from a supported claim, evidence_refs, or source_paths; inferred/unverified items can only be risks or open questions.

```

### Role / Skill selection

- Goal: Pick the best-matching asset from the project's roles or Skills.
- Expected output: A list of candidate roles or Skills, each with an applicable scenario, evidence paths, risk boundary, and whether after-install verification is needed.

```text
Read role_skill_index and recommend 3-5 of the most relevant roles or Skills for my target task. For each recommendation, state the applicable scenario, likely output, risk boundary, and evidence_refs.
```

### Risk pre-check

- Goal: Identify environment, permission, rule-conflict, and quality risks before installing or adopting.
- Expected output: A checklist of environment, permission, dependency, license, host-conflict, quality risk, and unknown items.

```text
Based on risk_card, boundaries, and quick_start_candidates, give me a pre-install risk pre-check list. Do not run commands for me; only explain what I should check, why, and what impact a failure would have.
```

### Host AI kickoff instruction

- Goal: Turn the project context into a host AI instruction for the start of a conversation.
- Expected output: A pre-work instruction with clear boundaries and clear evidence citations, suitable to copy to a host AI.

```text
Based on the AI Context Pack for simplemem, generate a pre-work instruction I can paste to my host AI. This instruction must obey not_runtime=true and must not claim the project has been installed, run, or produced real results.
```

## Role / Skill Index

- Indexed 2 role / Skill / project-doc entries.

- **simplemem-skill** (skill): Store and retrieve conversation memories across sessions. Use when asked to 'remember this', 'save conversation', 'add to memory', 'what did we discuss about...', 'query memories', or 'import chat history'. Also use proactively to preserve important dialogue context and decisions. Activation hint: When the user's task is highly relevant to the workflow described by “simplemem-skill”, use it for a pre-install experience first, then decide whether to install. Evidence: `SKILL/simplemem-skill/SKILL.md`
- **simplemem-skill** (skill): Store and retrieve conversation memories across sessions. Use when asked to 'remember this', 'save conversation', 'add to memory', 'what did we discuss about...', 'query memories', or 'import chat history'. Also use proactively to preserve important dialogue context and decisions. Activation hint: When the user's task is highly relevant to the workflow described by “simplemem-skill”, use it for a pre-install experience first, then decide whether to install. Evidence: `simplemem/integrations/simplemem-skill/SKILL.md`

## Evidence Index

- Indexed 77 evidence entries.

- **💡 Key Idea** (documentation): EvolveMem: Self-Evolving Memory Architecture via AutoResearch Evidence: `EvolveMem/README.md`
- **SimpleMem MCP Server** (documentation): Production-Ready Memory Service for LLM Agents via Model Context Protocol MCP Evidence: `MCP/README.md`
- **🚀 Quick Start** (documentation): Omni-SimpleMem: Unified Multimodal Memory for Lifelong AI Agents Evidence: `OmniSimpleMem/README.md`
- **Efficient Lifelong Memory for LLM Agents — Text & Multimodal** (documentation): Efficient Lifelong Memory for LLM Agents — Text & Multimodal Evidence: `README.md`
- **SimpleMem Skill** (documentation): A self-contained Claude skill for managing persistent conversational memory using vector-based retrieval. Evidence: `SKILL/README.md`
- **🧠 SimpleMem-Cross** (documentation): Persistent Cross-Conversation Memory for LLM Agents Evidence: `cross/README.md`
- **SimpleMem: Efficient Lifelong Memory for LLM Agents** (documentation): SimpleMem: Efficient Lifelong Memory for LLM Agents Evidence: `MCP/reference/README.md`
- **SimpleMem Skill** (documentation): A self-contained Claude skill for managing persistent conversational memory using vector-based retrieval. Evidence: `simplemem/integrations/README.md`
- **SimpleMem: Efficient Lifelong Memory for LLM Agents** (documentation): SimpleMem: Efficient Lifelong Memory for LLM Agents Evidence: `simplemem/integrations/reference/README.md`
- **SimpleMem Skill** (skill_instruction): Persistent conversational memory across sessions. Evidence: `SKILL/simplemem-skill/SKILL.md`
- **SimpleMem Skill** (skill_instruction): Persistent conversational memory across sessions. Evidence: `simplemem/integrations/simplemem-skill/SKILL.md`
- **License** (source_file): Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files the "Software" , to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: Evidence: `LICENSE`
- **License** (source_file): Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ Evidence: `OmniSimpleMem/LICENSE`
- **SimpleMem Package Usage Guide** (documentation): This guide provides comprehensive documentation for using SimpleMem as a pip-installable Python package. Evidence: `docs/PACKAGE_USAGE.md`
- **SimpleMem: Text Memory** (documentation): How the text backend turns raw dialogue into compact, retrievable memory. For the high-level summary and where this fits the unified package, see the main README Overview ../README.md -overview . Evidence: `docs/text-memory.md`
- **ذاكرة مدى الحياة الفعّالة لوكلاء نماذج اللغة الكبيرة — النصوص والوسائط المتعددة** (documentation): ذاكرة مدى الحياة الفعّالة لوكلاء نماذج اللغة الكبيرة — النصوص والوسائط المتعددة Evidence: `docs/i18n/README.ar.md`
- **Effizientes lebenslanges Gedächtnis für LLM-Agenten — Text & Multimodal** (documentation): Effizientes lebenslanges Gedächtnis für LLM-Agenten — Text & Multimodal Evidence: `docs/i18n/README.de.md`
- **Memoria Vitalicia Eficiente para Agentes LLM — Texto y Multimodal** (documentation): Memoria Vitalicia Eficiente para Agentes LLM — Texto y Multimodal Evidence: `docs/i18n/README.es.md`
- **Mémoire à long terme efficace pour les agents LLM — Texte & Multimodal** (documentation): Mémoire à long terme efficace pour les agents LLM — Texte & Multimodal Evidence: `docs/i18n/README.fr.md`
- **Memoria a Lungo Termine Efficiente per Agenti LLM — Testo e Multimodale** (documentation): Memoria a Lungo Termine Efficiente per Agenti LLM — Testo e Multimodale Evidence: `docs/i18n/README.it.md`
- **LLMエージェントのための効率的な生涯記憶 — テキスト & マルチモーダル** (documentation): LLMエージェントのための効率的な生涯記憶 — テキスト & マルチモーダル Evidence: `docs/i18n/README.ja.md`
- **LLM 에이전트를 위한 효율적인 평생 기억 — 텍스트 및 멀티모달** (documentation): LLM 에이전트를 위한 효율적인 평생 기억 — 텍스트 및 멀티모달 Evidence: `docs/i18n/README.ko.md`
- **Memória Vitalícia Eficiente para Agentes LLM — Texto e Multimodal** (documentation): Memória Vitalícia Eficiente para Agentes LLM — Texto e Multimodal Evidence: `docs/i18n/README.pt-br.md`
- **Эффективная долгосрочная память для агентов LLM — текст и мультимодальность** (documentation): Эффективная долгосрочная память для агентов LLM — текст и мультимодальность Evidence: `docs/i18n/README.ru.md`
- **LLM Ajanları için Verimli Ömür Boyu Bellek — Metin & Çok Modlu** (documentation): LLM Ajanları için Verimli Ömür Boyu Bellek — Metin & Çok Modlu Evidence: `docs/i18n/README.tr.md`
- **Bộ Nhớ Dài Hạn Hiệu Quả cho Các Tác Nhân LLM — Văn Bản & Đa Phương Thức** (documentation): Bộ Nhớ Dài Hạn Hiệu Quả cho Các Tác Nhân LLM — Văn Bản & Đa Phương Thức Evidence: `docs/i18n/README.vi.md`
- **面向 LLM 智能体的高效终身记忆 — 文本与多模态** (documentation): 通过语义无损压缩存储、压缩并检索长期记忆。现已支持文本、图像、音频与视频多模态。 Evidence: `docs/i18n/README.zh-CN.md`
- **SimpleMem MCP Server** (source_file): SimpleMem MCP Server FROM python:3.11-slim Evidence: `Dockerfile`
- **Requirements** (source_file): openai =1.0.0 pyyaml =6.0 sentence-transformers =2.2.0 numpy =1.24.0 Evidence: `EvolveMem/requirements.txt`
- **SimpleMem MCP Server Dependencies** (source_file): Web Framework fastapi =0.109.0 uvicorn standard =0.27.0 Evidence: `MCP/requirements.txt`
- **Core dependencies** (source_file): Core dependencies numpy =1.21.0 openai =1.0.0 pydantic =2.0.0 tiktoken =0.5.0 rank bm25 =0.2.2 sentence-transformers =2.2.0 Evidence: `OmniSimpleMem/requirements.txt`
- **Setup** (source_file): readme path = Path file .parent / "README.md" long description = "" ⋮---- long description = readme path.read text encoding="utf-8" Evidence: `OmniSimpleMem/setup.py`
- **============================================================================** (source_file): """ Configuration file - System parameters and LLM settings Evidence: `config.py.example`
- **Init** (source_file): all = Evidence: `cross/__init__.py`
- **---------------------------------------------------------------------------** (source_file): logger = logging.getLogger name ⋮---- DEFAULT DB PATH = "~/.simplemem-cross/cross memory.db" DEFAULT LANCEDB PATH = "~/.simplemem-cross/lancedb cross" ⋮---- class CrossMemOrchestrator ⋮---- session record = await asyncio.to thread memory session id = session record.memory session id ⋮---- context bundle = await asyncio.to thread rendered context = self. render context safe context bundle ⋮---- report = await asyncio.to thread ⋮---- results = self.vector store.semantic search ⋮---- bundle = self. build context safe user prompt ⋮---- def get stats self - Dict str, Any ⋮---- stats: Dict str, Any = self.sqlite storage.get stats ⋮---- def close self - None ⋮---- async def aenter self - CrossMemO… Evidence: `cross/orchestrator.py`
- **Docker Compose** (source_file): services: simplemem: container name: simplemem build: context: . dockerfile: ./Dockerfile volumes: - simplemem data:/app/MCP/data ports: - "8000:8000" environment: - DATA DIR=/app/MCP/data - LANCEDB PATH=/app/MCP/data/lancedb - USER DB PATH=/app/MCP/data/users.db - JWT SECRET KEY=${JWT SECRET KEY:-simplemem-secret-key-change-in-production} - ENCRYPTION KEY=${ENCRYPTION KEY:-simplemem-encryption-key-32bytes!} - LLM PROVIDER=${LLM PROVIDER:-openrouter} - OLLAMA BASE URL=${OLLAMA BASE URL:-http://host.docker.internal:11434/v1} - OPENROUTER BASE URL=${OPENROUTER BASE URL:-https://openrouter.ai/api/v1} - LLM MODEL=${LLM MODEL:-openai/gpt-4.1-mini} - EMBEDDING MODEL=${EMBEDDING MODEL:-qwen3-embed… Evidence: `docker-compose.yml`
- **--- Optional: Optimize retrieval config ---** (source_file): mem = SimpleMem ⋮---- answer = mem.ask "When is the meeting and what should Bob prepare?" ⋮---- --- Optional: Optimize retrieval config --- import simplemem dev questions = "When is the meeting?", "2pm tomorrow" , Evidence: `examples/quickstart.py`
- **API dependencies** (source_file): absl-py==2.3.1 accelerate==1.10.1 aiohappyeyeballs==2.6.1 aiohttp==3.13.2 aiosignal==1.4.0 annotated-types==0.7.0 anthropic==0.75.0 anyio==4.11.0 async-timeout==5.0.1 attrs==25.4.0 backoff==2.2.1 bert-score==0.3.13 certifi==2025.10.5 charset-normalizer==3.4.3 click==8.3.0 contourpy==1.3.2 cycler==0.12.1 dataparser==0.0.2 datasets==4.4.1 dateparser==1.2.2 deprecation==2.1.0 dill==0.4.0 distro==1.9.0 docstring parser==0.17.0 dydantic==0.0.8 exceptiongroup==1.3.0 fastuuid==0.14.0 filelock==3.20.0 fonttools==4.60.1 frozenlist==1.8.0 fsspec==2025.9.0 greenlet==3.2.4 grpcio==1.75.1 h11==0.16.0 h2==4.3.0 hf-xet==1.1.10 hpack==4.1.0 httpcore==1.0.9 httpx==0.28.1 huggingface-hub==0.35.3 hyperframe==… Evidence: `requirements.txt`
- **Setup** (source_file): HERE = Path file .parent readme = HERE / "README.md" long description = readme.read text encoding="utf-8" if readme.exists else "" ⋮---- def read version - str ⋮---- """Single source of truth: simplemem/ init .py version .""" init = HERE / "simplemem" / " init .py" .read text encoding="utf-8" match = re.search r'^ version \s =\s "\' ^"\' + "\' ', init, re.M ⋮---- INSTALL REQUIRES = ⋮---- EXTRAS = { Evidence: `setup.py`
- **Init** (source_file): def optimize mem, dev questions, max rounds=7, kwargs ⋮---- version = "0.3.0" all = "SimpleMem", "create", "list modes", "optimize", "Config", "load config" Evidence: `simplemem/__init__.py`
- **Config** (source_file): @dataclass class Config ⋮---- k sem: int = 0 k kw: int = 5 k str: int = 0 ⋮---- context budget: int = 8 ⋮---- fusion mode: str = "sum" fusion weights: Dict str, float = field default factory=lambda: { ⋮---- answer style: str = "concise" ⋮---- enable entity swap: bool = False enable query decomposition: bool = False enable answer verification: bool = False ⋮---- category overrides: Dict str, Any = field default factory=dict ⋮---- evolved: bool = False evolution rounds: int = 0 source benchmark: str = "" ⋮---- def save self, path: str - None ⋮---- """Save config to a JSON file.""" ⋮---- @classmethod def from file cls, path: str - "Config" ⋮---- data = json.load f ⋮---- def load config path: s… Evidence: `simplemem/config.py`
- **---------------------------------------------------------------------------** (source_file): logger = logging.getLogger name ⋮---- ROOT DIR = os.path.dirname os.path.abspath file ⋮---- class Backend ⋮---- slots = "mode", "module path", "class name", "description", ⋮---- self.setup = setup called once before first import self.init = init custom constructor; if None, use cls kwargs ⋮---- def check deps self - None ⋮---- """Verify that all required packages are importable.""" missing = ⋮---- def load class self - type ⋮---- """Lazily import and return the backend class.""" ⋮---- module = importlib.import module self.module path cls = getattr module, self.class name, None ⋮---- --------------------------------------------------------------------------- Registry ⋮---- registry: Dict str… Evidence: `simplemem/router.py`
- **---------------------------------------------------------------------------** (source_file): logger = logging.getLogger name ⋮---- ROOT DIR = os.path.dirname os.path.abspath file ⋮---- class Backend ⋮---- slots = "mode", "module path", "class name", "description", ⋮---- self.setup = setup called once before first import self.init = init custom constructor; if None, use cls kwargs ⋮---- def check deps self - None ⋮---- """Verify that all required packages are importable.""" missing = ⋮---- def load class self - type ⋮---- """Lazily import and return the backend class.""" ⋮---- module = importlib.import module self.module path cls = getattr module, self.class name, None ⋮---- --------------------------------------------------------------------------- Registry ⋮---- registry: Dict str… Evidence: `simplemem_router.py`
- **Initialize SentenceTransformer model for semantic similarity** (source_file): Initialize SentenceTransformer model for semantic similarity ⋮---- sentence model = SentenceTransformer 'all-MiniLM-L6-v2' ⋮---- sentence model = None ⋮---- ============================================================================ Data Structures for LoComo10 Dataset ⋮---- @dataclass class QA ⋮---- question: str answer: Optional str evidence: List str category: Optional int = None adversarial answer: Optional str = None ⋮---- @property def final answer self - Optional str ⋮---- """Get the appropriate answer based on category.""" ⋮---- @dataclass class Turn ⋮---- speaker: str dia id: str text: str ⋮---- @dataclass class Session ⋮---- session id: int date time: str turns: List Turn ⋮---- @… Evidence: `test_locomo10.py`
- **Parse QA data** (source_file): @dataclass class QA ⋮---- question: str answer: Optional str evidence: List str category: Optional int = None adversarial answer: Optional str = None ⋮---- @property def final answer self - Optional str ⋮---- @dataclass class Turn ⋮---- speaker: str dia id: str text: str ⋮---- @dataclass class Session ⋮---- session id: int date time: str turns: List Turn ⋮---- @dataclass class Conversation ⋮---- speaker a: str speaker b: str sessions: Dict int, Session ⋮---- @dataclass class EventSummary ⋮---- events: Dict str, Dict str, List str ⋮---- @dataclass class Observation ⋮---- observations: Dict str, Dict str, List List str ⋮---- @dataclass class LoCoMoSample ⋮---- sample id: str qa: List QA conve… Evidence: `test_ref/load_dataset.py`
- **Init** (source_file): all = Evidence: `EvolveMem/evolvemem/__init__.py`
- **Init** (source_file): all = Evidence: `EvolveMem/evolvemem/benchmarks/__init__.py`
- **Config** (source_file): @dataclass class EvolveMemConfig ⋮---- memory store path: str = "memory data/store/memory.db" memory scope: str = "default" memory dir: str = "memory data/store" ⋮---- memory retrieval mode: str = "keyword" memory use embeddings: bool = False memory embedding mode: str = "hashing" memory embedding model: str = "all-MiniLM-L6-v2" memory max injected units: int = 6 memory max injected tokens: int = 800 ⋮---- memory policy path: str = "memory data/store/policy.json" memory telemetry path: str = "memory data/store/telemetry.jsonl" ⋮---- memory auto upgrade enabled: bool = False memory auto upgrade interval seconds: int = 900 memory auto upgrade require review: bool = True memory review stale af… Evidence: `EvolveMem/evolvemem/config.py`
- **Init** (source_file): all = "Settings", "get settings" Evidence: `MCP/config/__init__.py`
- **============================================================================** (source_file): """ Configuration file - System parameters and LLM settings Evidence: `MCP/reference/config.py.example`
- **Init** (source_file): all = 'MemoryBuilder', 'HybridRetriever', 'AnswerGenerator' Evidence: `MCP/reference/core/__init__.py`
- **Generate vectors encode documents without query prompt** (source_file): class VectorStore ⋮---- def init self, db path: str = None, embedding model: EmbeddingModel = None, table name: str = None ⋮---- def init table self ⋮---- schema = pa.schema ⋮---- def add entries self, entries: List MemoryEntry ⋮---- """ Batch add memory entries """ ⋮---- Generate vectors encode documents without query prompt restatements = entry.lossless restatement for entry in entries vectors = self.embedding model.encode documents restatements ⋮---- Build data data = ⋮---- def semantic search self, query: str, top k: int = 5 - List MemoryEntry ⋮---- query vector = self.embedding model.encode single query, is query=True ⋮---- results = self.table.search query vector.tolist .limit top k .… Evidence: `MCP/reference/database/vector_store.py`
- **Init** (source_file): all = 'MemoryEntry', 'Dialogue' Evidence: `MCP/reference/models/__init__.py`
- **Requirements** (source_file): absl-py==2.3.1 accelerate==1.10.1 aiohappyeyeballs==2.6.1 aiohttp==3.13.2 aiosignal==1.4.0 annotated-types==0.7.0 anthropic==0.75.0 anyio==4.11.0 async-timeout==5.0.1 attrs==25.4.0 backoff==2.2.1 bert-score==0.3.13 certifi==2025.10.5 charset-normalizer==3.4.3 click==8.3.0 contourpy==1.3.2 cycler==0.12.1 dataparser==0.0.2 datasets==4.4.1 dateparser==1.2.2 deprecation==2.1.0 dill==0.4.0 distro==1.9.0 docstring parser==0.17.0 dydantic==0.0.8 exceptiongroup==1.3.0 fastuuid==0.14.0 filelock==3.20.0 fonttools==4.60.1 frozenlist==1.8.0 fsspec==2025.9.0 greenlet==3.2.4 grpcio==1.75.1 h11==0.16.0 h2==4.3.0 hf-xet==1.1.10 hpack==4.1.0 httpcore==1.0.9 httpx==0.28.1 huggingface-hub==0.35.3 hyperframe==… Evidence: `MCP/reference/requirements.txt`
- **Init** (source_file): all = 'LLMClient', 'EmbeddingModel' Evidence: `MCP/reference/utils/__init__.py`
- **Init** (source_file): version = "1.0.0" Evidence: `MCP/server/__init__.py`
- **Init** (source_file): all = "TokenManager", "User", "TokenPayload" Evidence: `MCP/server/auth/__init__.py`
- **Token Manager** (source_file): class TokenManager ⋮---- key = hashlib.sha256 encryption key.encode .digest ⋮---- def encrypt api key self, api key: str - str ⋮---- def decrypt api key self, encrypted key: str - str ⋮---- def generate token self, user: User - str ⋮---- expiration = datetime.utcnow + timedelta days=self.expiration days ⋮---- payload = TokenPayload ⋮---- def verify token self, token: str - Tuple bool, Optional TokenPayload , Optional str ⋮---- decoded = jwt.decode payload = TokenPayload.from dict decoded ⋮---- def refresh token self, token: str - Tuple Optional str , Optional str ⋮---- """ Refresh a valid token with new expiration Returns: Tuple of new token, error message """ ⋮---- new payload = TokenPaylo… Evidence: `MCP/server/auth/token_manager.py`
- **Init** (source_file): all = "MemoryBuilder", "Retriever", "AnswerGenerator" Evidence: `MCP/server/core/__init__.py`
- **Init** (source_file): all = "MultiTenantVectorStore", "UserStore" Evidence: `MCP/server/database/__init__.py`
- The remaining 17 evidence entries are in `AI_CONTEXT_PACK.json` or `EVIDENCE_INDEX.json`.

## Rules the Host AI Must Follow

- **Treat this asset as pre-work context, not a runtime environment.**: The AI Context Pack contains only an evidence-backed understanding of the project, not the project's executable state. Evidence: `EvolveMem/README.md`, `MCP/README.md`, `OmniSimpleMem/README.md`
- **When answering the user, distinguish what can be previewed from what can only be verified after install.**: The consumer value of the pre-install experience comes from reducing bad installs and misjudgments, not from pretending to be a real run. Evidence: `EvolveMem/README.md`, `MCP/README.md`, `OmniSimpleMem/README.md`

## Questions the User Should Answer First

- Which host AI or local environment do you plan to use it in?
- Do you just want to experience the workflow first, or are you ready to actually install?
- What matters most to you: install cost, output quality, or conflicts with your existing rules?

## Acceptance Checks

- Every capability claim can be traced back to a file path in evidence_refs.
- AI_CONTEXT_PACK.md does not package previews as a real run.
- The user can understand who it fits, what it can do, how to start, and the risk boundaries within 3 minutes.

---

## Doramagic Context Augmentation

The following sections strengthen the repository context for a host AI. Human Manual data is a reading route, and pitfall notes become operating constraints.

## Human Manual Outline

Usage rule: this is only a reading route and salience signal, not factual authority. Concrete claims must still return to repo evidence or Claim Graph.

Host AI hard rules:
- Do not treat page titles, section order, summaries, or importance values as factual project evidence.
- When explaining the Human Manual outline, state that it is only a reading route or salience signal.
- Capability, installation, compatibility, runtime state, and risk claims must cite repo evidence, source paths, or Claim Graph.

- **Getting Started with SimpleMem**: importance `high`
  - source_paths: README.md, simplemem/__init__.py, simplemem/router.py, config.py.example, requirements.txt
- **Architecture and Memory Backends**: importance `high`
  - source_paths: simplemem/text/system.py, simplemem/core/memory_builder.py, simplemem/core/hybrid_retriever.py, simplemem/core/answer_generator.py, simplemem/core/database/vector_store.py
- **MCP Server, Docker Deployment & Security**: importance `high`
  - source_paths: MCP/README.md, MCP/server/http_server.py, MCP/server/mcp_handler.py, MCP/server/auth/token_manager.py, MCP/server/database/vector_store.py
- **Benchmark Reproduction & Common Issues**: importance `high`
  - source_paths: test_locomo10.py, test_ref/test_advanced.py, test_ref/load_dataset.py, OmniSimpleMem/README.md, OmniSimpleMem/configs/locomo_config.yaml

## Repo Inspection Evidence

- repo_clone_verified: true
- repo_inspection_verified: true
- repo_commit: `60a48e83a7fef10d386e1f438589047d3a4257bc`
- inspected_files: `Dockerfile`, `README.md`, `docker-compose.yml`, `requirements.txt`, `docs/PACKAGE_USAGE.md`, `docs/i18n/README.ar.md`, `docs/i18n/README.de.md`, `docs/i18n/README.es.md`, `docs/i18n/README.fr.md`, `docs/i18n/README.it.md`, `docs/i18n/README.ja.md`, `docs/i18n/README.ko.md`, `docs/i18n/README.pt-br.md`, `docs/i18n/README.ru.md`, `docs/i18n/README.tr.md`, `docs/i18n/README.vi.md`, `docs/i18n/README.zh-CN.md`, `docs/text-memory.md`, `examples/quickstart.py`

Host AI hard rules:
- Without repo_clone_verified=true, do not claim that the source code has been read.
- Without repo_inspection_verified=true, do not write README, docs, or package-file conclusions as facts.
- Without quick_start_verified=true, do not claim that the Quick Start path has run successfully.

## Doramagic Pitfall Constraints

These rules come from Doramagic discovery, validation, or compilation findings. The host AI must treat them as operating constraints, not background notes.

### Constraint 1: Capability evidence risk requires verification

- Trigger: README/documentation is current enough for a first validation pass.
- Host AI rule: Reproduce the official install and quickstart path in an isolated environment.
- Why it matters: May increase setup, validation, or first-run risk for the user.
- Evidence: capability.assumptions | https://github.com/aiming-lab/SimpleMem
- Hard boundary: Do not present this pitfall as solved, verified, or ignorable unless later evidence explicitly closes it.

### Constraint 2: Security or permission risk requires verification

- Trigger: no_demo
- Host AI rule: Reproduce the official install and quickstart path in an isolated environment.
- Why it matters: May increase setup, validation, or first-run risk for the user.
- Evidence: downstream_validation.risk_items | https://github.com/aiming-lab/SimpleMem
- Hard boundary: Do not present this pitfall as solved, verified, or ignorable unless later evidence explicitly closes it.

### Constraint 3: Security or permission risk requires verification

- Trigger: no_demo
- Host AI rule: Reproduce the official install and quickstart path in an isolated environment.
- Why it matters: May increase setup, validation, or first-run risk for the user.
- Evidence: risks.scoring_risks | https://github.com/aiming-lab/SimpleMem
- Hard boundary: Do not present this pitfall as solved, verified, or ignorable unless later evidence explicitly closes it.
