n0-space/zeroclaw — Lightweight Rust AI Agent Framework

- **Source:** https://github.com/n0-space/zeroclaw - **License:** MIT Copyright 2025 ZeroClaw Labs - **Language:** Rust 169 .rs files, 13 Cargo.toml

n0-space/zeroclaw — Lightweight Rust AI Agent Framework

Metadata

Purpose

“Zero overhead. Zero compromise. 100% Rust. 100% Agnostic.” Fast, small, and fully autonomous AI assistant infrastructure. Deploy anywhere. Swap anything.

Key Metrics

  • Binary size: ~3.4MB
  • RAM usage: <5MB (99% smaller than OpenClaw)
  • Startup time: <10ms (400X faster than OpenClaw)
  • Hardware: Runs on $10 hardware (Raspberry Pi, ARM, x86, RISC-V)
  • Providers: 23+ AI providers supported
  • Traits: 8 core traits (pluggable everything)

Architecture

Core Traits (Pluggable)

  1. Providers — LLM backends (OpenAI, Anthropic, etc.)
  2. Channels — Messaging transports (Discord, Telegram, etc.)
  3. Tools — Actions (web, file, shell, memory)
  4. Memory — State persistence
  5. Tunnels — Network bridging
  6. Approval — Human-in-the-loop
  7. Cron — Scheduled tasks
  8. RAG — Retrieval-augmented generation

Source Structure

src/
  main.rs              — Entry point
  lib.rs               — Library root
  gateway/             — Gateway layer (channel adapters)
  approval/            — Approval system
  cron/                — Cron scheduler (types, store, scheduler, schedule)
  hardware/            — Hardware registry, discovery, introspection
  migration/           — Data migration
  onboard/             — Onboarding wizard
  rag/                 — RAG system
  tools/               — Tool implementations (http_request, cron_remove, screenshot)
  doctor/              — Diagnostics
  workspace/           — Workspace management
  jobs/                — Job queue
  chat/                — Chat handling
  auth/                — Authentication
  config/              — Configuration
  events/              — Event system
  progress/            — Progress tracking
  runner/              — Agent runner
  setup/               — Setup flow
  subscriptions/       — Subscriptions
  worktrees/           — Worktree management
  local_sessions.rs    — Local session management
  paths.rs             — Path utilities

Firmware Targets

  • firmware/zeroclaw-nucleo/ — STM32F401RE (ARM Cortex-M4)
  • firmware/zeroclaw-esp32/ — ESP32 (RISC-V)
  • firmware/zeroclaw-esp32-ui/ — ESP32 with UI

Relevance to Kapnet

As Mac Agent Runtime

ZeroClaw could replace full Hermes on Mac:

  • 5MB binary vs 10GB+ Hermes venv
  • <10ms startup vs minutes
  • Native Rust (no Node.js/Python overhead)
  • Pluggable providers (can add Kapnet Nostr provider)
  • Built-in cron (replaces our shell cron)
  • Built-in RAG (for Querant research)

Kapnet Integration Points

  1. Nostr Provider Plugin — Subscribe/publish TXXMs via Nostr relay
  2. TXXM Tool Plugin — Submit/validate TXXMs as agent actions
  3. Braid Memory Plugin — Persist agent state in Kapnet braid
  4. KScript Execution Tool — Execute KScript programs

Comparison: ZeroClaw vs Our Current Stack

Feature ZeroClaw Our Stack
Binary size 3.4MB 10GB+ (Hermes venv)
Startup <10ms Minutes
RAM <5MB 769MB+ (Hermes alone)
Language Rust Python + Node.js
Providers 23+ built-in OpenRouter API only
Cron Built-in Shell scripts
RAG Built-in None
Channels Discord, Telegram, etc. Nostr (via bridge)
Tools Web, file, shell, memory Terminal, file, browser
License MIT MIT + AGPL components

Action Items

  1. Evaluate ZeroClaw as Mac agent runtime replacement
  2. Design Kapnet Nostr provider plugin
  3. Design TXXM tool plugin
  4. Test on Mac Mini when available
  5. Consider embedded deployment (STM32/ESP32) for edge agents

Write a comment