snipara-openclaw-hooks
v1.1.0
Published
Shared memory for multi-agent teams - automation hooks for OpenClaw powered by Snipara
Maintainers
Readme
Snipara OpenClaw Hooks
This package is not the same thing as
snipara-companion. Usesnipara-openclaw-hooksfor OpenClaw-specific hook automation. Usesnipara-companionfor the general local helper CLI sourced frompackages/cli.
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 durable tool results with novelty gating |
| 🛑 snipara-stop | command:stop | Saves deduped session context and commits durable notes |
Team Hooks (Multi-Agent)
| Hook | Event | Description |
| ---------------------- | ----------------- | --------------------------------------------------------------- |
| 🧠 snipara-startup | gateway:startup | Loads tiered session memory, tenant profile, and team standards |
| 💾 snipara-session | command:new | Saves deduped context and reloads tiered memory |
| 🚀 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 with rlm_remember_if_novel so repeated test/build noise is skipped automatically:
| 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 deduped session context, then runs rlm_end_of_task_commit to keep only durable outcomes:
- Completed items
- In-progress work
- Blockers encountered
snipara-startup (Team only)
On gateway start:
- Loads
rlm_session_memories(critical + daily tiers) - Loads the latest tenant profile when present
- 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 with
rlm_remember_if_novel - Loads
rlm_session_memoriesfor the next session - Loads the latest tenant profile when present
Automation Primitives
The hooks rely on the higher-level memory automation tools rather than only direct remember/recall calls:
rlm_session_memoriesfor session bootstrap with critical and daily tiersrlm_tenant_profile_getfor client-specific constraints and preferencesrlm_remember_if_novelto avoid storing duplicate tool output and session notesrlm_end_of_task_committo preserve only durable decisions, learnings, and workflow changes
Canonical Event Alignment
The OpenClaw hooks package is aligning toward a canonical Snipara event model so multiple clients can feed the same ingestion pipeline.
Core canonical event types:
session_startsession_endcompactmessage_usermessage_assistanttool_calltool_resultfile_changederror_observed
OpenClaw-specific hooks still emit native event categories, but hook payloads can now carry normalized fields such as:
canonicalTypesessionIdworkspaceagentIdprivacyLevel
This keeps the adapter thin while preserving a shared backend contract across clients.
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
- create-snipara - Recommended base onboarding
- snipara-openclaw - External or legacy broader integration surface
Maintainer Release Notes
Changes under packages/snipara-openclaw-hooks/** are not auto-published from this repo.
Release flow:
- validate the feature on
dev - promote the validated commits onto a fresh branch from
main - bump
versioninpackage.json - merge to
main - run
npm publish
If the same feature also touched backend logic or snipara-mcp, ship those surfaces together. See docs/operations/RELEASE_AND_DEPLOY.md.
License
MIT
