{
  "schemaVersion": "1.0",
  "item": {
    "slug": "openclaw-langcache",
    "name": "Langcache Semantic Caching for OpenClaw",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/manvinder01/openclaw-langcache",
    "canonicalUrl": "https://clawhub.ai/manvinder01/openclaw-langcache",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/openclaw-langcache",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=openclaw-langcache",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "SKILL.md",
      "scripts/langcache.sh",
      "examples/basic-caching.sh",
      "examples/agent-integration.py",
      "references/best-practices.md",
      "references/api-reference.md"
    ],
    "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/openclaw-langcache"
    },
    "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/openclaw-langcache",
    "agentPageUrl": "https://openagent3.xyz/skills/openclaw-langcache/agent",
    "manifestUrl": "https://openagent3.xyz/skills/openclaw-langcache/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/openclaw-langcache/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": "Redis LangCache Semantic Caching",
        "body": "This skill integrates Redis LangCache, a fully-managed semantic caching service, into OpenClaw workflows. LangCache stores LLM prompts and responses, returning cached results for semantically similar queries to reduce costs and latency."
      },
      {
        "title": "Prerequisites",
        "body": "Before using LangCache, ensure the following environment variables are configured:\n\nLANGCACHE_HOST=<your-langcache-host>\nLANGCACHE_CACHE_ID=<your-cache-id>\nLANGCACHE_API_KEY=<your-api-key>\n\nStore these in ~/.openclaw/secrets.env or configure them in the OpenClaw settings."
      },
      {
        "title": "Search for Cached Response",
        "body": "Before calling an LLM, check if a semantically similar response exists:\n\n./scripts/langcache.sh search \"What is semantic caching?\"\n\nWith similarity threshold (0.0-1.0, higher = stricter match):\n\n./scripts/langcache.sh search \"What is semantic caching?\" --threshold 0.95\n\nWith attribute filtering:\n\n./scripts/langcache.sh search \"What is semantic caching?\" --attr \"model=gpt-5\""
      },
      {
        "title": "Store New Response",
        "body": "After receiving an LLM response, cache it for future use:\n\n./scripts/langcache.sh store \"What is semantic caching?\" \"Semantic caching stores responses based on meaning similarity...\"\n\nWith attributes for filtering/organization:\n\n./scripts/langcache.sh store \"prompt\" \"response\" --attr \"model=gpt-5\" --attr \"user_id=123\""
      },
      {
        "title": "Delete Cached Entries",
        "body": "By entry ID:\n\n./scripts/langcache.sh delete --id \"<entry-id>\"\n\nBy attributes:\n\n./scripts/langcache.sh delete --attr \"user_id=123\""
      },
      {
        "title": "Flush Cache",
        "body": "Clear all entries (use with caution):\n\n./scripts/langcache.sh flush"
      },
      {
        "title": "Integration Pattern",
        "body": "The recommended pattern for integrating LangCache into agent workflows:\n\n1. Receive user prompt\n2. Search LangCache for similar cached response\n3. If cache hit (similarity >= threshold):\n   - Return cached response immediately\n   - Log cache hit for observability\n4. If cache miss:\n   - Call LLM API\n   - Store prompt + response in LangCache\n   - Return LLM response"
      },
      {
        "title": "Default Caching Policy",
        "body": "This policy is enforced automatically. All cache operations MUST respect these rules."
      },
      {
        "title": "CACHEABLE (white-list)",
        "body": "CategoryExamplesThresholdFactual Q&A\"What is X?\", \"How does Y work?\"0.90Definitions / docs / help textAPI docs, command help, explanations0.90Command explanations\"What does git rebase do?\"0.92Reusable reply templates\"polite no\", \"follow-up\", \"scheduling\", \"intro\"0.88Style transforms\"make this warmer/shorter/firmer\"0.85Generic communication scriptsnegotiation templates, professional responses0.88"
      },
      {
        "title": "NEVER CACHE (hard blocks)",
        "body": "These patterns are blocked at the code level - cache operations will refuse to store them.\n\nCategoryPatterns to DetectReasonTemporal infotoday, tomorrow, this week, deadline, ETA, \"in X minutes\", appointments, schedulesStale immediatelyCredentialsAPI keys, tokens, passwords, OTP, 2FA codes, secretsSecurity riskIdentifiersphone numbers, emails, addresses, account IDs, order numbers, message IDs, chat IDs, JIDsPrivacy / PIIPersonal contextnames + relationships, private history, \"who said what\", specific conversationsPrivacy / context-dependent"
      },
      {
        "title": "Detection Patterns",
        "body": "The following regex patterns trigger a hard block:\n\n# Temporal\n\\b(today|tomorrow|tonight|yesterday)\\b\n\\b(this|next|last)\\s+(week|month|year|monday|tuesday|...)\\b\n\\b(in\\s+\\d+\\s+(minutes?|hours?|days?))\\b\n\\b(deadline|eta|appointment|schedule[d]?)\\b\n\n# Credentials\n\\b(api[_-]?key|token|password|secret|otp|2fa)\\b\n\\b(bearer|auth[orization]*)\\s+\\S+\n\n# Identifiers\n\\b\\d{10,}\\b                          # phone numbers, long IDs\n\\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+   # emails\n\\b(order|account|message|chat)[_-]?id\\b\n\n# Personal context\n\\b(my\\s+(wife|husband|partner|friend|boss|mom|dad|brother|sister))\\b\n\\b(said\\s+to\\s+me|told\\s+me|between\\s+us)\\b"
      },
      {
        "title": "Attribute Strategies",
        "body": "Use attributes to partition the cache:\n\nmodel: LLM model used (useful when switching models)\ncategory: factual, template, style, command\nskill: Which skill generated the response\nversion: API or prompt version"
      },
      {
        "title": "Search Strategies",
        "body": "LangCache supports two search strategies:\n\nsemantic (default): Vector similarity matching\nexact: Case-insensitive exact match\n\nCombine both for hybrid search:\n\n./scripts/langcache.sh search \"prompt\" --strategy \"exact,semantic\""
      },
      {
        "title": "Observability",
        "body": "Monitor cache performance:\n\nTrack hit/miss ratios\nLog similarity scores for hits\nAlert on high miss rates (may indicate threshold too high)\nReview stored entries periodically for relevance"
      },
      {
        "title": "References",
        "body": "API Reference - Complete REST API documentation\nBest Practices - Optimization techniques"
      },
      {
        "title": "Examples",
        "body": "examples/basic-caching.sh - Simple cache workflow\nexamples/agent-integration.py - Python integration pattern"
      }
    ],
    "body": "Redis LangCache Semantic Caching\n\nThis skill integrates Redis LangCache, a fully-managed semantic caching service, into OpenClaw workflows. LangCache stores LLM prompts and responses, returning cached results for semantically similar queries to reduce costs and latency.\n\nPrerequisites\n\nBefore using LangCache, ensure the following environment variables are configured:\n\nLANGCACHE_HOST=<your-langcache-host>\nLANGCACHE_CACHE_ID=<your-cache-id>\nLANGCACHE_API_KEY=<your-api-key>\n\n\nStore these in ~/.openclaw/secrets.env or configure them in the OpenClaw settings.\n\nCore Operations\nSearch for Cached Response\n\nBefore calling an LLM, check if a semantically similar response exists:\n\n./scripts/langcache.sh search \"What is semantic caching?\"\n\n\nWith similarity threshold (0.0-1.0, higher = stricter match):\n\n./scripts/langcache.sh search \"What is semantic caching?\" --threshold 0.95\n\n\nWith attribute filtering:\n\n./scripts/langcache.sh search \"What is semantic caching?\" --attr \"model=gpt-5\"\n\nStore New Response\n\nAfter receiving an LLM response, cache it for future use:\n\n./scripts/langcache.sh store \"What is semantic caching?\" \"Semantic caching stores responses based on meaning similarity...\"\n\n\nWith attributes for filtering/organization:\n\n./scripts/langcache.sh store \"prompt\" \"response\" --attr \"model=gpt-5\" --attr \"user_id=123\"\n\nDelete Cached Entries\n\nBy entry ID:\n\n./scripts/langcache.sh delete --id \"<entry-id>\"\n\n\nBy attributes:\n\n./scripts/langcache.sh delete --attr \"user_id=123\"\n\nFlush Cache\n\nClear all entries (use with caution):\n\n./scripts/langcache.sh flush\n\nIntegration Pattern\n\nThe recommended pattern for integrating LangCache into agent workflows:\n\n1. Receive user prompt\n2. Search LangCache for similar cached response\n3. If cache hit (similarity >= threshold):\n   - Return cached response immediately\n   - Log cache hit for observability\n4. If cache miss:\n   - Call LLM API\n   - Store prompt + response in LangCache\n   - Return LLM response\n\nDefault Caching Policy\n\nThis policy is enforced automatically. All cache operations MUST respect these rules.\n\nCACHEABLE (white-list)\nCategory\tExamples\tThreshold\nFactual Q&A\t\"What is X?\", \"How does Y work?\"\t0.90\nDefinitions / docs / help text\tAPI docs, command help, explanations\t0.90\nCommand explanations\t\"What does git rebase do?\"\t0.92\nReusable reply templates\t\"polite no\", \"follow-up\", \"scheduling\", \"intro\"\t0.88\nStyle transforms\t\"make this warmer/shorter/firmer\"\t0.85\nGeneric communication scripts\tnegotiation templates, professional responses\t0.88\nNEVER CACHE (hard blocks)\n\nThese patterns are blocked at the code level - cache operations will refuse to store them.\n\nCategory\tPatterns to Detect\tReason\nTemporal info\ttoday, tomorrow, this week, deadline, ETA, \"in X minutes\", appointments, schedules\tStale immediately\nCredentials\tAPI keys, tokens, passwords, OTP, 2FA codes, secrets\tSecurity risk\nIdentifiers\tphone numbers, emails, addresses, account IDs, order numbers, message IDs, chat IDs, JIDs\tPrivacy / PII\nPersonal context\tnames + relationships, private history, \"who said what\", specific conversations\tPrivacy / context-dependent\nDetection Patterns\n\nThe following regex patterns trigger a hard block:\n\n# Temporal\n\\b(today|tomorrow|tonight|yesterday)\\b\n\\b(this|next|last)\\s+(week|month|year|monday|tuesday|...)\\b\n\\b(in\\s+\\d+\\s+(minutes?|hours?|days?))\\b\n\\b(deadline|eta|appointment|schedule[d]?)\\b\n\n# Credentials\n\\b(api[_-]?key|token|password|secret|otp|2fa)\\b\n\\b(bearer|auth[orization]*)\\s+\\S+\n\n# Identifiers\n\\b\\d{10,}\\b                          # phone numbers, long IDs\n\\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+   # emails\n\\b(order|account|message|chat)[_-]?id\\b\n\n# Personal context\n\\b(my\\s+(wife|husband|partner|friend|boss|mom|dad|brother|sister))\\b\n\\b(said\\s+to\\s+me|told\\s+me|between\\s+us)\\b\n\nAttribute Strategies\n\nUse attributes to partition the cache:\n\nmodel: LLM model used (useful when switching models)\ncategory: factual, template, style, command\nskill: Which skill generated the response\nversion: API or prompt version\nSearch Strategies\n\nLangCache supports two search strategies:\n\nsemantic (default): Vector similarity matching\nexact: Case-insensitive exact match\n\nCombine both for hybrid search:\n\n./scripts/langcache.sh search \"prompt\" --strategy \"exact,semantic\"\n\nObservability\n\nMonitor cache performance:\n\nTrack hit/miss ratios\nLog similarity scores for hits\nAlert on high miss rates (may indicate threshold too high)\nReview stored entries periodically for relevance\nReferences\nAPI Reference - Complete REST API documentation\nBest Practices - Optimization techniques\nExamples\nexamples/basic-caching.sh - Simple cache workflow\nexamples/agent-integration.py - Python integration pattern"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/manvinder01/openclaw-langcache",
    "publisherUrl": "https://clawhub.ai/manvinder01/openclaw-langcache",
    "owner": "manvinder01",
    "version": "1.0.0",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/openclaw-langcache",
    "downloadUrl": "https://openagent3.xyz/downloads/openclaw-langcache",
    "agentUrl": "https://openagent3.xyz/skills/openclaw-langcache/agent",
    "manifestUrl": "https://openagent3.xyz/skills/openclaw-langcache/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/openclaw-langcache/agent.md"
  }
}