snipara-openclaw-hooks
v1.0.2
Published
Shared memory for multi-agent teams - automation hooks for OpenClaw powered by Snipara
Maintainers
Readme
Snipara OpenClaw Hooks
Shared memory for multi-agent teams powered by Snipara.
Solo agent? OpenClaw's native memory system (MEMORY.md, session-memory) handles context well. These hooks add value when multiple agents share the same Snipara project — learnings from one agent benefit the whole team.
When to Use
| Scenario | Recommendation |
| -------------------- | ----------------------------------------------------------------------- |
| Solo agent | Use snipara-persist + snipara-stop only. OpenClaw handles the rest. |
| Multi-agent team | Use all hooks. Shared context + team standards benefit everyone. |
| Cross-project swarms | Full suite. Architectural decisions and learnings propagate. |
Hooks
Core Hooks (Solo or Team)
| Hook | Event | Description |
| -------------------- | --------------------- | ------------------------------------------------------- |
| 📝 snipara-persist | tool_result_persist | Auto-captures commits, test results, errors as memories |
| 🛑 snipara-stop | command:stop | Saves final session context before agent stops |
Team Hooks (Multi-Agent)
| Hook | Event | Description |
| ---------------------- | ----------------- | ---------------------------------------------- |
| 🧠 snipara-startup | gateway:startup | Restores shared memories and team standards |
| 💾 snipara-session | command:new | Saves/recalls context across agents |
| 🚀 snipara-bootstrap | agent:bootstrap | Injects project docs and team coding standards |
Quick Start
# Solo agent — install only what you need
npx snipara-openclaw-hooks install snipara-persist snipara-stop
# Team/swarm — install everything
npx snipara-openclaw-hooks install
# Configure
export SNIPARA_API_KEY="rlm_your_key_here"
export SNIPARA_PROJECT_SLUG="your-project"
# Enable
openclaw hooks enable snipara-persist
openclaw hooks enable snipara-stopWhy Multi-Agent?
┌─────────────────────────────────────────────────────────────────┐
│ SINGLE AGENT │
│ └── OpenClaw native memory handles context fine │
│ └── Snipara hooks = overhead, token waste │
│ │
│ MULTI-AGENT TEAM (Mike, Luna, Oscar...) │
│ └── Agent A learns: "API uses JWT, not sessions" │
│ └── snipara-persist stores as learning │
│ └── Agent B queries: rlm_recall("authentication") │
│ └── Gets Agent A's learning → no re-discovery │
│ │
│ VALUE = Shared learnings + Team standards + Less rework │
└─────────────────────────────────────────────────────────────────┘What Each Hook Does
snipara-persist (Recommended for all)
Auto-captures significant tool results:
| Pattern | Memory Type | Category |
| ---------------------- | ----------- | ----------- |
| git commit | decision | commits |
| git push | fact | git |
| pytest/vitest/jest | learning | testing |
| build/compile/tsc | fact | builds |
| deploy | decision | deployments |
| error/fail/exception | learning | debugging |
snipara-stop
Extracts and saves session context:
- Completed items
- In-progress work
- Blockers encountered
- Workspace directory
snipara-startup (Team only)
On gateway start:
- Recalls recent context memories
- Recalls decisions made
- Injects team coding standards (if Team plan)
snipara-bootstrap (Team only)
Before workspace files load:
- Queries project documentation
- Loads team shared context (coding standards, best practices)
- Recalls project facts
snipara-session (Team only)
On /new command:
- Saves outgoing session summary
- Recalls relevant context for new session
- Recalls recent decisions
CLI Commands
# Install specific hooks
npx snipara-openclaw-hooks install snipara-persist snipara-stop
# Install all hooks
npx snipara-openclaw-hooks install
# List available hooks
npx snipara-openclaw-hooks list
# Check installation status
npx snipara-openclaw-hooks status
# Uninstall
npx snipara-openclaw-hooks uninstall --allConfiguration
Add to ~/.openclaw/openclaw.json:
{
"env": {
"SNIPARA_API_KEY": "rlm_your_key_here",
"SNIPARA_PROJECT_SLUG": "your-project"
}
}Optional Settings
# Token budget for bootstrap context (default: 4000)
export SNIPARA_BOOTSTRAP_TOKENS=6000
# Custom API endpoint
export SNIPARA_BASE_URL="https://api.snipara.com"Requirements
- OpenClaw installed (
~/.openclaw/directory exists) - Node.js 18+
- Snipara account with API key
Get Your API Key
- Visit snipara.com/dashboard
- Create or select a project
- Go to Settings → API Keys
- Generate a new key (starts with
rlm_)
Related
- Snipara Documentation
- snipara-openclaw - Skills integration
- snipara-openclaw-install - One-command setup
License
MIT
