搜索

PythonReactSEOPDF
OpenClaw

Usewhisper Autohook

usewhisper autohook OpenClaw Skill

alinxus0 来源安装数☆ 0 仓库 Stars

安装与使用

请根据来源仓库和你的 AI 工具说明安装此技能。先阅读技能文件和依赖要求,再添加到工作流。

SkillHub CLI

skillhub install alinxus/usewhisper-autohook

打开来源仓库,查看说明和兼容环境后,按来源提供的命令或步骤安装。

将来源链接提供给你的 Agent,让它先读取说明、核对依赖,并向你说明将执行的安装步骤。

查看来源 ↗使用指南

技能说明

usewhisper-autohook (OpenClaw Skill)

This skill is a thin wrapper designed to make "automatic memory" easy:

  • get_whisper_context(user_id, session_id, current_query) for pre-response context injection
  • ingest_whisper_turn(user_id, session_id, user_msg, assistant_msg) for post-response ingestion

It defaults to the token-saving settings you almost always want:

  • compress: true
  • compression_strategy: "delta"
  • use_cache: true
  • include_memories: true

It also persists the last context_hash locally (per api_url + project + user_id + session_id) so delta compression works by default without you needing to pass previous_context_hash.

Install (ClawHub)

npx clawhub@latest install usewhisper-autohook

Setup

Set env vars wherever OpenClaw runs your agent:

WHISPER_CONTEXT_API_URL=https://context.usewhisper.dev
WHISPER_CONTEXT_API_KEY=YOUR_KEY
WHISPER_CONTEXT_PROJECT=openclaw-yourname

Notes:

  • WHISPER_CONTEXT_API_URL is optional (defaults to https://context.usewhisper.dev).
  • The helper will auto-create the project on first use if it does not exist yet.

The "Auto Loop" Prompt (Copy/Paste)

Add this to your agent's system instruction (or equivalent):

Before you think or respond to any message:
1) Call get_whisper_context with:
   user_id = "telegram:{from_id}"
   session_id = "telegram:{chat_id}"
   current_query = the user's message text
2) If the returned context is not empty, prepend it to your prompt as:
   "Relevant long-term memory:\n{context}\n\nNow respond to:\n{user_message}"

After you generate your final response:
1) Call ingest_whisper_turn with the same user_id and session_id and:
   user_msg = the full user message
   assistant_msg = your full final reply

Always do this. Never skip.

If you are not on Telegram, keep the same structure: the important part is that user_id and session_id are stable.

If Your Agent Still Replays Full Chat History (Proxy Mode)

If you cannot c...

来源信息

Source
github
Repository
openclaw/skills
Path
skills/alinxus/usewhisper-autohook
Version
—
Commit
f68ab94387bb8062fd293ec791f1aba4d52f2990
分类来源
rules
状态
active
可见性
public

这些信息来自收录时的来源分析,可能滞后;使用前请核对最新来源文件。

README

usewhisper-autohook (OpenClaw Skill)

Two commands meant to be called on every agent turn:

  • get_whisper_context (pre-query)
  • ingest_whisper_turn (post-response)

Install:

npx clawhub@latest install usewhisper-autohook

Env:

WHISPER_CONTEXT_API_URL=https://context.usewhisper.dev
WHISPER_CONTEXT_API_KEY=YOUR_KEY
WHISPER_CONTEXT_PROJECT=openclaw-yourname

One-liners:

node usewhisper-autohook.mjs get_whisper_context --current_query "USER_MESSAGE" --user_id "telegram:FROM_ID" --session_id "telegram:CHAT_ID"
echo '{ "user_msg": "USER_MESSAGE", "assistant_msg": "ASSISTANT_REPLY" }' | node usewhisper-autohook.mjs ingest_whisper_turn --session_id "telegram:CHAT_ID" --user_id "telegram:FROM_ID" --turn_json -

来源内容

SKILL.md
# usewhisper-autohook (OpenClaw Skill)

This skill is a thin wrapper designed to make "automatic memory" easy:

- `get_whisper_context(user_id, session_id, current_query)` for pre-response context injection
- `ingest_whisper_turn(user_id, session_id, user_msg, assistant_msg)` for post-response ingestion

It defaults to the token-saving settings you almost always want:

- `compress: true`
- `compression_strategy: "delta"`
- `use_cache: true`
- `include_memories: true`

It also persists the last `context_hash` locally (per `api_url + project + user_id + session_id`) so delta compression works by default without you needing to pass `previous_context_hash`.

## Install (ClawHub)

```bash
npx clawhub@latest install usewhisper-autohook
```

## Setup

Set env vars wherever OpenClaw runs your agent:

```bash
WHISPER_CONTEXT_API_URL=https://context.usewhisper.dev
WHISPER_CONTEXT_API_KEY=YOUR_KEY
WHISPER_CONTEXT_PROJECT=openclaw-yourname
```

Notes:

- `WHISPER_CONTEXT_API_URL` is optional (defaults to `https://context.usewhisper.dev`).
- The helper will auto-create the project on first use if it does not exist yet.

## The "Auto Loop" Prompt (Copy/Paste)

Add this to your agent's **system instruction** (or equivalent):

```text
Before you think or respond to any message:
1) Call get_whisper_context with:
   user_id = "telegram:{from_id}"
   session_id = "telegram:{chat_id}"
   current_query = the user's message text
2) If the returned context is not empty, prepend it to your prompt as:
   "Relevant long-term memory:\n{context}\n\nNow respond to:\n{user_message}"

After you generate your final response:
1) Call ingest_whisper_turn with the same user_id and session_id and:
   user_msg = the full user message
   assistant_msg = your full final reply

Always do this. Never skip.
```

If you are not on Telegram, keep the same structure: the important part is that `user_id` and `session_id` are stable.

## If Your Agent Still Replays Full Chat History (Proxy Mode)

If you cannot c...
README
# usewhisper-autohook (OpenClaw Skill)

Two commands meant to be called on every agent turn:

- `get_whisper_context` (pre-query)
- `ingest_whisper_turn` (post-response)

Install:

```bash
npx clawhub@latest install usewhisper-autohook
```

Env:

```bash
WHISPER_CONTEXT_API_URL=https://context.usewhisper.dev
WHISPER_CONTEXT_API_KEY=YOUR_KEY
WHISPER_CONTEXT_PROJECT=openclaw-yourname
```

One-liners:

```bash
node usewhisper-autohook.mjs get_whisper_context --current_query "USER_MESSAGE" --user_id "telegram:FROM_ID" --session_id "telegram:CHAT_ID"
```

```bash
echo '{ "user_msg": "USER_MESSAGE", "assistant_msg": "ASSISTANT_REPLY" }' | node usewhisper-autohook.mjs ingest_whisper_turn --session_id "telegram:CHAT_ID" --user_id "telegram:FROM_ID" --turn_json -
```

相关技能

OpenClaw

1password

daggerkun007

Set up and use 1Password CLI (op). Use when installing the CLI, enabling desktop app integration, signing in (single or multi-account), or reading/injecting/running secrets via op.