Token导航 LogoToken导航TokenDH.com
研究检索敏感数据clawhub未标认证来源可访问clear审计提醒

openclaw-langcacheOpenClaw langcache 搜索

Agent Skill

openclaw-langcache 用于查找、检索和筛选相关信息,适合在 OpenClaw 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

52,320

周安装

2,202

GitHub Stars

1

下载量

18,321
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:openclaw-langcache(OpenClaw langcache 搜索)
来源仓库:https://github.com/manvinder01/openclaw-langcache
安装命令:
openclaw skills install openclaw-langcache
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install openclaw-langcache

简介

当用户要求“启用语义缓存”、“缓存 LLM 响应”、“降低 API 成本”、“加速 AI 响应”、“配置 LangCache”、“搜索语义缓存”、“在缓存中存储响应”或提及 Redis LangCache、语义相似性缓存或 LLM 响应缓存时,应使用此技能。提供与 Redis LangCache 托管服务的集成,以实现提示和响应的语义缓存。

SKILL.md

name
langcache
description
This skill should be used when the user asks to "enable semantic caching", "cache LLM responses", "reduce API costs", "speed up AI responses", "configure LangCache", "search the semantic cache", "store responses in cache", or mentions Redis LangCache, semantic similarity caching, or LLM response caching. Provides integration with Redis LangCache managed service for semantic caching of prompts and responses.
version
1.0.0
tools
Read, Bash, WebFetch

Redis LangCache Semantic Caching

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.

Prerequisites

Before using LangCache, ensure the following environment variables are configured:

LANGCACHE_HOST=<your-langcache-host>
LANGCACHE_CACHE_ID=<your-cache-id>
LANGCACHE_API_KEY=<your-api-key>

Store these in ~/.openclaw/secrets.env or configure them in the OpenClaw settings.

Core Operations

Search for Cached Response

Before calling an LLM, check if a semantically similar response exists:

./scripts/langcache.sh search "What is semantic caching?"

With similarity threshold (0.0-1.0, higher = stricter match):

./scripts/langcache.sh search "What is semantic caching?" --threshold 0.95

With attribute filtering:

./scripts/langcache.sh search "What is semantic caching?" --attr "model=gpt-5"

Store New Response

After receiving an LLM response, cache it for future use:

./scripts/langcache.sh store "What is semantic caching?" "Semantic caching stores responses based on meaning similarity..."

With attributes for filtering/organization:

./scripts/langcache.sh store "prompt" "response" --attr "model=gpt-5" --attr "user_id=123"

Delete Cached Entries

By entry ID:

./scripts/langcache.sh delete --id "<entry-id>"

By attributes:

./scripts/langcache.sh delete --attr "user_id=123"

Flush Cache

Clear all entries (use with caution):

./scripts/langcache.sh flush

Integration Pattern

The recommended pattern for integrating LangCache into agent workflows:

1. Receive user prompt
2. Search LangCache for similar cached response
3. If cache hit (similarity >= threshold):
   - Return cached response immediately
   - Log cache hit for observability
4. If cache miss:
   - Call LLM API
   - Store prompt + response in LangCache
   - Return LLM response

Default Caching Policy

This policy is enforced automatically. All cache operations MUST respect these rules.

CACHEABLE (white-list)

CategoryExamplesThreshold
Factual Q&A"What is X?", "How does Y work?"0.90
Definitions / docs / help textAPI docs, command help, explanations0.90
Command explanations"What does git rebase do?"0.92
Reusable reply templates"polite no", "follow-up", "scheduling", "intro"0.88
Style transforms"make this warmer/shorter/firmer"0.85
Generic communication scriptsnegotiation templates, professional responses0.88

NEVER CACHE (hard blocks)

These patterns are blocked at the code level - cache operations will refuse to store them.

CategoryPatterns to DetectReason
Temporal infotoday, tomorrow, this week, deadline, ETA, "in X minutes", appointments, schedulesStale immediately
CredentialsAPI keys, tokens, passwords, OTP, 2FA codes, secretsSecurity risk
Identifiersphone numbers, emails, addresses, account IDs, order numbers, message IDs, chat IDs, JIDsPrivacy / PII
Personal contextnames + relationships, private history, "who said what", specific conversationsPrivacy / context-dependent

Detection Patterns

The following regex patterns trigger a hard block:

# Temporal
\b(today|tomorrow|tonight|yesterday)\b
\b(this|next|last)\s+(week|month|year|monday|tuesday|...)\b
\b(in\s+\d+\s+(minutes?|hours?|days?))\b
\b(deadline|eta|appointment|schedule[d]?)\b

# Credentials
\b(api[_-]?key|token|password|secret|otp|2fa)\b
\b(bearer|auth[orization]*)\s+\S+

# Identifiers
\b\d{10,}\b                          # phone numbers, long IDs
\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+   # emails
\b(order|account|message|chat)[_-]?id\b

# Personal context
\b(my\s+(wife|husband|partner|friend|boss|mom|dad|brother|sister))\b
\b(said\s+to\s+me|told\s+me|between\s+us)\b

Attribute Strategies

Use attributes to partition the cache:

  • model: LLM model used (useful when switching models)
  • category: factual, template, style, command
  • skill: Which skill generated the response
  • version: API or prompt version

Search Strategies

LangCache supports two search strategies:

  • semantic (default): Vector similarity matching
  • exact: Case-insensitive exact match

Combine both for hybrid search:

./scripts/langcache.sh search "prompt" --strategy "exact,semantic"

Observability

Monitor cache performance:

  • Track hit/miss ratios
  • Log similarity scores for hits
  • Alert on high miss rates (may indicate threshold too high)
  • Review stored entries periodically for relevance

References

Examples

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

93.12%
按下载量换算17,061

安全审计

VirusTotal

通过

ClawScan

可疑

Static analysis

未展示

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills