| name | usewhisper-autohook |
| description | Auto-hook tools for OpenClaw: query Whisper Context before every generation, ingest after every turn. Built for Telegram agents (stable user_id/session_id). |
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.