npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

snipara-openclaw-hooks

v1.1.0

Published

Shared memory for multi-agent teams - automation hooks for OpenClaw powered by Snipara

Readme

Snipara OpenClaw Hooks

This package is not the same thing as snipara-companion. Use snipara-openclaw-hooks for OpenClaw-specific hook automation. Use snipara-companion for the general local helper CLI sourced from packages/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-stop

Why 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_memories for 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_memories for session bootstrap with critical and daily tiers
  • rlm_tenant_profile_get for client-specific constraints and preferences
  • rlm_remember_if_novel to avoid storing duplicate tool output and session notes
  • rlm_end_of_task_commit to 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_start
  • session_end
  • compact
  • message_user
  • message_assistant
  • tool_call
  • tool_result
  • file_changed
  • error_observed

OpenClaw-specific hooks still emit native event categories, but hook payloads can now carry normalized fields such as:

  • canonicalType
  • sessionId
  • workspace
  • agentId
  • privacyLevel

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 --all

Configuration

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

  1. Visit snipara.com/dashboard
  2. Create or select a project
  3. Go to Settings → API Keys
  4. Generate a new key (starts with rlm_)

Related

Maintainer Release Notes

Changes under packages/snipara-openclaw-hooks/** are not auto-published from this repo.

Release flow:

  1. validate the feature on dev
  2. promote the validated commits onto a fresh branch from main
  3. bump version in package.json
  4. merge to main
  5. 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