{
  "schemaVersion": "1.0",
  "item": {
    "slug": "persistent-memory",
    "name": "Persistent Memory",
    "source": "tencent",
    "type": "skill",
    "category": "AI 智能",
    "sourceUrl": "https://clawhub.ai/Jakebot-ops/persistent-memory",
    "canonicalUrl": "https://clawhub.ai/Jakebot-ops/persistent-memory",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/persistent-memory",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=persistent-memory",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "SKILL.md",
      "references/architecture.md",
      "scripts/auto_retrieve.py",
      "scripts/configure_openclaw.py",
      "scripts/graph.py",
      "scripts/indexer.py"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "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."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "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."
        },
        {
          "label": "Upgrade existing",
          "body": "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."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-30T16:55:25.780Z",
      "expiresAt": "2026-05-07T16:55:25.780Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
        "contentDisposition": "attachment; filename=\"network-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/persistent-memory"
    },
    "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."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/persistent-memory",
    "agentPageUrl": "https://openagent3.xyz/skills/persistent-memory/agent",
    "manifestUrl": "https://openagent3.xyz/skills/persistent-memory/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/persistent-memory/agent.md"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "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."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "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."
      },
      {
        "label": "Upgrade existing",
        "body": "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."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "Persistent Memory",
        "body": "Adds persistent three-layer memory to any OpenClaw workspace. The agent gains semantic recall across sessions — decisions, facts, lessons, and institutional knowledge survive restarts."
      },
      {
        "title": "Architecture",
        "body": "LayerTechnologyPurposeL1: MarkdownMEMORY.md + daily logs + reference/Human-readable curated knowledgeL2: VectorChromaDB + all-MiniLM-L6-v2Semantic search across all memoriesL3: GraphNetworkXRelationship traversal between concepts\n\nAll three layers sync together. The indexer updates L2 and L3 from L1 automatically."
      },
      {
        "title": "⚠️ Critical Integration: OpenClaw Memory Configuration",
        "body": "Problem: OpenClaw has its own built-in memory search system, but by default it only indexes MEMORY.md and memory/*.md files. Critical workspace files like SOUL.md (agent directives), AGENTS.md (behavior rules), and PROJECTS.md (active work) are ignored.\n\nImpact: Agents can violate explicit directives because they're not found in memory searches. This causes operational failures where agents ignore their own rules.\n\nSolution: The configure_openclaw.py script adds a memorySearch configuration block to OpenClaw that indexes all critical workspace files. This makes directive compliance automatic rather than optional."
      },
      {
        "title": "Setup",
        "body": "One command from workspace root:\n\nbash skills/persistent-memory/scripts/unified_setup.sh\n\nThis automatically:\n\n✅ Creates 3-layer memory system (Markdown + Vector + Graph)\n✅ Installs all Python dependencies (ChromaDB, NetworkX, sentence-transformers)\n✅ Configures OpenClaw memorySearch integration (directive compliance)\n✅ Indexes existing MEMORY.md if present\n✅ Sets up daily maintenance automation\n\nNo manual configuration needed. The script handles everything including OpenClaw integration that prevents agents from ignoring workspace directives (SOUL.md, AGENTS.md, etc.)."
      },
      {
        "title": "Writing Memories",
        "body": "MEMORY.md — Curated long-term knowledge (decisions, architecture, lessons learned). Update after significant events.\nmemory/YYYY-MM-DD.md — Daily logs. Raw notes of what happened each day.\nreference/*.md — Institutional facts (people, repos, infrastructure, business rules). The agent's encyclopedia."
      },
      {
        "title": "Indexing (after editing any memory file)",
        "body": "vector_memory/venv/bin/python vector_memory/indexer.py\n\nThe indexer parses MEMORY.md, reference/.md, and memory/.md into vector embeddings and rebuilds the knowledge graph. Run after every edit to keep layers in sync."
      },
      {
        "title": "Searching",
        "body": "vector_memory/venv/bin/python vector_memory/search.py \"your query\"\n\nReturns top-3 semantically similar chunks with source file and section."
      },
      {
        "title": "Sync Status Check",
        "body": "vector_memory/venv/bin/python vector_memory/auto_retrieve.py --status\n\nReports sync health: MEMORY.md hash vs indexed state, chunk count, graph size. Use in heartbeats to detect drift."
      },
      {
        "title": "Agent Behavior Rules",
        "body": "Add these to AGENTS.md or SOUL.md:"
      },
      {
        "title": "Pre-Response (mandatory)",
        "body": "Before answering questions about prior work, decisions, dates, people, or preferences — search memory first. Use memory_search or run auto_retrieve.py with the query. Never say \"I don't remember\" without checking.\n\nCRITICAL: OpenClaw's built-in memory search should now automatically find directive files (SOUL.md, AGENTS.md) if configure_openclaw.py was run. If memory searches are not finding agent rules or workspace directives, the OpenClaw integration is missing or broken."
      },
      {
        "title": "Pre-Action (mandatory)",
        "body": "Before executing any action that references an external identifier (URL, handle, email, repo name, address) — query reference/ files for the exact value. If not found, query vector memory. If still not found, ask the user. Never fabricate identifiers."
      },
      {
        "title": "Post-Edit (mandatory)",
        "body": "After editing MEMORY.md or any file in reference/ or memory/ — re-index:\n\nvector_memory/venv/bin/python vector_memory/indexer.py"
      },
      {
        "title": "Heartbeat Integration",
        "body": "Add to HEARTBEAT.md:\n\n## Memory Sync Check\nRun `vector_memory/venv/bin/python vector_memory/auto_retrieve.py --status` and if status is OUT_OF_SYNC, re-index with `vector_memory/venv/bin/python vector_memory/indexer.py`."
      },
      {
        "title": "Reference Directory (Optional but Recommended)",
        "body": "Create reference/ in the workspace root as the agent's institutional knowledge base:\n\nreference/\n├── people.md          — Contacts, roles, communication details\n├── repos.md           — GitHub repositories, URLs, status\n├── infrastructure.md  — Hosts, IPs, ports, services\n├── business.md        — Company info, strategies, rules\n└── properties.md      — Domain-specific entities (deals, products, etc.)\n\nThese files are vector-indexed alongside MEMORY.md. The agent queries them before any action involving external identifiers. Facts accumulate over time — the agent that never forgets."
      },
      {
        "title": "File Structure After Setup",
        "body": "workspace/\n├── MEMORY.md              — Curated long-term memory (L1)\n├── memory/\n│   ├── 2026-02-17.md      — Daily log\n│   └── heartbeat-state.json — Sync tracking\n├── reference/             — Institutional knowledge (optional)\n│   ├── people.md\n│   └── ...\n└── vector_memory/\n    ├── indexer.py          — Index all markdown into vectors + graph\n    ├── search.py           — Semantic search CLI\n    ├── graph.py            — NetworkX knowledge graph\n    ├── auto_retrieve.py    — Status checker + auto-retrieval\n    ├── chroma_db/          — Vector database (gitignored)\n    ├── memory_graph.json   — Knowledge graph (auto-generated)\n    └── venv/               — Python venv (gitignored)"
      },
      {
        "title": "Troubleshooting",
        "body": "\"No module named chromadb\" — Run setup.sh again or activate the venv: source vector_memory/venv/bin/activate\nOUT_OF_SYNC status — Run the indexer: vector_memory/venv/bin/python vector_memory/indexer.py\nEmpty search results — Check that MEMORY.md has content and the indexer has been run at least once\nSIGSEGV on indexing — Usually caused by incompatible ML libs. The setup script pins known-good versions.\nAgent ignoring SOUL.md/AGENTS.md directives — OpenClaw integration missing. Run python skills/persistent-memory/scripts/configure_openclaw.py to fix.\nMemory searches not finding workspace files — Check OpenClaw configuration: openclaw config get | grep memorySearch\n\"Configuration verification failed\" — Restart OpenClaw manually: openclaw gateway restart"
      }
    ],
    "body": "Persistent Memory\n\nAdds persistent three-layer memory to any OpenClaw workspace. The agent gains semantic recall across sessions — decisions, facts, lessons, and institutional knowledge survive restarts.\n\nArchitecture\nLayer\tTechnology\tPurpose\nL1: Markdown\tMEMORY.md + daily logs + reference/\tHuman-readable curated knowledge\nL2: Vector\tChromaDB + all-MiniLM-L6-v2\tSemantic search across all memories\nL3: Graph\tNetworkX\tRelationship traversal between concepts\n\nAll three layers sync together. The indexer updates L2 and L3 from L1 automatically.\n\n⚠️ Critical Integration: OpenClaw Memory Configuration\n\nProblem: OpenClaw has its own built-in memory search system, but by default it only indexes MEMORY.md and memory/*.md files. Critical workspace files like SOUL.md (agent directives), AGENTS.md (behavior rules), and PROJECTS.md (active work) are ignored.\n\nImpact: Agents can violate explicit directives because they're not found in memory searches. This causes operational failures where agents ignore their own rules.\n\nSolution: The configure_openclaw.py script adds a memorySearch configuration block to OpenClaw that indexes all critical workspace files. This makes directive compliance automatic rather than optional.\n\nSetup\n\nOne command from workspace root:\n\nbash skills/persistent-memory/scripts/unified_setup.sh\n\n\nThis automatically:\n\n✅ Creates 3-layer memory system (Markdown + Vector + Graph)\n✅ Installs all Python dependencies (ChromaDB, NetworkX, sentence-transformers)\n✅ Configures OpenClaw memorySearch integration (directive compliance)\n✅ Indexes existing MEMORY.md if present\n✅ Sets up daily maintenance automation\n\nNo manual configuration needed. The script handles everything including OpenClaw integration that prevents agents from ignoring workspace directives (SOUL.md, AGENTS.md, etc.).\n\nDaily Usage\nWriting Memories\nMEMORY.md — Curated long-term knowledge (decisions, architecture, lessons learned). Update after significant events.\nmemory/YYYY-MM-DD.md — Daily logs. Raw notes of what happened each day.\nreference/*.md — Institutional facts (people, repos, infrastructure, business rules). The agent's encyclopedia.\nIndexing (after editing any memory file)\nvector_memory/venv/bin/python vector_memory/indexer.py\n\n\nThe indexer parses MEMORY.md, reference/.md, and memory/.md into vector embeddings and rebuilds the knowledge graph. Run after every edit to keep layers in sync.\n\nSearching\nvector_memory/venv/bin/python vector_memory/search.py \"your query\"\n\n\nReturns top-3 semantically similar chunks with source file and section.\n\nSync Status Check\nvector_memory/venv/bin/python vector_memory/auto_retrieve.py --status\n\n\nReports sync health: MEMORY.md hash vs indexed state, chunk count, graph size. Use in heartbeats to detect drift.\n\nAgent Behavior Rules\n\nAdd these to AGENTS.md or SOUL.md:\n\nPre-Response (mandatory)\n\nBefore answering questions about prior work, decisions, dates, people, or preferences — search memory first. Use memory_search or run auto_retrieve.py with the query. Never say \"I don't remember\" without checking.\n\nCRITICAL: OpenClaw's built-in memory search should now automatically find directive files (SOUL.md, AGENTS.md) if configure_openclaw.py was run. If memory searches are not finding agent rules or workspace directives, the OpenClaw integration is missing or broken.\n\nPre-Action (mandatory)\n\nBefore executing any action that references an external identifier (URL, handle, email, repo name, address) — query reference/ files for the exact value. If not found, query vector memory. If still not found, ask the user. Never fabricate identifiers.\n\nPost-Edit (mandatory)\n\nAfter editing MEMORY.md or any file in reference/ or memory/ — re-index:\n\nvector_memory/venv/bin/python vector_memory/indexer.py\n\nHeartbeat Integration\n\nAdd to HEARTBEAT.md:\n\n## Memory Sync Check\nRun `vector_memory/venv/bin/python vector_memory/auto_retrieve.py --status` and if status is OUT_OF_SYNC, re-index with `vector_memory/venv/bin/python vector_memory/indexer.py`.\n\nReference Directory (Optional but Recommended)\n\nCreate reference/ in the workspace root as the agent's institutional knowledge base:\n\nreference/\n├── people.md          — Contacts, roles, communication details\n├── repos.md           — GitHub repositories, URLs, status\n├── infrastructure.md  — Hosts, IPs, ports, services\n├── business.md        — Company info, strategies, rules\n└── properties.md      — Domain-specific entities (deals, products, etc.)\n\n\nThese files are vector-indexed alongside MEMORY.md. The agent queries them before any action involving external identifiers. Facts accumulate over time — the agent that never forgets.\n\nFile Structure After Setup\nworkspace/\n├── MEMORY.md              — Curated long-term memory (L1)\n├── memory/\n│   ├── 2026-02-17.md      — Daily log\n│   └── heartbeat-state.json — Sync tracking\n├── reference/             — Institutional knowledge (optional)\n│   ├── people.md\n│   └── ...\n└── vector_memory/\n    ├── indexer.py          — Index all markdown into vectors + graph\n    ├── search.py           — Semantic search CLI\n    ├── graph.py            — NetworkX knowledge graph\n    ├── auto_retrieve.py    — Status checker + auto-retrieval\n    ├── chroma_db/          — Vector database (gitignored)\n    ├── memory_graph.json   — Knowledge graph (auto-generated)\n    └── venv/               — Python venv (gitignored)\n\nTroubleshooting\n\"No module named chromadb\" — Run setup.sh again or activate the venv: source vector_memory/venv/bin/activate\nOUT_OF_SYNC status — Run the indexer: vector_memory/venv/bin/python vector_memory/indexer.py\nEmpty search results — Check that MEMORY.md has content and the indexer has been run at least once\nSIGSEGV on indexing — Usually caused by incompatible ML libs. The setup script pins known-good versions.\nAgent ignoring SOUL.md/AGENTS.md directives — OpenClaw integration missing. Run python skills/persistent-memory/scripts/configure_openclaw.py to fix.\nMemory searches not finding workspace files — Check OpenClaw configuration: openclaw config get | grep memorySearch\n\"Configuration verification failed\" — Restart OpenClaw manually: openclaw gateway restart"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/Jakebot-ops/persistent-memory",
    "publisherUrl": "https://clawhub.ai/Jakebot-ops/persistent-memory",
    "owner": "Jakebot-ops",
    "version": "3.0.0",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/persistent-memory",
    "downloadUrl": "https://openagent3.xyz/downloads/persistent-memory",
    "agentUrl": "https://openagent3.xyz/skills/persistent-memory/agent",
    "manifestUrl": "https://openagent3.xyz/skills/persistent-memory/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/persistent-memory/agent.md"
  }
}