{
  "schemaVersion": "1.0",
  "item": {
    "slug": "hurttlocker-cortex",
    "name": "Cortex",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/hurttlocker/hurttlocker-cortex",
    "canonicalUrl": "https://clawhub.ai/hurttlocker/hurttlocker-cortex",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/hurttlocker-cortex",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=hurttlocker-cortex",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "SKILL.md",
      "scripts/cortex-wrapper.sh",
      "scripts/setup.sh"
    ],
    "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/hurttlocker-cortex"
    },
    "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/hurttlocker-cortex",
    "agentPageUrl": "https://openagent3.xyz/skills/hurttlocker-cortex/agent",
    "manifestUrl": "https://openagent3.xyz/skills/hurttlocker-cortex/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/hurttlocker-cortex/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": "Cortex — Local-First Agent Memory",
        "body": "The memory layer OpenClaw should have built in.\n\nCortex is an open-source, import-first memory system for AI agents. Single Go binary, SQLite storage, zero cloud dependencies. It solves the #1 complaint about OpenClaw: agents forget everything after compaction.\n\nGitHub: https://github.com/hurttlocker/cortex\nInstall: brew install hurttlocker/cortex/cortex or download from Releases"
      },
      {
        "title": "Why Cortex?",
        "body": "OpenClaw's default memory is Markdown files. When context fills up, compaction summarizes and destroys specifics. Cortex fixes this:\n\nProblemCortex SolutionCompaction loses detailsPersistent SQLite DB survives any sessionNo search — just dump files into contextHybrid BM25 + semantic search (~16ms keyword, ~52ms semantic)Everything has equal weightEbbinghaus decay — important facts stay, noise fades naturallyCan't import existing filesImport-first: Markdown, text, any file. 8 connectors (GitHub, Gmail, Calendar, Drive, Slack, Notion, Discord, Telegram)Multi-agent memory leaksPer-agent scoping built inExpensive cloud memory services$0/month. Forever. Local SQLite."
      },
      {
        "title": "1. Install Cortex",
        "body": "# macOS/Linux (Homebrew)\nbrew install hurttlocker/cortex/cortex\n\n# Or download binary directly\n# https://github.com/hurttlocker/cortex/releases/latest"
      },
      {
        "title": "2. Import Your Memory",
        "body": "# Import OpenClaw's memory files\ncortex import ~/clawd/memory/ --extract\n\n# Import specific files\ncortex import ~/clawd/MEMORY.md --extract\ncortex import ~/clawd/USER.md --extract"
      },
      {
        "title": "3. Search",
        "body": "# Fast keyword search\ncortex search \"wedding venue\" --limit 5\n\n# Semantic search (requires ollama with nomic-embed-text)\ncortex search \"what decisions did I make about the project\" --mode semantic\n\n# Hybrid (recommended)\ncortex search \"trading strategy\" --mode hybrid"
      },
      {
        "title": "4. Use as MCP Server (recommended for OpenClaw)",
        "body": "# Add to your MCP config — Cortex exposes 17 tools + 4 resources\ncortex mcp              # stdio mode\ncortex mcp --port 8080  # HTTP+SSE mode"
      },
      {
        "title": "Ebbinghaus Forgetting Curve",
        "body": "Facts decay at different rates based on type. Identity facts (names, roles) last ~2 years. Temporal facts (events, dates) fade in ~1 week. State facts (status, mood) fade in ~2 weeks. This means search results naturally prioritize what matters — without manual curation."
      },
      {
        "title": "Hybrid Search",
        "body": "BM25 — instant keyword matching via SQLite FTS5 (~16ms)\nSemantic — meaning-based via local embeddings (~52ms)\nHybrid — combines both with reciprocal rank fusion"
      },
      {
        "title": "Fact Extraction",
        "body": "Every imported file gets facts extracted automatically:\n\nRule-based extraction (zero cost, instant)\nOptional LLM enrichment (Grok, Gemini, or any provider — finds facts rules miss)\nAuto-classification into 9 types: identity, relationship, preference, decision, temporal, location, state, config, kv"
      },
      {
        "title": "Connectors (Beta)",
        "body": "Pull memory from external sources:\n\ncortex connect sync --provider github --extract\ncortex connect sync --provider gmail --extract\ncortex connect sync --all --extract"
      },
      {
        "title": "Knowledge Graph",
        "body": "Explore your memory visually:\n\ncortex graph --serve --port 8090\n# Opens interactive 2D graph explorer in browser"
      },
      {
        "title": "Self-Cleaning",
        "body": "cortex cleanup --purge-noise  # Remove garbage + duplicates\ncortex stale 30               # Find facts not accessed in 30 days\ncortex conflicts               # Detect contradictions\ncortex conflicts --resolve llm # Auto-resolve with LLM"
      },
      {
        "title": "Recommended Search Chain",
        "body": "memory_search → Cortex → QMD → ripgrep → web search\n\nUse OpenClaw's built-in memory_search for conversation history, then Cortex for deep knowledge retrieval."
      },
      {
        "title": "Wrapper Script",
        "body": "The included scripts/cortex.sh provides shortcuts:\n\nscripts/cortex.sh search \"query\" 5       # Hybrid search\nscripts/cortex.sh stats                    # Memory health\nscripts/cortex.sh stale 30                # Stale fact detection\nscripts/cortex.sh conflicts               # Contradiction detection\nscripts/cortex.sh sync                    # Incremental import\nscripts/cortex.sh reimport                # Full wipe + re-import\nscripts/cortex.sh compaction              # Pre-compaction state brief"
      },
      {
        "title": "Automated Sync (launchd/systemd)",
        "body": "# Auto-import sessions + sync connectors every 30 min\ncortex connect schedule --every 30m --install"
      },
      {
        "title": "Architecture",
        "body": "Language: Go (62,300+ lines, 1,081 tests)\nStorage: SQLite + FTS5 + WAL mode\nBinary: 19MB, pure Go, zero CGO, zero runtime dependencies\nPlatforms: macOS (arm64/amd64), Linux (arm64/amd64), Windows (amd64)\nMCP: 17 tools + 4 resources (stdio or HTTP+SSE)\nEmbeddings: Local via Ollama (nomic-embed-text), or OpenAI/DeepSeek/custom\nLLM: Optional enrichment via any provider (Grok, Gemini, DeepSeek, OpenRouter)\nScale: Tested to 100K+ memories. At ~20-50/day, won't hit ceiling for 5+ years.\nLicense: MIT"
      },
      {
        "title": "vs Other Memory Tools",
        "body": "CortexMem0ZepLangMemDeploySingle binaryCloud or K8sCloudPython libCost$0$19-249/mo$25/mo+Infra costsPrivacy100% localCloud by defaultCloudDependsDecayEbbinghaus (7 rates)TTL onlyTemporalNoneImportFiles + 8 connectorsChat extractionChat/docsChat extractionSearchBM25 + semanticVector + graphTemporal KGJSON docsMCP17 tools nativeNoNoNoDependenciesZeroPython + cloudCloud + creditsPython + LangGraph"
      },
      {
        "title": "Requirements",
        "body": "Cortex binary — install via Homebrew or download from GitHub Releases\nOptional: Ollama with nomic-embed-text for semantic search\nOptional: LLM API key for enrichment (Grok, Gemini, etc.)\nNo Python. No Node. No Docker. No cloud account. Just the binary."
      },
      {
        "title": "When to use cortex answer vs cortex search",
        "body": "answer — \"What do I know about X?\" / \"Who is Y?\" / synthesis questions → single coherent response with citations\nsearch — \"Find the file where X is mentioned\" / debugging / exploring what exists → ranked result list"
      },
      {
        "title": "Source Boost (config.yaml)",
        "body": "Add to ~/.cortex/config.yaml:\n\nsearch:\n  source_boost:\n    - prefix: \"memory/\"\n      weight: 1.5\n    - prefix: \"file:MEMORY\"\n      weight: 1.6\n    - prefix: \"github\"\n      weight: 1.3\n    - prefix: \"session:\"\n      weight: 0.9\n\nHigher weight = more trusted. Daily notes and core files rank above auto-imported sessions."
      },
      {
        "title": "Search Intent",
        "body": "Use --intent when you know where the answer lives:\n\n--intent memory — personal decisions, preferences, people\n--intent connector — code, PRs, emails, external data\n--intent import — imported files and documents\nNo flag = search everything (default, good for discovery)"
      },
      {
        "title": "Lifecycle Runner Schedule",
        "body": "# Nightly dry-run + apply (launchd or cron)\ncortex lifecycle run --dry-run > /tmp/lifecycle-plan.log 2>&1\n# If anything found, apply:\ncortex lifecycle run\n\nRecommended: 3:30 AM daily. First week: dry-run only, review logs."
      },
      {
        "title": "Policy Presets",
        "body": "Fresh agent (< 500 facts):\n\npolicies:\n  reinforce_promote:\n    min_reinforcements: 3\n    min_sources: 2\n  decay_retire:\n    inactive_days: 90\n    confidence_below: 0.25\n  conflict_supersede:\n    min_confidence_delta: 0.20\n\nMature agent (2000+ facts):\n\npolicies:\n  reinforce_promote:\n    min_reinforcements: 5\n    min_sources: 3\n  decay_retire:\n    inactive_days: 45\n    confidence_below: 0.35\n  conflict_supersede:\n    min_confidence_delta: 0.10"
      },
      {
        "title": "Post-Import Hygiene",
        "body": "After any bulk import, run:\n\ncortex cleanup --dedup-facts    # Remove near-duplicates\ncortex conflicts --auto-resolve  # Resolve contradictions"
      },
      {
        "title": "Recommended OpenClaw Search Chain (Updated)",
        "body": "memory_search → cortex answer (synthesis) → cortex search (pointers) → QMD → ripgrep → web"
      }
    ],
    "body": "Cortex — Local-First Agent Memory\n\nThe memory layer OpenClaw should have built in.\n\nCortex is an open-source, import-first memory system for AI agents. Single Go binary, SQLite storage, zero cloud dependencies. It solves the #1 complaint about OpenClaw: agents forget everything after compaction.\n\nGitHub: https://github.com/hurttlocker/cortex Install: brew install hurttlocker/cortex/cortex or download from Releases\n\nWhy Cortex?\n\nOpenClaw's default memory is Markdown files. When context fills up, compaction summarizes and destroys specifics. Cortex fixes this:\n\nProblem\tCortex Solution\nCompaction loses details\tPersistent SQLite DB survives any session\nNo search — just dump files into context\tHybrid BM25 + semantic search (~16ms keyword, ~52ms semantic)\nEverything has equal weight\tEbbinghaus decay — important facts stay, noise fades naturally\nCan't import existing files\tImport-first: Markdown, text, any file. 8 connectors (GitHub, Gmail, Calendar, Drive, Slack, Notion, Discord, Telegram)\nMulti-agent memory leaks\tPer-agent scoping built in\nExpensive cloud memory services\t$0/month. Forever. Local SQLite.\nQuick Start\n1. Install Cortex\n# macOS/Linux (Homebrew)\nbrew install hurttlocker/cortex/cortex\n\n# Or download binary directly\n# https://github.com/hurttlocker/cortex/releases/latest\n\n2. Import Your Memory\n# Import OpenClaw's memory files\ncortex import ~/clawd/memory/ --extract\n\n# Import specific files\ncortex import ~/clawd/MEMORY.md --extract\ncortex import ~/clawd/USER.md --extract\n\n3. Search\n# Fast keyword search\ncortex search \"wedding venue\" --limit 5\n\n# Semantic search (requires ollama with nomic-embed-text)\ncortex search \"what decisions did I make about the project\" --mode semantic\n\n# Hybrid (recommended)\ncortex search \"trading strategy\" --mode hybrid\n\n4. Use as MCP Server (recommended for OpenClaw)\n# Add to your MCP config — Cortex exposes 17 tools + 4 resources\ncortex mcp              # stdio mode\ncortex mcp --port 8080  # HTTP+SSE mode\n\nKey Features\nEbbinghaus Forgetting Curve\n\nFacts decay at different rates based on type. Identity facts (names, roles) last ~2 years. Temporal facts (events, dates) fade in ~1 week. State facts (status, mood) fade in ~2 weeks. This means search results naturally prioritize what matters — without manual curation.\n\nHybrid Search\nBM25 — instant keyword matching via SQLite FTS5 (~16ms)\nSemantic — meaning-based via local embeddings (~52ms)\nHybrid — combines both with reciprocal rank fusion\nFact Extraction\n\nEvery imported file gets facts extracted automatically:\n\nRule-based extraction (zero cost, instant)\nOptional LLM enrichment (Grok, Gemini, or any provider — finds facts rules miss)\nAuto-classification into 9 types: identity, relationship, preference, decision, temporal, location, state, config, kv\nConnectors (Beta)\n\nPull memory from external sources:\n\ncortex connect sync --provider github --extract\ncortex connect sync --provider gmail --extract\ncortex connect sync --all --extract\n\nKnowledge Graph\n\nExplore your memory visually:\n\ncortex graph --serve --port 8090\n# Opens interactive 2D graph explorer in browser\n\nSelf-Cleaning\ncortex cleanup --purge-noise  # Remove garbage + duplicates\ncortex stale 30               # Find facts not accessed in 30 days\ncortex conflicts               # Detect contradictions\ncortex conflicts --resolve llm # Auto-resolve with LLM\n\nIntegration with OpenClaw\nRecommended Search Chain\nmemory_search → Cortex → QMD → ripgrep → web search\n\n\nUse OpenClaw's built-in memory_search for conversation history, then Cortex for deep knowledge retrieval.\n\nWrapper Script\n\nThe included scripts/cortex.sh provides shortcuts:\n\nscripts/cortex.sh search \"query\" 5       # Hybrid search\nscripts/cortex.sh stats                    # Memory health\nscripts/cortex.sh stale 30                # Stale fact detection\nscripts/cortex.sh conflicts               # Contradiction detection\nscripts/cortex.sh sync                    # Incremental import\nscripts/cortex.sh reimport                # Full wipe + re-import\nscripts/cortex.sh compaction              # Pre-compaction state brief\n\nAutomated Sync (launchd/systemd)\n# Auto-import sessions + sync connectors every 30 min\ncortex connect schedule --every 30m --install\n\nArchitecture\nLanguage: Go (62,300+ lines, 1,081 tests)\nStorage: SQLite + FTS5 + WAL mode\nBinary: 19MB, pure Go, zero CGO, zero runtime dependencies\nPlatforms: macOS (arm64/amd64), Linux (arm64/amd64), Windows (amd64)\nMCP: 17 tools + 4 resources (stdio or HTTP+SSE)\nEmbeddings: Local via Ollama (nomic-embed-text), or OpenAI/DeepSeek/custom\nLLM: Optional enrichment via any provider (Grok, Gemini, DeepSeek, OpenRouter)\nScale: Tested to 100K+ memories. At ~20-50/day, won't hit ceiling for 5+ years.\nLicense: MIT\nvs Other Memory Tools\n\tCortex\tMem0\tZep\tLangMem\nDeploy\tSingle binary\tCloud or K8s\tCloud\tPython lib\nCost\t$0\t$19-249/mo\t$25/mo+\tInfra costs\nPrivacy\t100% local\tCloud by default\tCloud\tDepends\nDecay\tEbbinghaus (7 rates)\tTTL only\tTemporal\tNone\nImport\tFiles + 8 connectors\tChat extraction\tChat/docs\tChat extraction\nSearch\tBM25 + semantic\tVector + graph\tTemporal KG\tJSON docs\nMCP\t17 tools native\tNo\tNo\tNo\nDependencies\tZero\tPython + cloud\tCloud + credits\tPython + LangGraph\nRequirements\nCortex binary — install via Homebrew or download from GitHub Releases\nOptional: Ollama with nomic-embed-text for semantic search\nOptional: LLM API key for enrichment (Grok, Gemini, etc.)\nNo Python. No Node. No Docker. No cloud account. Just the binary.\nv1.1/v1.2 Integration Guide (Wiring for OpenClaw Agents)\nWhen to use cortex answer vs cortex search\nanswer — \"What do I know about X?\" / \"Who is Y?\" / synthesis questions → single coherent response with citations\nsearch — \"Find the file where X is mentioned\" / debugging / exploring what exists → ranked result list\nSource Boost (config.yaml)\n\nAdd to ~/.cortex/config.yaml:\n\nsearch:\n  source_boost:\n    - prefix: \"memory/\"\n      weight: 1.5\n    - prefix: \"file:MEMORY\"\n      weight: 1.6\n    - prefix: \"github\"\n      weight: 1.3\n    - prefix: \"session:\"\n      weight: 0.9\n\n\nHigher weight = more trusted. Daily notes and core files rank above auto-imported sessions.\n\nSearch Intent\n\nUse --intent when you know where the answer lives:\n\n--intent memory — personal decisions, preferences, people\n--intent connector — code, PRs, emails, external data\n--intent import — imported files and documents\nNo flag = search everything (default, good for discovery)\nLifecycle Runner Schedule\n# Nightly dry-run + apply (launchd or cron)\ncortex lifecycle run --dry-run > /tmp/lifecycle-plan.log 2>&1\n# If anything found, apply:\ncortex lifecycle run\n\n\nRecommended: 3:30 AM daily. First week: dry-run only, review logs.\n\nPolicy Presets\n\nFresh agent (< 500 facts):\n\npolicies:\n  reinforce_promote:\n    min_reinforcements: 3\n    min_sources: 2\n  decay_retire:\n    inactive_days: 90\n    confidence_below: 0.25\n  conflict_supersede:\n    min_confidence_delta: 0.20\n\n\nMature agent (2000+ facts):\n\npolicies:\n  reinforce_promote:\n    min_reinforcements: 5\n    min_sources: 3\n  decay_retire:\n    inactive_days: 45\n    confidence_below: 0.35\n  conflict_supersede:\n    min_confidence_delta: 0.10\n\nPost-Import Hygiene\n\nAfter any bulk import, run:\n\ncortex cleanup --dedup-facts    # Remove near-duplicates\ncortex conflicts --auto-resolve  # Resolve contradictions\n\nRecommended OpenClaw Search Chain (Updated)\nmemory_search → cortex answer (synthesis) → cortex search (pointers) → QMD → ripgrep → web"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/hurttlocker/hurttlocker-cortex",
    "publisherUrl": "https://clawhub.ai/hurttlocker/hurttlocker-cortex",
    "owner": "hurttlocker",
    "version": "4.0.0",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/hurttlocker-cortex",
    "downloadUrl": "https://openagent3.xyz/downloads/hurttlocker-cortex",
    "agentUrl": "https://openagent3.xyz/skills/hurttlocker-cortex/agent",
    "manifestUrl": "https://openagent3.xyz/skills/hurttlocker-cortex/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/hurttlocker-cortex/agent.md"
  }
}