# Send Memory Pipeline 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. 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. Summarize what changed and any follow-up checks I should run.
```
## Machine-readable fields
```json
{
  "schemaVersion": "1.0",
  "item": {
    "slug": "memory-pipeline",
    "name": "Memory Pipeline",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/joe-rlo/memory-pipeline",
    "canonicalUrl": "https://clawhub.ai/joe-rlo/memory-pipeline",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadUrl": "/downloads/memory-pipeline",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=memory-pipeline",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "packageFormat": "ZIP package",
    "primaryDoc": "SKILL.md",
    "includedAssets": [
      "SKILL.md",
      "openclaw.plugin.json",
      "references/setup.md",
      "scripts/ingest-chatgpt.py",
      "scripts/memory-briefing.py",
      "scripts/memory-extract.py"
    ],
    "downloadMode": "redirect",
    "sourceHealth": {
      "source": "tencent",
      "slug": "memory-pipeline",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-05-05T11:34:04.656Z",
      "expiresAt": "2026-05-12T11:34:04.656Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=memory-pipeline",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=memory-pipeline",
        "contentDisposition": "attachment; filename=\"memory-pipeline-0.4.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null,
        "slug": "memory-pipeline"
      },
      "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/memory-pipeline"
    },
    "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/memory-pipeline",
    "downloadUrl": "https://openagent3.xyz/downloads/memory-pipeline",
    "agentUrl": "https://openagent3.xyz/skills/memory-pipeline/agent",
    "manifestUrl": "https://openagent3.xyz/skills/memory-pipeline/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/memory-pipeline/agent.md"
  }
}
```
## Documentation

### Memory Pipeline

Give your AI agent a memory that actually works.

AI agents wake up blank every session. Memory Pipeline fixes that — it extracts what matters from past conversations, connects the dots, and generates a daily briefing so your agent starts each session primed instead of clueless.

### What It Does

ComponentWhen it runsWhat it doesExtractBetween sessionsPulls structured facts (decisions, preferences, learnings) from daily notes and transcriptsLinkBetween sessionsBuilds a knowledge graph — connects related facts, flags contradictionsBriefBetween sessionsGenerates a compact BRIEFING.md loaded at session startIngestOn demandImports external knowledge (ChatGPT exports, etc.) into searchable memoryPerformance HooksDuring sessionsPre-game briefing injection, tool discipline, output compression, after-action review

### Why This Is Different

Most "memory" solutions are just vector search over chat logs. This is a cognitive architecture — inspired by how human memory actually works:

Extraction over accumulation — Instead of dumping everything into a database, it identifies what's worth remembering: decisions, preferences, learnings, commitments. The rest is noise.
Knowledge graph, not just embeddings — Facts get linked to each other with bidirectional relationships. Your agent doesn't just find similar text — it understands that a decision about your tech stack relates to a project deadline relates to a preference you stated three weeks ago.
Briefing over retrieval — Rather than hoping the right context gets retrieved at query time, your agent starts every session with a curated cheat sheet. Active projects, recent decisions, personality reminders. Zero cold-start lag.
No mid-swing coaching — Borrowed from performance psychology. Corrections happen between sessions, not during. The after-action review feeds into the next briefing. The loop is closed — just not mid-execution.

### Install

clawdhub install memory-pipeline

### Setup

bash skills/memory-pipeline/scripts/setup.sh

The setup script will detect your workspace, check dependencies (Python 3 + any LLM API key), create the memory/ directory, and run the full pipeline.

### Requirements

Python 3
At least one LLM API key (auto-detected):

OpenAI (OPENAI_API_KEY or ~/.config/openai/api_key)
Anthropic (ANTHROPIC_API_KEY or ~/.config/anthropic/api_key)
Gemini (GEMINI_API_KEY or ~/.config/gemini/api_key)

### Run Manually

# Full pipeline
python3 skills/memory-pipeline/scripts/memory-extract.py
python3 skills/memory-pipeline/scripts/memory-link.py
python3 skills/memory-pipeline/scripts/memory-briefing.py

### Automate via Heartbeat

Add to your HEARTBEAT.md for daily automatic runs:

### Daily Memory Pipeline
- **Frequency:** Once per day (morning)
- **Action:** Run the memory pipeline:
  1. \`python3 skills/memory-pipeline/scripts/memory-extract.py\`
  2. \`python3 skills/memory-pipeline/scripts/memory-link.py\`
  3. \`python3 skills/memory-pipeline/scripts/memory-briefing.py\`

### Import External Knowledge

Already have years of conversations in ChatGPT? Import them so your agent knows what you know.

### ChatGPT Export

# 1. Export from ChatGPT: Settings → Data Controls → Export Data
# 2. Drop the zip in your workspace
# 3. Run:
python3 skills/memory-pipeline/scripts/ingest-chatgpt.py ~/imports/chatgpt-export.zip

# Preview first (recommended):
python3 skills/memory-pipeline/scripts/ingest-chatgpt.py ~/imports/chatgpt-export.zip --dry-run

What it does:

Parses ChatGPT's conversation tree format
Filters out throwaway conversations (configurable: --min-turns, --min-length)
Supports topic exclusion (edit EXCLUDE_PATTERNS to skip unwanted topics)
Outputs clean, dated markdown files to memory/knowledge/chatgpt/
Files are automatically indexed by OpenClaw's semantic search

Options:

--dry-run — Preview without writing files
--keep-all — Skip all filtering
--min-turns N — Minimum user messages to keep (default: 2)
--min-length N — Minimum total characters (default: 200)

### Adding Other Sources

The pattern is extensible. Create ingest-<source>.py, parse the format, write markdown to memory/knowledge/<source>/. The indexer handles the rest.

### Stage 1: Extract

Script: memory-extract.py

Reads daily notes (memory/YYYY-MM-DD.md) and session transcripts, then uses an LLM to extract structured facts:

{"type": "decision", "content": "Use Rust for the backend", "subject": "Project Architecture", "confidence": 0.9}
{"type": "preference", "content": "Prefers Google Drive over Notion", "subject": "Tools", "confidence": 0.95}

Output: memory/extracted.jsonl

### Stage 2: Link

Script: memory-link.py

Takes extracted facts and builds a knowledge graph:

Generates embeddings for semantic similarity
Creates bidirectional links between related facts
Detects contradictions and marks superseded facts
Auto-generates domain tags

Output: memory/knowledge-graph.json + memory/knowledge-summary.md

### Stage 3: Briefing

Script: memory-briefing.py

Generates a compact daily briefing (< 2000 chars) combining:

Personality traits (from SOUL.md)
User context (from USER.md)
Active projects and recent decisions
Open todos

Output: BRIEFING.md (workspace root)

### Performance Hooks (Optional)

Four lifecycle hooks that enforce execution discipline during sessions. Based on a principle from performance psychology: separate preparation from execution.

User Message → Agent Loop
  ├── before_agent_start  →  Briefing packet (memory + checklist)
  ├── before_tool_call    →  Policy enforcement (deny list)
  ├── tool_result_persist →  Output compression (prevent context bloat)
  └── agent_end           →  After-action review (durable notes)

### Configuration

{
  "enabled": true,
  "briefing": {
    "maxChars": 6000,
    "checklist": [
      "Restate the task in one sentence.",
      "List constraints and success criteria.",
      "Retrieve only the minimum relevant memory.",
      "Prefer tools over guessing when facts matter."
    ],
    "memoryFiles": ["memory/IDENTITY.md", "memory/PROJECTS.md"]
  },
  "tools": {
    "deny": ["dangerous_tool"],
    "maxToolResultChars": 12000
  },
  "afterAction": {
    "writeMemoryFile": "memory/AFTER_ACTION.md",
    "maxBullets": 8
  }
}

### Hook Details

HookWhat it doesbefore_agent_startLoads memory files, builds bounded briefing packet, injects into system promptbefore_tool_callChecks tool against deny list, prevents unsafe callstool_result_persistHead (60%) + tail (30%) compression of large resultsagent_endAppends session summary to memory file with tools used and outcomes

### Output Files

FileLocationPurposeBRIEFING.mdWorkspace rootDaily context cheat sheetextracted.jsonlmemory/All extracted facts (append-only)knowledge-graph.jsonmemory/Full graph with embeddings and linksknowledge-summary.mdmemory/Human-readable graph summaryknowledge/chatgpt/*.mdmemory/Ingested ChatGPT conversations

### Customization

Change LLM models — Edit model names in each script (supports OpenAI, Anthropic, Gemini)
Adjust extraction — Modify the extraction prompt in memory-extract.py to focus on different fact types
Tune link sensitivity — Change the similarity threshold in memory-link.py (default: 0.3)
Filter ingestion — Edit EXCLUDE_PATTERNS in ingest-chatgpt.py for topic exclusion

### Troubleshooting

ProblemFixNo facts extractedCheck that daily notes or transcripts exist; verify API keyLow-quality linksAdd OpenAI key for embedding-based similarity; adjust thresholdBriefing too longReduce facts in template or let LLM generation handle it (auto-constrained to 2000 chars)

### See Also

Setup Guide — Detailed installation and configuration
## Trust
- Source: tencent
- Verification: Indexed source record
- Publisher: joe-rlo
- Version: 0.4.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-05T11:34:04.656Z
- Expires at: 2026-05-12T11:34:04.656Z
- Recommended action: Download for OpenClaw
## Links
- [Detail page](https://openagent3.xyz/skills/memory-pipeline)
- [Send to Agent page](https://openagent3.xyz/skills/memory-pipeline/agent)
- [JSON manifest](https://openagent3.xyz/skills/memory-pipeline/agent.json)
- [Markdown brief](https://openagent3.xyz/skills/memory-pipeline/agent.md)
- [Download page](https://openagent3.xyz/downloads/memory-pipeline)