# memmachine - 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 memmachine. 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

- **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: `packages/skills/memmachine-memory/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: `packages/skills/memmachine-memory/SKILL.md` Claim: `clm_0001` supported 0.86
- **Multi-Host Install and Distribution** (Verify after install): The project contains plugin or marketplace configuration, indicating it targets install and distribution across one or more AI hosts. Evidence: `integrations/openclaw/openclaw.plugin.json` Claim: `clm_0002` unverified 0.25
- **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`, `packages/client/README.md`, `packages/common/README.md`, `packages/meta/README.md` et al. Claim: `clm_0003` supported 0.86

## How to Start

- `pip install memmachine-client` Evidence: `README.md` Claim: `clm_0006` supported 0.86
- `pip install -e packages/client` Evidence: `packages/client/README.md` Claim: `clm_0007` supported 0.86
- `pip install memmachine-common` Evidence: `packages/common/README.md` Claim: `clm_0008` supported 0.86
- `pip install -e packages/common` Evidence: `packages/common/README.md` Claim: `clm_0009` supported 0.86
- `pip install memmachine` Evidence: `packages/meta/README.md` Claim: `clm_0006` supported 0.86, `clm_0008` supported 0.86, `clm_0010` supported 0.86
- `npx skills add https://github.com/MemMachine/MemMachine \` Evidence: `packages/skills/README.md` Claim: `clm_0011` supported 0.86
- `npm install @memmachine/client` Evidence: `packages/ts-client/README.md` Claim: `clm_0012` 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: 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: `packages/skills/memmachine-memory/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: `packages/skills/memmachine-memory/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`, `packages/client/README.md`, `packages/common/README.md`, `packages/meta/README.md` et al. Claim: `clm_0003` 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: `AGENTS.md`, `integrations/openclaw/openclaw.plugin.json`, `packages/skills/memmachine-memory/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. Evidence: `integrations/openclaw/openclaw.plugin.json`
- **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`, `packages/client/README.md`, `packages/common/README.md`, `packages/meta/README.md` et al.
- **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: `AGENTS.md`, `integrations/openclaw/openclaw.plugin.json`, `packages/skills/memmachine-memory/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`, `integrations/openclaw/openclaw.plugin.json`, `packages/client/README.md`, `packages/common/README.md` et al.
- **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: `integrations/aws_strands_agent_sdk/README.md`, `integrations/aws_strands_agent_sdk/example.py`, `packages/client/README.md`
- **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_0013` inferred 0.45
- **Host AI plugin or Skill rule conflicts**: New rules may change how the user's existing host AI behaves. Mitigation: Inspect the plugin manifest and Skill files before installing, and test in isolation if needed. Evidence: `integrations/openclaw/openclaw.plugin.json` Claim: `clm_0014` 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`, `packages/client/README.md`, `packages/common/README.md`, `packages/meta/README.md` et al. Claim: `clm_0015` 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: `packages/skills/memmachine-memory/SKILL.md` Claim: `clm_0001` supported 0.86
- **Multi-Host Install and Distribution**: 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: `integrations/openclaw/openclaw.plugin.json`
- **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`, `packages/client/README.md`, `packages/common/README.md`, `packages/meta/README.md` et al. Claim: `clm_0003` supported 0.86

### Context Scale

- Total files: 731
- Important-file coverage: 40/731
- Evidence index entries: 80
- Role / Skill entries: 1

### 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 memmachine, 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 memmachine 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 memmachine, 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 1 role / Skill / project-doc entries.

- **memmachine-memory** (skill):  Activation hint: When the user's task is highly relevant to the workflow described by “memmachine-memory”, use it for a pre-install experience first, then decide whether to install. Evidence: `packages/skills/memmachine-memory/SKILL.md`

## Evidence Index

- Indexed 80 evidence entries.

- **MemMachine** (documentation): ! MemMachine: Long Term Memory for AI Agents https://raw.githubusercontent.com/MemMachine/MemMachine/main/assets/img/MemMachine Hero Banner.png Evidence: `README.md`
- **Benchmark Evaluation Guide** (documentation): This folder contains evaluation scripts for measuring MemMachine retrieval and memory quality on benchmark datasets. Evidence: `evaluation/README.md`
- **MemMachine Examples** (documentation): This directory contains runnable examples that showcase MemMachine integrations and agents. It mirrors the structure and intent of examples/v1/README.md , while highlighting the newer agent demos in this directory. Evidence: `examples/README.md`
- **Maintainers Guide** (documentation): This directory contains essential process documents for MemMachine maintainers. Each file outlines best practices, workflows, and procedures to ensure smooth project operation and high-quality contributions. Evidence: `maintainers/README.md`
- **MemMachine Helm Chart** (documentation): Deploys MemMachine with optional in-cluster PostgreSQL pgvector and Neo4j. Both databases can be replaced with external instances via postgres.enabled=false / neo4j.enabled=false . Evidence: `deployments/helm/README.md`
- **LoCoMo** (documentation): - Please ensure your cfg.yml file has been copied into your episodic memory directory /memmachine/evaluation/episodic memory/ and renamed to locomo config.yaml . Evidence: `evaluation/episodic_memory/README.md`
- **Retrieval-Agent Benchmark Configuration** (documentation): Retrieval-Agent Benchmark Configuration Evidence: `evaluation/retrieval_agent/README.md`
- **BEAM Benchmark** (documentation): BEAM evaluates long-form conversation memory through rubric-based assessment. Evidence: `evaluation/retrieval_agent/beam/README.md`
- **OpenAI Agents SDK + MemMachine Python Example** (documentation): OpenAI Agents SDK + MemMachine Python Example Evidence: `examples/openai_agent/README.md`
- **Qwen Agent + MemMachine Tool Integration Example** (documentation): Qwen Agent + MemMachine Tool Integration Example Evidence: `examples/qwen_agent/README.md`
- **Simple Chatbot - MemMachine Integration Example** (documentation): Simple Chatbot - MemMachine Integration Example Evidence: `examples/simple_chatbot/README.md`
- **memmachine-client-demo** (documentation): This is a TypeScript demo project that demonstrates how to use @memmachine/client for basic REST client operations. Evidence: `examples/ts_rest_client_demo/README.md`
- **MemMachine Agents** (documentation): This directory contains specialized AI agents that integrate with the MemMachine system. Each agent is designed to handle specific domains and use cases, providing tailored query construction and memory management capabilities. These agents leverage MemMachine's memory system to provide context-aware, personalized responses across various domains. Evidence: `examples/v1/README.md`
- **Writing Assistant** (documentation): A writing assistant that analyzes and learns your writing style, then generates new content in your unique voice. Evidence: `examples/v1/writing_assistant/README.md`
- **AWS Strands Agent SDK Integration with MemMachine** (documentation): AWS Strands Agent SDK Integration with MemMachine Evidence: `integrations/aws_strands_agent_sdk/README.md`
- **CrewAI Integration with MemMachine** (documentation): This directory contains tools for integrating MemMachine with CrewAI agents. Evidence: `integrations/crewai/README.md`
- **MemMachine Dify Integration for contributors** (documentation): MemMachine Dify Integration for contributors Evidence: `integrations/dify/README.md`
- **memmachine-plugin** (documentation): Author: memverge Version: 0.2.1 Type: tool Evidence: `integrations/dify/plugin/README.md`
- **FastGPT Integration with MemMachine** (documentation): FastGPT Integration with MemMachine Evidence: `integrations/fastgpt/README.md`
- **LangChain Integration with MemMachine** (documentation): LangChain Integration with MemMachine Evidence: `integrations/langchain/README.md`
- **LangGraph Integration with MemMachine** (documentation): LangGraph Integration with MemMachine Evidence: `integrations/langgraph/README.md`
- **n8n Integration with MemMachine** (documentation): This directory explains how to integrate MemMachine memory operations into n8n workflows. It provides guidance on using MemMachine’s nodes within n8n. Evidence: `integrations/n8n/README.md`
- **MemMachine OpenClaw Plugin** (documentation): This plugin integrates OpenClaw with MemMachine to provide persistent, queryable long-term memory across agent sessions. MemMachine by MemVerge stores interaction history and retrieves high-relevance context at inference time, enabling response grounding while reducing prompt size and token usage. Evidence: `integrations/openclaw/README.md`
- **What is MemMachine?** (documentation): strands-memmachine MemMachine memory tool for Strands Agents Strands Docs ◆ MemMachine ◆ API Docs ◆ Community Packages Evidence: `integrations/strands-memmachine/README.md`
- **MemMachine Client** (documentation): A Python client library for the MemMachine memory system. Evidence: `packages/client/README.md`
- **MemMachine Common** (documentation): Shared Python models and API types for MemMachine packages. Evidence: `packages/common/README.md`
- **MemMachine Meta-Package** (documentation): This package is a meta-package that installs the full MemMachine suite, including: Evidence: `packages/meta/README.md`
- **MemMachine Memory Skill** (documentation): Use this skill when an agent needs durable project, user, or session context from MemMachine, or when it needs to save stable information for future agent runs. The skill teaches the agent to use mem-cli for memory retrieval before falling back to repository search for prior context. Evidence: `packages/skills/README.md`
- **MemMachine REST Client** (documentation): A unified TypeScript/Node.js SDK for MemMachine RESTful APIs, providing a consistent interface to manage memories. Evidence: `packages/ts-client/README.md`
- **chatgpt2memmachine** (documentation): Import chat history from external sources into MemMachine. Evidence: `tools/chatgpt2memmachine/README.md`
- **MemMachine Agent Guide** (documentation): This file helps autonomous coding agents work effectively in this repo. It summarizes build/lint/test commands and the code style expectations for both Python and the TypeScript REST client packages. Evidence: `AGENTS.md`
- **Welcome to the MemMachine Project** (documentation): Thank you for your interest in contributing to MemMachine! We are a community-driven open-source project, and we welcome contributions from everyone. Whether you're a new developer or a seasoned pro, your help is invaluable. Evidence: `CONTRIBUTING.md`
- **Package** (package_manifest): { "name": "memmachine-client-demo", "version": "1.0.0", "main": "./dist/index.js", "scripts": { "dev": "tsx --watch src/index.ts" }, "keywords": , "license": "ISC", "dependencies": { "@memmachine/client": "^0.0.1" }, "devDependencies": { "tsx": "^4.21.0", "typescript": "^5.9.3" } } Evidence: `examples/ts_rest_client_demo/package.json`
- **Package** (package_manifest): { "name": "@memmachine/openclaw-memmachine", "version": "0.0.0-development", "type": "module", "description": "OpenClaw MemMachine memory plugin", "homepage": "https://memmachine.ai", "repository": { "type": "git", "url": "git+https://github.com/MemMachine/MemMachine.git" }, "main": "./dist/index.cjs", "module": "./dist/index.mjs", "types": "./dist/index.d.ts", "exports": { ".": { "types": "./dist/index.d.ts", "require": "./dist/index.cjs", "import": "./dist/index.mjs" } }, "files": "dist", "openclaw.plugin.json" , "scripts": { "clean": "node -e \"require 'node:fs' .rmSync 'dist',{recursive:true,force:true} \"", "build": "npm run clean && npm exec tsup", "test": "node --experimental-vm-modu… Evidence: `integrations/openclaw/package.json`
- **Package** (package_manifest): { "name": "@memmachine/client", "version": "0.0.0-development", "description": "TypeScript client for MemMachine RESTful APIs", "homepage": "https://memmachine.ai", "repository": { "type": "git", "url": "git+https://github.com/MemMachine/MemMachine.git" }, "main": "./dist/index.js", "module": "./dist/index.mjs", "types": "./dist/index.d.ts", "typesVersions": { " ": { " ": "./dist/index.d.ts" } }, "exports": { ".": { "types": "./dist/index.d.ts", "require": "./dist/index.js", "import": "./dist/index.mjs" } }, "files": "dist", "README.md" , "scripts": { "clean": "rimraf dist", "build": "npm run clean && eslint . --ext .ts --fix && npx prettier --write . && npx tsup", "test": "jest", "test:wat… Evidence: `packages/ts-client/package.json`
- **MemMachine Memory** (skill_instruction): Use MemMachine as durable context storage when the current prompt or conversation does not contain enough prior project, user, or session context. When this skill is loaded for retrieval, the first evidence-gathering action must be a MemMachine query through mem-cli , not grep , rg , find , ls , or manual repository browsing. Evidence: `packages/skills/memmachine-memory/SKILL.md`
- **License** (source_file): Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ Evidence: `LICENSE`
- **MemMachine Docker Setup Guide** (documentation): Prerequisites - Docker and Docker Compose installed - OpenAI API key configured Evidence: `DOCKER_COMPOSE_README.md`
- **Guide for AI Assistants - Using MemMachine** (documentation): Guide for AI Assistants - Using MemMachine Evidence: `USAGE.md`
- **Docker Compose** (source_file): services: postgres: image: pgvector/pgvector:pg16 container name: memmachine-postgres restart: unless-stopped ports: - "${POSTGRES PORT:-5432}:5432" environment: POSTGRES DB: ${POSTGRES DB:-memmachine} POSTGRES USER: ${POSTGRES USER:-memmachine} POSTGRES PASSWORD: ${POSTGRES PASSWORD:-memmachine password} POSTGRES INITDB ARGS: "--encoding=UTF-8 --lc-collate=C --lc-ctype=C" volumes: - postgres data:/var/lib/postgresql/data healthcheck: test: "CMD-SHELL", "pg isready -U ${POSTGRES USER:-memmachine} -d ${POSTGRES DB:-memmachine}" interval: 10s timeout: 5s retries: 5 start period: 30s networks: - memmachine-network neo4j: image: neo4j:5.23-community container name: memmachine-neo4j restart: unl… Evidence: `docker-compose.yml`
- **Do not add any new paths under packages/** (source_file): tool.uv.workspace members = "packages/client", "packages/common", "packages/server" Evidence: `pyproject.toml`
- **Introduction: Why AI Needs to Remember** (source_file): Introduction: Why AI Needs to Remember Evidence: `docs/core_concepts/agentic_memory.mdx`
- **Examples of MemMachine in action** (source_file): MemMachine is a versatile memory backend that can be integrated into various applications and use cases. Evidence: `docs/examples/introduction.mdx`
- **Let's Get Started** (source_file): Meet MemMachine , an open-source memory layer for advanced AI agents. It enables AI-powered applications to learn , store , and recall data and preferences from past sessions to enrich future interactions. MemMachine’s memory layer persists across multiple sessions, agents, and large language models, building a sophisticated, evolving user profile. It transforms AI chatbots into personalized, context-aware AI assistants designed to understand and respond with better precision and depth. Evidence: `docs/getting_started/introduction.mdx`
- **Standard Installation** (source_file): MemMachine offers flexible installation options to meet diverse development needs. Choose the method that best fits your environment, whether you are starting fresh or integrating with specific AI backends. Evidence: `docs/install_guide/introduction.mdx`
- **MemMachine behind the Cover** (source_file): MemMachine, like any machine, consists of several different components that work together to store memory intelligently, retrieve memory intelligently, and use the right memory combination to assist AI Agents in generating the best output for a given question or query. Evidence: `docs/open_source/introduction.mdx`
- **Welcome to the MemMachine Platform!** (source_file): Welcome to the MemMachine Platform! Evidence: `docs/platform/introduction.mdx`
- **Add semantic memory** (source_file): MEMMACHINE PORT = os.getenv "MEMORY SERVER URL", "http://localhost:8080" ORG ID = os.getenv "ORG ID", "default-org" PROJECT ID = os.getenv "PROJECT ID", "simple chatbot" ⋮---- PROMPT = """You are a helpful AI assistant. Use the provided context and profile information to answer the user's question accurately and helpfully. ⋮---- def dict to filter string filter dict: dict str, str - str ⋮---- conditions = ⋮---- escaped value = value.replace "'", "''" ⋮---- def ingest and rewrite user id: str, query: str - str ⋮---- """Pass a raw user message through the memory server and get context-aware response.""" ⋮---- filter str = f"metadata.user id='{user id}'" resp = requests.post ⋮---- data = resp.… Evidence: `examples/simple_chatbot/gateway_client.py`
- **Gateway Client** (source_file): EXAMPLE SERVER PORT = os.getenv "EXAMPLE SERVER PORT", "http://localhost:8000" ⋮---- def ingest and rewrite user id: str, query: str, model type: str = "openai" - str ⋮---- resp = requests.post ⋮---- def add session message user id: str, msg: str - None ⋮---- def create persona query user id: str, query: str - str ⋮---- resp = requests.get ⋮---- search results = resp.json ⋮---- def add new session message user id: str, msg: str - None ⋮---- """Alias for add session message for backward compatibility.""" ⋮---- def delete profile user id: str - bool ⋮---- """Delete all memory for the given user id via the CRM server.""" Evidence: `examples/v1/frontend/gateway_client.py`
- **Add Memory** (source_file): class AddMemoryTool Tool ⋮---- api key = self.runtime.credentials or {} .get "memmachine api key" base url = self.runtime.credentials or {} .get "memmachine base url" base url str = str base url .strip if base url is not None else "" client = MemMachineClient ⋮---- content = str tool parameters.get "content" or "" .strip ⋮---- message: dict str, Any = {"content": content} ⋮---- value = tool parameters.get key ⋮---- metadata = tool parameters.get "metadata" ⋮---- body = { ⋮---- result = client.post "/memories", body ⋮---- resp = getattr e, "response", None Evidence: `integrations/dify/plugin/tools/add-memory.py`
- **Search Memory** (source_file): class SearchMemoryTool Tool ⋮---- api key = self.runtime.credentials or {} .get "memmachine api key" base url = self.runtime.credentials or {} .get "memmachine base url" base url str = str base url .strip if base url is not None else "" client = MemMachineClient ⋮---- query = str tool parameters.get "query" or "" .strip ⋮---- top k = tool parameters.get "top k", 10 ⋮---- top k int = int top k ⋮---- top k int = 10 ⋮---- body: dict str, Any = { ⋮---- filter value = tool parameters.get "filter" ⋮---- types value = tool parameters.get "types" ⋮---- result = client.post "/memories/search", body ⋮---- resp = getattr e, "response", None Evidence: `integrations/dify/plugin/tools/search-memory.py`
- **If no query, use a general search** (source_file): BaseMemory = None BaseMessage = None HumanMessage = None AIMessage = None SystemMessage = None LANGCHAIN VERSION = None ⋮---- def import langchain ⋮---- langchain memory = importlib.import module "langchain.memory" langchain schema = importlib.import module "langchain.schema" BaseMemory = langchain memory.BaseMemory BaseMessage = langchain schema.BaseMessage HumanMessage = langchain schema.HumanMessage AIMessage = langchain schema.AIMessage SystemMessage = langchain schema.SystemMessage LANGCHAIN VERSION = "0.x" ⋮---- langchain core memory = importlib.import module "langchain core.memory" langchain core messages = importlib.import module "langchain core.messages" BaseMemory = langchain core… Evidence: `integrations/langchain/memory.py`
- **-----------------------------** (source_file): DEFAULT INTRO PREFERENCES = "Below are a set of relevant preferences retrieved from potentially several memory sources:" DEFAULT OUTRO PREFERENCES = "This is the end of the retrieved preferences." ⋮---- class MemMachineMemory BaseMemory ⋮---- org = org id or self. context.get "org id" proj = project id or self. context.get "project id" ⋮---- project = self. client.get project org id=org, project id=proj ⋮---- project = self. client.create project org id=org, project id=proj ⋮---- memory = self. get memory user id=user id success = memory.add ⋮---- """ Search for memories in MemMachine. Retrieves relevant context and facts based on a query constructed from recent chat history. Results are no… Evidence: `integrations/llamaindex/mem_machine_memory.py`
- **Pyproject** (source_file): build-system requires = "hatchling", "hatch-vcs" build-backend = "hatchling.build" Evidence: `integrations/strands-memmachine/pyproject.toml`
- **Pyproject** (source_file): build-system requires = "setuptools =68.0", "wheel", "setuptools-scm =8.0" build-backend = "setuptools.build meta" Evidence: `packages/client/pyproject.toml`
- **Cli** (source_file): ENV API KEY = "MEMMACHINE API KEY" ENV BASE URL = "MEMORY BACKEND URL" ENV MAX RETRIES = "MEMMACHINE MAX RETRIES" ENV ORG ID = "MEMMACHINE ORG ID" ENV PROJECT ID = "MEMMACHINE PROJECT ID" ENV TIMEOUT = "MEMMACHINE TIMEOUT" DEFAULT PROG = "mem-cli" ⋮---- def env int name: str, default: int - int ⋮---- raw value = os.environ.get name ⋮---- def die message: str, , prog: str = DEFAULT PROG - None ⋮---- def to jsonable value: object - object ⋮---- def json default value: object - object ⋮---- def print json value: object - None ⋮---- value = to jsonable value ⋮---- def parse json object raw value: str, , option name: str - dict str, JsonValue ⋮---- value = json.loads raw value ⋮---- def parse js… Evidence: `packages/client/src/memmachine_client/cli.py`
- **Use shared API Pydantic models** (source_file): logger = logging.getLogger name ⋮---- class MemMachineClient ⋮---- class ExtraOptions TypedDict, total=False ⋮---- retry strategy = Retry adapter = HTTPAdapter max retries=retry strategy ⋮---- class RequestExtraOptions TypedDict, total=False ⋮---- """Extra options for the HTTP request.""" ⋮---- params: Mapping str, str Sequence tuple str, str None data: Iterable bytes str bytes IO Any Mapping Any, Any None json: Any headers: Mapping str, str bytes None None cookies: RequestsCookieJar MutableMapping str, str None files: Mapping str, Any Iterable tuple str, Any None auth: allow redirects: bool proxies: MutableMapping str, str None hooks: stream: bool None verify: bool str None cert: str tuple… Evidence: `packages/client/src/memmachine_client/client.py`
- **Langgraph** (source_file): class MemMachineTools ⋮---- metadata: dict str, str = {} resolved group id = group id or self.group id resolved agent id = agent id or self.agent id resolved user id = user id or self.user id resolved session id = session id or self.session id ⋮---- project = self.client.get or create project ⋮---- metadata = self. build metadata ⋮---- memory = self.get memory normalized episode type = results = memory.add ⋮---- result = memory.search ⋮---- formatted results: dict str, Any = { ⋮---- episodic = result.content.episodic memory ⋮---- def format search summary self, results: dict str, Any - str ⋮---- """ Format search results into a readable summary. Args: results: Search results dictionary Retu… Evidence: `packages/client/src/memmachine_client/langgraph.py`
- **Memory** (source_file): logger = logging.getLogger name ⋮---- class Memory ⋮---- @property def org id self - str ⋮---- @property def project id self - str ⋮---- @property def metadata self - dict str, str ⋮---- merged metadata = self. metadata.copy ⋮---- def validate role self, role: str - None ⋮---- valid roles = {"user", "assistant", "system"} ⋮---- combined metadata = self. build metadata metadata ⋮---- message = MemoryMessage ⋮---- """ Add a memory episode. Args: content: The content to store in memory role: Message role - "user", "assistant", or "system" default: "" producer: Who produced this content default: "user" if not provided, set by server produced for: Who this content is for default: "" if not provi… Evidence: `packages/client/src/memmachine_client/memory.py`
- **Project** (source_file): logger = logging.getLogger name ⋮---- class Project ⋮---- """ Initialize Project instance. Args: client: MemMachineClient instance org id: Organization identifier project id: Project identifier description: Project description config: Project configuration from server """ ⋮---- """ Create a Memory instance for this project. Args: metadata: Metadata dictionary that will be merged with metadata in add and search operations. Common keys include: user id, agent id, group id, session id, etc. kwargs: Additional configuration options Returns: Memory instance configured for this project """ ⋮---- memory = Memory ⋮---- def delete self, timeout: int None = None - bool ⋮---- """ Delete this project.… Evidence: `packages/client/src/memmachine_client/project.py`
- The remaining 20 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: `README.md`, `evaluation/README.md`, `examples/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: `README.md`, `evaluation/README.md`, `examples/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.

- **MemMachine Overview & System Architecture**: importance `high`
  - source_paths: README.md, USAGE.md, pyproject.toml, docker-compose.yml, docs/getting_started/introduction.mdx
- **Memory Architecture: Episodic, Profile/Semantic, and Working Memory**: importance `high`
  - source_paths: packages/server/src/memmachine_server/episodic_memory/episodic_memory.py, packages/server/src/memmachine_server/episodic_memory/episodic_memory_manager.py, packages/server/src/memmachine_server/episodic_memory/long_term_memory/long_term_memory.py, packages/server/src/memmachine_server/episodic_memory/short_term_memory/short_term_memory.py, packages/server/src/memmachine_server/episodic_memory/declarative_memory/declarative_memory.py
- **Storage Backends: Vector Stores, Graph Databases, and Episode Persistence**: importance `high`
  - source_paths: packages/server/src/memmachine_server/common/vector_store/vector_store.py, packages/server/src/memmachine_server/common/vector_store/sqlite_vector_store.py, packages/server/src/memmachine_server/common/vector_store/sqlite_vec_vector_store.py, packages/server/src/memmachine_server/common/vector_store/qdrant_vector_store.py, packages/server/src/memmachine_server/common/vector_store/vector_search_engine/hnswlib_engine.py
- **SDKs, REST API, MCP, and Framework Integrations**: importance `high`
  - source_paths: packages/client/src/memmachine_client/client.py, packages/client/src/memmachine_client/project.py, packages/client/src/memmachine_client/memory.py, packages/client/src/memmachine_client/langgraph.py, packages/client/src/memmachine_client/cli.py

## Repo Inspection Evidence

- repo_clone_verified: true
- repo_inspection_verified: true
- repo_commit: `a1ab26e07ea47da99cc9bf5004db99dfbe4a7ea6`
- inspected_files: `Dockerfile`, `README.md`, `docker-compose.yml`, `pyproject.toml`, `uv.lock`, `docs/api_reference/intro.mdx`, `docs/api_reference/mcp.mdx`, `docs/api_reference/python/client.mdx`, `docs/api_reference/python/client_api.mdx`, `docs/api_reference/python/config_api.mdx`, `docs/api_reference/python/episodic_memory.mdx`, `docs/api_reference/python/episodic_memory_manager.mdx`, `docs/api_reference/python/memory_api.mdx`, `docs/api_reference/python/memory_types.mdx`, `docs/api_reference/python/project_api.mdx`, `docs/api_reference/python/semantic_api.mdx`, `docs/api_reference/python/semantic_memory.mdx`, `docs/api_reference/python/server.mdx`, `docs/api_reference/python/system_api.mdx`, `docs/api_reference/ts-rest/classes/MemMachineAPIError.mdx`

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/MemMachine/MemMachine
- 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/MemMachine/MemMachine
- 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/MemMachine/MemMachine
- Hard boundary: Do not present this pitfall as solved, verified, or ignorable unless later evidence explicitly closes it.
