zeroclaw

OpenClaw Family
2529

claw done right ๐Ÿฆ€ - Rust implementation of OpenClaw

README

<p align="center"> <img src="zeroclaw.png" alt="ZeroClaw" width="200" /> </p> <h1 align="center">ZeroClaw ๐Ÿฆ€</h1> <p align="center"> <strong>Zero overhead. Zero compromise. 100% Rust. 100% Agnostic.</strong><br> โšก๏ธ <strong>Runs on $10 hardware with <5MB RAM: That's 99% less memory than OpenClaw and 98% cheaper than a Mac mini!</strong> </p> <p align="center"> <a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue.svg" alt="License: MIT" /></a> </p>

Fast, small, and fully autonomous AI assistant infrastructure โ€” deploy anywhere, swap anything.

~3.4MB binary ยท <10ms startup ยท 1,017 tests ยท 22+ providers ยท 8 traits ยท Pluggable everything

โœจ Features

  • ๐ŸŽ๏ธ Ultra-Lightweight: <5MB Memory footprint โ€” 99% smaller than OpenClaw core.
  • ๐Ÿ’ฐ Minimal Cost: Efficient enough to run on $10 Hardware โ€” 98% cheaper than a Mac mini.
  • โšก Lightning Fast: 400X Faster startup time, boot in <10ms (under 1s even on 0.6GHz cores).
  • ๐ŸŒ True Portability: Single self-contained binary across ARM, x86, and RISC-V.

Why teams pick ZeroClaw

  • Lean by default: small Rust binary, fast startup, low memory footprint.
  • Secure by design: pairing, strict sandboxing, explicit allowlists, workspace scoping.
  • Fully swappable: core systems are traits (providers, channels, tools, memory, tunnels).
  • No lock-in: OpenAI-compatible provider support + pluggable custom endpoints.

Benchmark Snapshot (ZeroClaw vs OpenClaw)

Local machine quick benchmark (macOS arm64, Feb 2026) normalized for 0.8GHz edge hardware.

OpenClawNanoBotPicoClawZeroClaw ๐Ÿฆ€
LanguageTypeScriptPythonGoRust
RAM> 1GB> 100MB< 10MB< 5MB
Startup (0.8GHz core)> 500s> 30s< 1s< 10ms
Binary Size~28MB (dist)N/A (Scripts)~8MB3.4 MB
CostMac Mini $599Linux SBC ~$50Linux Board $10Any hardware $10

Notes: ZeroClaw results measured with /usr/bin/time -l on release builds. OpenClaw requires Node.js runtime (~390MB overhead). PicoClaw and ZeroClaw are static binaries.

<p align="center"> <img src="zero-claw.jpeg" alt="ZeroClaw vs OpenClaw Comparison" width="800" /> </p>

Reproduce ZeroClaw numbers locally:

cargo build --release
ls -lh target/release/zeroclaw

/usr/bin/time -l target/release/zeroclaw --help
/usr/bin/time -l target/release/zeroclaw status

Quick Start

git clone https://github.com/theonlyhennygod/zeroclaw.git
cd zeroclaw
cargo build --release
cargo install --path . --force

# Quick setup (no prompts)
zeroclaw onboard --api-key sk-... --provider openrouter

# Or interactive wizard
zeroclaw onboard --interactive

# Or quickly repair channels/allowlists only
zeroclaw onboard --channels-only

# Chat
zeroclaw agent -m "Hello, ZeroClaw!"

# Interactive mode
zeroclaw agent

# Start the gateway (webhook server)
zeroclaw gateway                # default: 127.0.0.1:8080
zeroclaw gateway --port 0       # random port (security hardened)

# Start full autonomous runtime
zeroclaw daemon

# Check status
zeroclaw status

# Run system diagnostics
zeroclaw doctor

# Check channel health
zeroclaw channel doctor

# Get integration setup details
zeroclaw integrations info Telegram

# Manage background service
zeroclaw service install
zeroclaw service status

# Migrate memory from OpenClaw (safe preview first)
zeroclaw migrate openclaw --dry-run
zeroclaw migrate openclaw

Dev fallback (no global install): prefix commands with cargo run --release -- (example: cargo run --release -- status).

Architecture

Every subsystem is a trait โ€” swap implementations with a config change, zero code changes.

<p align="center"> <img src="docs/architecture.svg" alt="ZeroClaw Architecture" width="900" /> </p>
SubsystemTraitShips withExtend
AI ModelsProvider22+ providers (OpenRouter, Anthropic, OpenAI, Ollama, Venice, Groq, Mistral, xAI, DeepSeek, Together, Fireworks, Perplexity, Cohere, Bedrock, etc.)custom:https://your-api.com โ€” any OpenAI-compatible API
ChannelsChannelCLI, Telegram, Discord, Slack, iMessage, Matrix, WhatsApp, WebhookAny messaging API
MemoryMemorySQLite with hybrid search (FTS5 + vector cosine similarity), MarkdownAny persistence backend
ToolsToolshell, file_read, file_write, memory_store, memory_recall, memory_forget, browser_open (Brave + allowlist), composio (optional)Any capability
ObservabilityObserverNoop, Log, MultiPrometheus, OTel
RuntimeRuntimeAdapterNative (Mac/Linux/Pi)Docker, WASM (planned; unsupported kinds fail fast)
SecuritySecurityPolicyGateway pairing, sandbox, allowlists, rate limits, filesystem scoping, encrypted secretsโ€”
IdentityIdentityConfigOpenClaw (markdown), AIEOS v1.1 (JSON)Any identity format
TunnelTunnelNone, Cloudflare, Tailscale, ngrok, CustomAny tunnel binary
HeartbeatEngineHEARTBEAT.md periodic tasksโ€”
SkillsLoaderTOML manifests + SKILL.md instructionsCommunity skill packs
IntegrationsRegistry50+ integrations across 9 categoriesPlugin system

Runtime support (current)

  • โœ… Supported today: runtime.kind = "native"
  • ๐Ÿšง Planned, not implemented yet: Docker / WASM / edge runtimes

When an unsupported runtime.kind is configured, ZeroClaw now exits with a clear error instead of silently falling back to native.

Memory System (Full-Stack Search Engine)

All custom, zero external dependencies โ€” no Pinecone, no Elasticsearch, no LangChain:

LayerImplementation
Vector DBEmbeddings stored as BLOB in SQLite, cosine similarity search
Keyword SearchFTS5 virtual tables with BM25 scoring
Hybrid MergeCustom weighted merge function (vector.rs)
EmbeddingsEmbeddingProvider trait โ€” OpenAI, custom URL, or noop
ChunkingLine-based markdown chunker with heading preservation
CachingSQLite embedding_cache table with LRU eviction
Safe ReindexRebuild FTS5 + re-embed missing vectors atomically

The agent automatically recalls, saves, and manages memory via tools.

[memory]
backend = "sqlite"          # "sqlite", "markdown", "none"
auto_save = true
embedding_provider = "openai"
vector_weight = 0.7
keyword_weight = 0.3

Security

ZeroClaw enforces security at every layer โ€” not just the sandbox. It passes all items from the community security checklist.

Security Checklist

#ItemStatusHow
1Gateway not publicly exposedโœ…Binds 127.0.0.1 by default. Refuses 0.0.0.0 without tunnel or explicit allow_public_bind = true.
2Pairing requiredโœ…6-digit one-time code on startup. Exchange via POST /pair for bearer token. All /webhook requests require Authorization: Bearer <token>.
3Filesystem scoped (no /)โœ…workspace_only = true by default. 14 system dirs + 4 sensitive dotfiles blocked. Null byte injection blocked. Symlink escape detection via canonicalization + resolved-path workspace checks in file read/write tools.
4Access via tunnel onlyโœ…Gateway refuses public bind without active tunnel. Supports Tailscale, Cloudflare, ngrok, or any custom tunnel.

Run your own nmap: nmap -p 1-65535 <your-host> โ€” ZeroClaw binds to localhost only, so nothing is exposed unless you explicitly configure a tunnel.

Channel allowlists (Telegram / Discord / Slack)

Inbound sender policy is now consistent:

  • Empty allowlist = deny all inbound messages
  • "*" = allow all (explicit opt-in)
  • Otherwise = exact-match allowlist

This keeps accidental exposure low by default.

Recommended low-friction setup (secure + fast):

  • Telegram: allowlist your own @username (without @) and/or your numeric Telegram user ID.
  • Discord: allowlist your own Discord user ID.
  • Slack: allowlist your own Slack member ID (usually starts with U).
  • Use "*" only for temporary open testing.

If you're not sure which identity to use:

  1. Start channels and send one message to your bot.
  2. Read the warning log to see the exact sender identity.
  3. Add that value to the allowlist and rerun channels-only setup.

If you hit authorization warnings in logs (for example: ignoring message from unauthorized user), rerun channel setup only:

zeroclaw onboard --channels-only

WhatsApp Business Cloud API Setup

WhatsApp uses Meta's Cloud API with webhooks (push-based, not polling):

  1. Create a Meta Business App:

  2. Get your credentials:

    • Access Token: From WhatsApp โ†’ API Setup โ†’ Generate token (or create a System User for permanent tokens)
    • Phone Number ID: From WhatsApp โ†’ API Setup โ†’ Phone number ID
    • Verify Token: You define this (any random string) โ€” Meta will send it back during webhook verification
  3. Configure ZeroClaw:

    [channels_config.whatsapp]
    access_token = "EAABx..."
    phone_number_id = "123456789012345"
    verify_token = "my-secret-verify-token"
    allowed_numbers = ["+1234567890"]  # E.164 format, or ["*"] for all
    
  4. Start the gateway with a tunnel:

    zeroclaw gateway --port 8080
    

    WhatsApp requires HTTPS, so use a tunnel (ngrok, Cloudflare, Tailscale Funnel).

  5. Configure Meta webhook:

    • In Meta Developer Console โ†’ WhatsApp โ†’ Configuration โ†’ Webhook
    • Callback URL: https://your-tunnel-url/whatsapp
    • Verify Token: Same as your verify_token in config
    • Subscribe to messages field
  6. Test: Send a message to your WhatsApp Business number โ€” ZeroClaw will respond via the LLM.

Configuration

Config: ~/.zeroclaw/config.toml (created by onboard)

api_key = "sk-..."
default_provider = "openrouter"
default_model = "anthropic/claude-sonnet-4-20250514"
default_temperature = 0.7

[memory]
backend = "sqlite"              # "sqlite", "markdown", "none"
auto_save = true
embedding_provider = "openai"   # "openai", "noop"
vector_weight = 0.7
keyword_weight = 0.3

[gateway]
require_pairing = true          # require pairing code on first connect
allow_public_bind = false       # refuse 0.0.0.0 without tunnel

[autonomy]
level = "supervised"            # "readonly", "supervised", "full" (default: supervised)
workspace_only = true           # default: true โ€” scoped to workspace
allowed_commands = ["git", "npm", "cargo", "ls", "cat", "grep"]
forbidden_paths = ["/etc", "/root", "/proc", "/sys", "~/.ssh", "~/.gnupg", "~/.aws"]

[runtime]
kind = "native"                # only supported value right now; unsupported kinds fail fast

[heartbeat]
enabled = false
interval_minutes = 30

[tunnel]
provider = "none"               # "none", "cloudflare", "tailscale", "ngrok", "custom"

[secrets]
encrypt = true                  # API keys encrypted with local key file

[browser]
enabled = false                 # opt-in browser_open tool
allowed_domains = ["docs.rs"]  # required when browser is enabled

[composio]
enabled = false                 # opt-in: 1000+ OAuth apps via composio.dev

[identity]
format = "openclaw"             # "openclaw" (default, markdown files) or "aieos" (JSON)
# aieos_path = "identity.json"  # path to AIEOS JSON file (relative to workspace or absolute)
# aieos_inline = '{"identity":{"names":{"first":"Nova"}}}'  # inline AIEOS JSON

Identity System (AIEOS Support)

ZeroClaw supports identity-agnostic AI personas through two formats:

OpenClaw (Default)

Traditional markdown files in your workspace:

  • IDENTITY.md โ€” Who the agent is
  • SOUL.md โ€” Core personality and values
  • USER.md โ€” Who the agent is helping
  • AGENTS.md โ€” Behavior guidelines

AIEOS (AI Entity Object Specification)

AIEOS is a standardization framework for portable AI identity. ZeroClaw supports AIEOS v1.1 JSON payloads, allowing you to:

  • Import identities from the AIEOS ecosystem
  • Export identities to other AIEOS-compatible systems
  • Maintain behavioral integrity across different AI models

Enable AIEOS

[identity]
format = "aieos"
aieos_path = "identity.json"  # relative to workspace or absolute path

Or inline JSON:

[identity]
format = "aieos"
aieos_inline = '''
{
  "identity": {
    "names": { "first": "Nova", "nickname": "N" }
  },
  "psychology": {
    "neural_matrix": { "creativity": 0.9, "logic": 0.8 },
    "traits": { "mbti": "ENTP" },
    "moral_compass": { "alignment": "Chaotic Good" }
  },
  "linguistics": {
    "text_style": { "formality_level": 0.2, "slang_usage": true }
  },
  "motivations": {
    "core_drive": "Push boundaries and explore possibilities"
  }
}
'''

AIEOS Schema Sections

SectionDescription
identityNames, bio, origin, residence
psychologyNeural matrix (cognitive weights), MBTI, OCEAN, moral compass
linguisticsText style, formality, catchphrases, forbidden words
motivationsCore drive, short/long-term goals, fears
capabilitiesSkills and tools the agent can access
physicalityVisual descriptors for image generation
historyOrigin story, education, occupation
interestsHobbies, favorites, lifestyle

See aieos.org for the full schema and live examples.

Gateway API

EndpointMethodAuthDescription
/healthGETNoneHealth check (always public, no secrets leaked)
/pairPOSTX-Pairing-Code headerExchange one-time code for bearer token
/webhookPOSTAuthorization: Bearer <token>Send message: {"message": "your prompt"}
/whatsappGETQuery paramsMeta webhook verification (hub.mode, hub.verify_token, hub.challenge)
/whatsappPOSTNone (Meta signature)WhatsApp incoming message webhook

Commands

CommandDescription
onboardQuick setup (default)
onboard --interactiveFull interactive 7-step wizard
onboard --channels-onlyReconfigure channels/allowlists only (fast repair flow)
agent -m "..."Single message mode
agentInteractive chat mode
gatewayStart webhook server (default: 127.0.0.1:8080)
gateway --port 0Random port mode
daemonStart long-running autonomous runtime
service install/start/stop/status/uninstallManage user-level background service
doctorDiagnose daemon/scheduler/channel freshness
statusShow full system status
channel doctorRun health checks for configured channels
integrations info <name>Show setup/status details for one integration

Development

cargo build              # Dev build
cargo build --release    # Release build (~3.4MB)
cargo test               # 1,017 tests
cargo clippy             # Lint (0 warnings)
cargo fmt                # Format

# Run the SQLite vs Markdown benchmark
cargo test --test memory_comparison -- --nocapture

Pre-push hook

A git hook runs cargo fmt --check, cargo clippy -- -D warnings, and cargo test before every push. Enable it once:

git config core.hooksPath .githooks

To skip the hook when you need a quick push during development:

git push --no-verify

License

MIT โ€” see LICENSE

Contributing

See CONTRIBUTING.md. Implement a trait, submit a PR:

  • New Provider โ†’ src/providers/
  • New Channel โ†’ src/channels/
  • New Observer โ†’ src/observability/
  • New Tool โ†’ src/tools/
  • New Memory โ†’ src/memory/
  • New Tunnel โ†’ src/tunnel/
  • New Skill โ†’ ~/.zeroclaw/workspace/skills/<name>/

ZeroClaw โ€” Zero overhead. Zero compromise. Deploy anywhere. Swap anything. ๐Ÿฆ€

Timeline

discover2/15/2026
Project Info