{
  "schemaVersion": "1.0",
  "item": {
    "slug": "enhanced-memory",
    "name": "Enhanced Memory",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/JamesEBall/enhanced-memory",
    "canonicalUrl": "https://clawhub.ai/JamesEBall/enhanced-memory",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/enhanced-memory",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=enhanced-memory",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "SKILL.md",
      "scripts/crossref_memories.py",
      "scripts/embed_memories.py",
      "scripts/memory_salience.py",
      "scripts/search_memory.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",
      "slug": "enhanced-memory",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-05-02T22:03:31.540Z",
      "expiresAt": "2026-05-09T22:03:31.540Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=enhanced-memory",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=enhanced-memory",
        "contentDisposition": "attachment; filename=\"enhanced-memory-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null,
        "slug": "enhanced-memory"
      },
      "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/enhanced-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/enhanced-memory",
    "agentPageUrl": "https://openagent3.xyz/skills/enhanced-memory/agent",
    "manifestUrl": "https://openagent3.xyz/skills/enhanced-memory/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/enhanced-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": "Enhanced Memory",
        "body": "Drop-in enhancement for OpenClaw's memory system. Replaces flat vector search with a 4-signal hybrid retrieval pipeline that achieved 0.782 MRR (vs ~0.45 baseline vector-only)."
      },
      {
        "title": "Setup",
        "body": "# Install Ollama and pull the embedding model\nollama pull nomic-embed-text\n\n# Index your memory files (run from workspace root)\npython3 skills/enhanced-memory/scripts/embed_memories.py\n\n# Optional: build cross-reference graph\npython3 skills/enhanced-memory/scripts/crossref_memories.py build\n\nRe-run embed_memories.py whenever memory files change significantly."
      },
      {
        "title": "scripts/search_memory.py — Primary Search",
        "body": "Hybrid 4-signal retrieval with automatic adaptation:\n\npython3 skills/enhanced-memory/scripts/search_memory.py \"query\" [top_n]\n\nSignals fused:\n\nVector similarity (0.4) — cosine similarity via nomic-embed-text embeddings\nKeyword matching (0.25) — query term overlap with chunk text\nHeader matching (0.1) — query terms in section headers\nFilepath scoring (0.25) — query terms matching file/directory names\n\nAutomatic behaviors:\n\nTemporal routing — date references (\"yesterday\", \"Feb 8\", \"last Monday\") get 3x boost on matching files\nAdaptive weighting — when keyword overlap is low, shifts to 85% vector weight\nPseudo-relevance feedback (PRF) — when top score < 0.45, expands query with terms from initial results and re-scores"
      },
      {
        "title": "scripts/enhanced_memory_search.py — JSON-Compatible Search",
        "body": "Same pipeline with JSON output format compatible with OpenClaw's memory_search tool:\n\npython3 skills/enhanced-memory/scripts/enhanced_memory_search.py --json \"query\"\n\nReturns {results: [{path, startLine, endLine, score, snippet, header}], ...}."
      },
      {
        "title": "scripts/embed_memories.py — Indexing",
        "body": "Chunks all .md files in memory/ plus core workspace files (MEMORY.md, AGENTS.md, etc.) by markdown headers and embeds them:\n\npython3 skills/enhanced-memory/scripts/embed_memories.py\n\nOutputs memory/vectors.json. Batches embeddings in groups of 20, truncates chunks to 2000 chars."
      },
      {
        "title": "scripts/memory_salience.py — Salience Scoring",
        "body": "Surfaces stale/important memory items for heartbeat self-prompting:\n\npython3 skills/enhanced-memory/scripts/memory_salience.py          # Human-readable prompts\npython3 skills/enhanced-memory/scripts/memory_salience.py --json   # Programmatic output\npython3 skills/enhanced-memory/scripts/memory_salience.py --top 5  # More items\n\nScores importance × staleness considering: file type (topic > core > daily), size, access frequency, and query gap correlation."
      },
      {
        "title": "scripts/crossref_memories.py — Knowledge Graph",
        "body": "Builds cross-reference links between memory chunks using embedding similarity:\n\npython3 skills/enhanced-memory/scripts/crossref_memories.py build          # Build index\npython3 skills/enhanced-memory/scripts/crossref_memories.py show <file>    # Show refs for file\npython3 skills/enhanced-memory/scripts/crossref_memories.py graph          # Graph statistics\n\nUses file-representative approach (top 5 chunks per file) to reduce O(n²) to manageable comparisons. Threshold: 0.75 cosine similarity."
      },
      {
        "title": "Configuration",
        "body": "All tunable constants are at the top of each script. Key parameters:\n\nParameterDefaultScriptPurposeVECTOR_WEIGHT0.4search_memory.pyWeight for vector similarityKEYWORD_WEIGHT0.25search_memory.pyWeight for keyword overlapFILEPATH_WEIGHT0.25search_memory.pyWeight for filepath matchingTEMPORAL_BOOST3.0search_memory.pyMultiplier for date-matching filesPRF_THRESHOLD0.45search_memory.pyScore below which PRF activatesSIMILARITY_THRESHOLD0.75crossref_memories.pyMin similarity for cross-ref linksMODELnomic-embed-textallOllama embedding model\n\nTo use a different embedding model (e.g., mxbai-embed-large), change MODEL in each script and re-run embed_memories.py."
      },
      {
        "title": "Integration",
        "body": "To replace the default memory search, point your agent's search tool at these scripts. The scripts expect:\n\nmemory/ directory relative to workspace root containing .md files\nmemory/vectors.json (created by embed_memories.py)\nOllama running locally on port 11434\n\nAll scripts use only Python stdlib + Ollama HTTP API. No pip dependencies."
      }
    ],
    "body": "Enhanced Memory\n\nDrop-in enhancement for OpenClaw's memory system. Replaces flat vector search with a 4-signal hybrid retrieval pipeline that achieved 0.782 MRR (vs ~0.45 baseline vector-only).\n\nSetup\n# Install Ollama and pull the embedding model\nollama pull nomic-embed-text\n\n# Index your memory files (run from workspace root)\npython3 skills/enhanced-memory/scripts/embed_memories.py\n\n# Optional: build cross-reference graph\npython3 skills/enhanced-memory/scripts/crossref_memories.py build\n\n\nRe-run embed_memories.py whenever memory files change significantly.\n\nScripts\nscripts/search_memory.py — Primary Search\n\nHybrid 4-signal retrieval with automatic adaptation:\n\npython3 skills/enhanced-memory/scripts/search_memory.py \"query\" [top_n]\n\n\nSignals fused:\n\nVector similarity (0.4) — cosine similarity via nomic-embed-text embeddings\nKeyword matching (0.25) — query term overlap with chunk text\nHeader matching (0.1) — query terms in section headers\nFilepath scoring (0.25) — query terms matching file/directory names\n\nAutomatic behaviors:\n\nTemporal routing — date references (\"yesterday\", \"Feb 8\", \"last Monday\") get 3x boost on matching files\nAdaptive weighting — when keyword overlap is low, shifts to 85% vector weight\nPseudo-relevance feedback (PRF) — when top score < 0.45, expands query with terms from initial results and re-scores\nscripts/enhanced_memory_search.py — JSON-Compatible Search\n\nSame pipeline with JSON output format compatible with OpenClaw's memory_search tool:\n\npython3 skills/enhanced-memory/scripts/enhanced_memory_search.py --json \"query\"\n\n\nReturns {results: [{path, startLine, endLine, score, snippet, header}], ...}.\n\nscripts/embed_memories.py — Indexing\n\nChunks all .md files in memory/ plus core workspace files (MEMORY.md, AGENTS.md, etc.) by markdown headers and embeds them:\n\npython3 skills/enhanced-memory/scripts/embed_memories.py\n\n\nOutputs memory/vectors.json. Batches embeddings in groups of 20, truncates chunks to 2000 chars.\n\nscripts/memory_salience.py — Salience Scoring\n\nSurfaces stale/important memory items for heartbeat self-prompting:\n\npython3 skills/enhanced-memory/scripts/memory_salience.py          # Human-readable prompts\npython3 skills/enhanced-memory/scripts/memory_salience.py --json   # Programmatic output\npython3 skills/enhanced-memory/scripts/memory_salience.py --top 5  # More items\n\n\nScores importance × staleness considering: file type (topic > core > daily), size, access frequency, and query gap correlation.\n\nscripts/crossref_memories.py — Knowledge Graph\n\nBuilds cross-reference links between memory chunks using embedding similarity:\n\npython3 skills/enhanced-memory/scripts/crossref_memories.py build          # Build index\npython3 skills/enhanced-memory/scripts/crossref_memories.py show <file>    # Show refs for file\npython3 skills/enhanced-memory/scripts/crossref_memories.py graph          # Graph statistics\n\n\nUses file-representative approach (top 5 chunks per file) to reduce O(n²) to manageable comparisons. Threshold: 0.75 cosine similarity.\n\nConfiguration\n\nAll tunable constants are at the top of each script. Key parameters:\n\nParameter\tDefault\tScript\tPurpose\nVECTOR_WEIGHT\t0.4\tsearch_memory.py\tWeight for vector similarity\nKEYWORD_WEIGHT\t0.25\tsearch_memory.py\tWeight for keyword overlap\nFILEPATH_WEIGHT\t0.25\tsearch_memory.py\tWeight for filepath matching\nTEMPORAL_BOOST\t3.0\tsearch_memory.py\tMultiplier for date-matching files\nPRF_THRESHOLD\t0.45\tsearch_memory.py\tScore below which PRF activates\nSIMILARITY_THRESHOLD\t0.75\tcrossref_memories.py\tMin similarity for cross-ref links\nMODEL\tnomic-embed-text\tall\tOllama embedding model\n\nTo use a different embedding model (e.g., mxbai-embed-large), change MODEL in each script and re-run embed_memories.py.\n\nIntegration\n\nTo replace the default memory search, point your agent's search tool at these scripts. The scripts expect:\n\nmemory/ directory relative to workspace root containing .md files\nmemory/vectors.json (created by embed_memories.py)\nOllama running locally on port 11434\n\nAll scripts use only Python stdlib + Ollama HTTP API. No pip dependencies."
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/JamesEBall/enhanced-memory",
    "publisherUrl": "https://clawhub.ai/JamesEBall/enhanced-memory",
    "owner": "JamesEBall",
    "version": "1.0.0",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/enhanced-memory",
    "downloadUrl": "https://openagent3.xyz/downloads/enhanced-memory",
    "agentUrl": "https://openagent3.xyz/skills/enhanced-memory/agent",
    "manifestUrl": "https://openagent3.xyz/skills/enhanced-memory/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/enhanced-memory/agent.md"
  }
}