OpenClaw Integration
OpenClaw is a popular open-source multi-agent framework (formerly MoltBot/ClawdBot). Snipara provides first-class integration via the snipara-openclaw npm package, adding multi-agent swarm coordination, context optimization, safe Python execution, and persistent semantic memory.
One-Command Install
npx snipara-openclaw-installThis configures memory plugin, swarm skill, context skill, and execution skill automatically.
What You Get
Multi-Agent Swarms
Coordinate multiple agents with resource claims, distributed task queues, and shared state.
- ✓ Distributed resource locks
- ✓ Task queue with dependencies
- ✓ Optimistic locking state
- ✓ Event broadcasting
Context Optimization
Semantic search over project documentation with token budgeting. 500K codebase → 4K relevant context.
- ✓ Hybrid search (keyword + semantic)
- ✓ Query decomposition
- ✓ Execution planning
- ✓ Token budgeting
Safe Code Execution
Execute Python code in Docker-isolated sandbox via RLM-Runtime. Test code safely without risk.
- ✓ Docker isolation
- ✓ Session persistence
- ✓ Execution profiles (5s-300s)
- ✓ Autonomous agent runs
Persistent Memory
Replace MEMORY.md with semantic memory. TTL-based expiration, relevance scoring, cross-session.
- ✓ 6 memory types (fact, decision, etc.)
- ✓ Semantic recall
- ✓ Configurable TTL
- ✓ Cross-session persistence
Quick Start
Option A: One-Command Install (Recommended)
npx snipara-openclaw-installThe installer will:
- Detect your OpenClaw installation (
~/.openclaw/) - Prompt for your Snipara API key (or open signup)
- Configure all three skills automatically
- Test the connection
- Show next steps
Option B: Manual Installation
npm install snipara-openclawThen configure ~/.openclaw/openclaw.json:
{ "memory": { "provider": "snipara-openclaw/memory-plugin", "config": { "apiKey": "rlm_your_key_here", "projectSlug": "your-project" } }, "skills": { "snipara-swarm": { "enabled": true }, "snipara-context": { "enabled": true }, "snipara-execution": { "enabled": true } }}Automation Hooks
Shared memory for multi-agent teams. These hooks add value when multiple agents share the same Snipara project — learnings from one agent benefit the whole team.
Solo Agent?
OpenClaw's native memory system (MEMORY.md, session-memory) handles context well for solo agents. Only install snipara-persist and snipara-stop — the other hooks add overhead without benefit.
npx snipara-openclaw-hooks install snipara-persist snipara-stopMulti-Agent Team?
Install all hooks. Shared context, team standards, and cross-agent learnings benefit everyone.
npx snipara-openclaw-hooks installCore 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 |
Configuration
Add your Snipara credentials to ~/.openclaw/openclaw.json:
{ "env": { "SNIPARA_API_KEY": "rlm_your_key_here", "SNIPARA_PROJECT_SLUG": "your-project" }}CLI Commands
# Solo agent — recommendednpx snipara-openclaw-hooks install snipara-persist snipara-stop# Multi-agent team — all hooksnpx snipara-openclaw-hooks install# List available hooksnpx snipara-openclaw-hooks list# Check installation statusnpx snipara-openclaw-hooks status# Uninstall all hooksnpx snipara-openclaw-hooks uninstall --allSwarm Coordination
Coordinate multiple agents working on the same codebase. The swarm skill provides 12 tools for distributed coordination.
Creating a Swarm
// Create a swarm for a code review taskconst swarm = await swarm_create(ctx, { name: "pr-review-123", description: "Code review for PR #123", maxAgents: 5});Resource Claims (Prevent Conflicts)
// Claim exclusive access to a fileawait claim_resource(ctx, { swarmId: swarm.swarmId, agentId: "reviewer-1", resourceType: "file", resourceId: "src/auth.ts", timeoutSeconds: 300});No More Merge Conflicts
When two agents try to edit the same file, the second agent's claim will fail until the first agent releases the resource. This prevents merge conflicts and ensures orderly file access.
Task Queue with Dependencies
// Create tasks with dependenciesawait task_create(ctx, { swarmId, agentId: "coordinator", title: "Run test suite", dependsOn: ["review-auth", "review-api"]});// Task won't be claimable until dependencies completeContext Optimization
Query your project documentation with semantic search and token budgeting.
const context = await context_query(ctx, { query: "How does authentication work?", maxTokens: 4000, searchMode: "hybrid"});// Returns ranked, relevant sections within token budgetSafe Code Execution
Execute Python code in a Docker-isolated sandbox via RLM-Runtime.
const result = await execute_python(ctx, { code: `def fib(n): return n if n <= 1 else fib(n-1) + fib(n-2)print([fib(i) for i in range(10)])`, profile: "default" // quick(5s) | default(30s) | analysis(120s) | extended(300s)});// [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]Persistent Memory
Replace OpenClaw's file-based MEMORY.md with semantic memory that persists across sessions.
// Store a memoryawait remember(ctx, { content: "User prefers functional components", type: "preference", ttlDays: 90});// Recall relevant memoriesconst memories = await recall(ctx, { query: "user preferences for React"});| Memory Type | Use Case | Default TTL |
|---|---|---|
fact | Discovered truths | 30 days |
decision | Architectural choices | 30 days |
learning | Lessons learned | 14 days |
preference | User preferences | 90 days |
todo | Tasks to complete | 7 days |
context | Session state | 7 days |
All Available Tools
| Skill | Tools |
|---|---|
| Swarm (12 tools) | swarm_create, swarm_join, claim_resource, release_resource, get_state, set_state, broadcast, task_create, task_claim, task_complete, remember, recall |
| Context (8 tools) | context_query, upload_document, search, decompose, plan, multi_query, sections, stats |
| Execution (4 tools) | execute_python, agent_run, agent_status, agent_cancel |
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_)
Resources
Main Package
snipara-openclaw
Hooks Package
snipara-openclaw-hooks
GitHub Repository
Source code, issues, releases