# Send Memento to your agent
Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.
## Fast path
- Download the package from Yavira.
- Extract it into a folder your agent can access.
- Paste one of the prompts below and point your agent at the extracted folder.
## Suggested prompts
### New install

```text
I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Then review README.md for any prerequisites, environment setup, or post-install checks. Tell me what you changed and call out any manual steps you could not complete.
```
### Upgrade existing

```text
I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Then review README.md for any prerequisites, environment setup, or post-install checks. Summarize what changed and any follow-up checks I should run.
```
## Machine-readable fields
```json
{
  "schemaVersion": "1.0",
  "item": {
    "slug": "memento",
    "name": "Memento",
    "source": "tencent",
    "type": "skill",
    "category": "AI 智能",
    "sourceUrl": "https://clawhub.ai/braibaud/memento",
    "canonicalUrl": "https://clawhub.ai/braibaud/memento",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadUrl": "/downloads/memento",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=memento",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "packageFormat": "ZIP package",
    "primaryDoc": "SKILL.md",
    "includedAssets": [
      "CHANGELOG.md",
      "DESIGN.md",
      "MIGRATION-SPEC.md",
      "PHASE2-SPEC.md",
      "README.md",
      "ROADMAP.md"
    ],
    "downloadMode": "redirect",
    "sourceHealth": {
      "source": "tencent",
      "slug": "memento",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-05-02T08:24:09.108Z",
      "expiresAt": "2026-05-09T08:24:09.108Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=memento",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=memento",
        "contentDisposition": "attachment; filename=\"memento-0.6.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null,
        "slug": "memento"
      },
      "scope": "item",
      "summary": "Item download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this item.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/memento"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    }
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/memento",
    "downloadUrl": "https://openagent3.xyz/downloads/memento",
    "agentUrl": "https://openagent3.xyz/skills/memento/agent",
    "manifestUrl": "https://openagent3.xyz/skills/memento/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/memento/agent.md"
  }
}
```
## Documentation

### Memento — Local Persistent Memory for OpenClaw Agents

Memento gives your agents long-term memory. It captures conversations, extracts structured facts using an LLM, and auto-injects relevant knowledge before each AI turn.

All stored data stays on your machine — no cloud sync, no subscriptions. Extraction uses your configured LLM provider; use a local model (Ollama) for fully air-gapped operation.

⚠️ Privacy note: When autoExtract is enabled, conversation segments are sent to your configured LLM provider for fact extraction. If you use a cloud provider (Anthropic, OpenAI, Mistral), that text leaves your machine. For fully local operation, set extractionModel to ollama/<model> and keep Ollama running locally.

### What It Does

Captures every conversation turn, buffered per session
Extracts structured facts (preferences, decisions, people, action items) via configurable LLM (opt-in — see Privacy section)
Recalls relevant facts before each AI turn using FTS5 keyword search + optional semantic embeddings (BGE-M3)
Respects privacy — facts are classified as shared, private, or secret based on content, with hard overrides for sensitive categories (medical, financial, credentials)
Cross-agent knowledge — shared facts flow between agents with provenance tags; private/secret facts never cross boundaries

### Quick Start

Install the plugin, restart your gateway, and Memento starts capturing automatically. Extraction is off by default — enable it explicitly when ready.

### Optional: Semantic Search

Download a local embedding model for richer recall:

mkdir -p ~/.node-llama-cpp/models
curl -L -o ~/.node-llama-cpp/models/bge-m3-Q8_0.gguf \\
  "https://huggingface.co/gpustack/bge-m3-GGUF/resolve/main/bge-m3-Q8_0.gguf"

### Environment Variables

All environment variables are optional — you only need the one matching your chosen LLM provider:

VariableWhen NeededANTHROPIC_API_KEYUsing anthropic/* models for extractionOPENAI_API_KEYUsing openai/* models for extractionMISTRAL_API_KEYUsing mistral/* models for extractionMEMENTO_API_KEYGeneric fallback for any providerMEMENTO_WORKSPACE_MAINMigration only: path to agent workspace for bootstrapping

No API key needed for ollama/* models (local inference).

### Configuration

Add to your openclaw.json under plugins.entries.memento.config:

{
  "memento": {
    "autoCapture": true,
    "extractionModel": "anthropic/claude-sonnet-4-6",
    "extraction": {
      "autoExtract": true,
      "minTurnsForExtraction": 3
    },
    "recall": {
      "autoRecall": true,
      "maxFacts": 20,
      "crossAgentRecall": true,
      "autoQueryPlanning": false
    }
  }
}

autoExtract: true is an explicit opt-in (default: false). When enabled, conversation segments are sent to the configured extractionModel for LLM-based fact extraction. Omit or set to false to keep everything local.

autoQueryPlanning: true is an explicit opt-in (default: false). When enabled, a fast LLM call runs before each recall search to expand the query with synonyms and identify relevant categories — improving precision at the cost of one extra LLM call per turn.

### Data Storage

Memento stores all data locally:

PathContents~/.engram/conversations.sqliteMain database: conversations, facts, embeddings~/.engram/segments/*.jsonlHuman-readable conversation backups~/.engram/migration-config.jsonOptional: migration workspace paths (only for bootstrapping)

### Privacy & Data Flow

FeatureData leaves machine?DetailsautoCapture (default: true)❌ NoWrites to local SQLite + JSONL onlyautoExtract (default: false)⚠️ Yes, if cloud LLMSends conversation text to configured provider. Use ollama/* for local.autoRecall (default: true)❌ NoReads from local SQLite onlySecret facts❌ NeverFiltered from extraction context — never sent to any LLMMigration❌ NoReads local workspace files, writes to local SQLite

### Migration (Bootstrap from Existing Memory Files)

Migration is an optional, one-time process to seed Memento from existing agent memory/markdown files. It is user-initiated only — never runs automatically.

### What it reads

Migration reads only the files you explicitly list in the config. It does not scan your filesystem, read arbitrary files, or access anything outside the configured paths.

### Setup

Create ~/.engram/migration-config.json or set MEMENTO_WORKSPACE_MAIN:

{
  "agents": [
    {
      "agentId": "main",
      "workspace": "/path/to/your-workspace",
      "paths": ["MEMORY.md", "memory/*.md"]
    }
  ]
}

Always dry-run first to verify exactly which files will be read:

npx tsx src/extraction/migrate.ts --all --dry-run

The dry-run prints every file path it would read — review this before proceeding.

Run the actual migration:

npx tsx src/extraction/migrate.ts --all

### Security notes

Migration only reads files matching the glob patterns you configure
Extracted facts inherit visibility classification (shared/private/secret)
Secret-classified facts are never sent to cloud LLM providers
Migration config file is optional — if absent, migration is completely inert
The migration script has no network access beyond the configured extraction LLM

### Architecture

Capture layer — hooks message:received + message:sent, buffers multi-turn segments
Extraction layer — async LLM extraction with deduplication, occurrence tracking, temporal state transitions (previous_value), and knowledge graph relations (including causal edges with causal_weight)
Storage layer — SQLite schema v7 (better-sqlite3) with FTS5 full-text search + optional vector embeddings; knowledge graph (fact_relations with causal_weight), multi-layer clusters, and temporal transition tracking (previous_value)
Recall layer — optional LLM query planning pre-pass (autoQueryPlanning), multi-factor scoring (recency × frequency × category weight), 1-hop graph traversal with causal edge 1.5× boost, injected via before_prompt_build hook

### Requirements

OpenClaw 2026.2.20+
Node.js 18+
An API key for your preferred LLM provider (for extraction — not needed if extraction is disabled or using Ollama)
Optional: GPU for accelerated embedding search (falls back to CPU gracefully)

### Install

# From ClawHub
clawhub install memento

# Or for local development
git clone https://github.com/braibaud/Memento
cd Memento
npm install

Note: better-sqlite3 includes native bindings that compile during npm install. This is expected behavior for SQLite access.
## Trust
- Source: tencent
- Verification: Indexed source record
- Publisher: braibaud
- Version: 0.6.0
## Source health
- Status: healthy
- Item download looks usable.
- Yavira can redirect you to the upstream package for this item.
- Health scope: item
- Reason: direct_download_ok
- Checked at: 2026-05-02T08:24:09.108Z
- Expires at: 2026-05-09T08:24:09.108Z
- Recommended action: Download for OpenClaw
## Links
- [Detail page](https://openagent3.xyz/skills/memento)
- [Send to Agent page](https://openagent3.xyz/skills/memento/agent)
- [JSON manifest](https://openagent3.xyz/skills/memento/agent.json)
- [Markdown brief](https://openagent3.xyz/skills/memento/agent.md)
- [Download page](https://openagent3.xyz/downloads/memento)