TopRank Skills

Home / Claw Skills / Autres / Usewhisper Autohook
Official OpenClaw rules 15%

Usewhisper Autohook

usewhisper autohook OpenClaw Skill

Stars

0

Installs

0

Status

ACTIVE

Visibility

PUBLIC

安装方式

直接复制以下提示词,发送给你的 AI 助手即可完成安装。

请先检查是否已安装 SkillHub 商店,若未安装,请根据 https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/skillhub.md 安装 SkillHub 商店,然后安装 Usewhisper Autohook 技能。 若已安装,则直接安装 Usewhisper Autohook 技能。

Overview

Skill Key
alinxus/usewhisper-autohook
Author
alinxus
Source Repo
openclaw/skills
Version
-
Source Path
skills/alinxus/usewhisper-autohook
Latest Commit SHA
f68ab94387bb8062fd293ec791f1aba4d52f2990

Extracted Content

SKILL.md excerpt

# 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 excerpt

# 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 -
```

Related Claw Skills