snipara-openclaw-hooks
v1.1.5
Published
Shared memory for multi-agent teams - automation hooks for OpenClaw powered by Snipara
Maintainers
Readme
Snipara OpenClaw Hooks
Hybrid Snipara automation for OpenClaw:
- a native OpenClaw plugin for lifecycle observation in Codex/OpenClaw-native runs
- a small internal hook pack for context injection where the plugin API is not the right fit
This package is not the same thing as snipara-companion.
This package does not install or depend on the openclaw npm package. Install and manage OpenClaw separately; use OpenClaw 2026.6.6 or newer when enabling this integration.
Current Model
Native plugin hooks
Installed through OpenClaw's plugin manager:
openclaw plugins install npm:snipara-openclaw-hooksThese plugin hooks are the preferred path for automatic observation:
| Hook | Role |
| ----------------- | ------------------------------------------------------------------------ |
| gateway_start | validate Snipara connectivity when the Gateway boots |
| session_start | forward canonical session-start signals to Snipara automation |
| session_end | forward canonical session-end signals, including shutdown/restart drains |
| after_tool_call | observe Codex/OpenClaw tool results with bounded payload capture |
Internal hooks
Still useful as hook-pack entries under ~/.openclaw/hooks:
| Hook | Event | Role |
| ------------------- | ----------------- | ------------------------------------------------------------------------------ |
| snipara-session | command:new | save deduped session context and reload tiered memory on /new |
| snipara-bootstrap | agent:bootstrap | inject project docs, durable memory, and team standards before workspace files |
Manual fallback install for those internal hooks:
npx snipara-openclaw-hooks install --all
openclaw hooks enable snipara-session
openclaw hooks enable snipara-bootstrapLegacy Internal Hooks
The package still ships the historical internal hook directories for compatibility, but they are no longer the recommended default for Codex-mode automation:
| Hook | Legacy event | Why it is no longer preferred |
| ----------------- | --------------------- | ---------------------------------------------------------------------------------------------------- |
| snipara-startup | gateway:startup | plugin-owned startup state belongs on gateway_start; prompt injection belongs on agent:bootstrap |
| snipara-stop | command:stop | only fires on /stop, not on normal session shutdown/finalization |
| snipara-persist | tool_result_persist | does not cover Codex/OpenClaw-native tool observation reliably |
Quick Start
Recommended OpenClaw setup:
SNIPARA_API_KEY=snp-your-key \
SNIPARA_PROJECT_SLUG=openclaw \
npx snipara-openclaw-install --yesThat wrapper writes Hosted MCP config, updates ~/.openclaw/openclaw.json, installs the native plugin, and prints the internal-hook enable commands that still matter.
Hooks-only workflow:
openclaw plugins install npm:snipara-openclaw-hooks
npx snipara-openclaw-hooks install --all
openclaw hooks enable snipara-session
openclaw hooks enable snipara-bootstrapRestart OpenClaw after plugin or hook changes.
Status And Verification
npx snipara-openclaw-hooks status
openclaw hooks list --verbose
openclaw plugins inspect snipara-openclaw-hooks --runtime --jsonstatus reports shell values separately from values in ~/.openclaw/openclaw.json and never prints the raw API key.
Configuration
Add to ~/.openclaw/openclaw.json:
{
"env": {
"SNIPARA_API_KEY": "snp-your-key",
"SNIPARA_PROJECT_SLUG": "your-project"
}
}Optional:
export SNIPARA_BOOTSTRAP_TOKENS=6000
export SNIPARA_BASE_URL="https://api.snipara.com"Why This Changed
The older package shape treated everything as internal hooks under ~/.openclaw/hooks. That installation path is still fine, but it is not enough for the goal of "complete automatic memory with Codex-mode" because:
after_tool_call,session_start,session_end, andgateway_startare plugin hooks, not internal hook-pack eventstool_result_persistandcommand:stoponly cover narrower cases than Codex/OpenClaw-native runs- Snipara's thin-edge direction is to capture normalized lifecycle signals locally and keep durable policy/review hosted
