Documentation Index
Fetch the complete documentation index at: https://mintlify.com/nullclaw/nullclaw/llms.txt
Use this file to discover all available pages before exploring further.
Overview
NullClaw is built on a vtable-driven pluggable architecture where every subsystem implements a common interface pattern. This design enables zero-overhead abstraction with full runtime swappability — change any component via configuration, no code changes required.Core Design Principles
1. Vtable Interface System
Every subsystem uses Zig’s type-erased interface pattern (vtable-based polymorphism):- Zero runtime overhead: Direct function pointers, no dynamic dispatch
- Compile-time safety: Type checking at build time
- Runtime flexibility: Swap implementations via config
- No allocator overhead: Static vtables, minimal indirection
2. No Dependencies
NullClaw depends only on:libc(standard C library)sqlite(optional, for memory backends)
3. Static Binary
The entire runtime compiles to a single static binary:- Boots in <2 ms on Apple Silicon
- Runs on $5 hardware (any ARM/x86/RISC-V board)
- Deploys with
scp— no installation, no package manager
Subsystem Table
Every subsystem implements a vtable interface:| Subsystem | Interface | Ships With | Extend |
|---|---|---|---|
| AI Models | Provider | 22+ 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 |
| Channels | Channel | CLI, Telegram, Signal, Discord, Slack, iMessage, Matrix, WhatsApp, Webhook, IRC, Lark/Feishu, OneBot, Line, DingTalk, Email, Nostr, QQ, MaixCam, Mattermost | Any messaging API |
| Memory | Memory | SQLite (hybrid FTS5 + vector cosine similarity), Markdown | Any persistence backend |
| Tools | Tool | shell, file_read, file_write, file_edit, memory_store, memory_recall, memory_forget, browser_open, screenshot, composio, http_request, hardware_info, hardware_memory, and more | Any capability |
| Observability | Observer | Noop, Log, File, Multi | Prometheus, OTel |
| Runtime | RuntimeAdapter | Native, Docker (sandboxed), WASM (wasmtime) | Any runtime |
| Security | Sandbox | Landlock, Firejail, Bubblewrap, Docker, auto-detect | Any sandbox backend |
| Identity | IdentityConfig | OpenClaw (markdown), AIEOS v1.1 (JSON) | Any identity format |
| Tunnel | Tunnel | None, Cloudflare, Tailscale, ngrok, Custom | Any tunnel binary |
| Heartbeat | Engine | HEARTBEAT.md periodic tasks | — |
| Skills | Loader | TOML manifests + SKILL.md instructions | Community skill packs |
| Peripherals | Peripheral | Serial, Arduino, Raspberry Pi GPIO, STM32/Nucleo | Any hardware interface |
| Cron | Scheduler | Cron expressions + one-shot timers with JSON persistence | — |
Data Flow
Message Flow (Channel → Agent)
- Channel receives message (Telegram webhook, Discord WebSocket, CLI stdin, etc.)
- Channel vtable normalizes to
ChannelMessagestruct - Gateway/Daemon routes to agent session
- Agent loop appends to conversation context
- Provider vtable sends to LLM API
- Response parsing extracts text/tool calls
- Tool dispatch executes via
Toolvtable - Memory storage persists via
Memoryvtable - Outbound delivery via
Channel.send()
Security Layers
Every request passes through:- Pairing check (gateway authentication)
- Channel allowlist (sender validation)
- Workspace scoping (filesystem boundaries)
- Sandbox isolation (OS-level containment)
- Audit logging (signed event trail)
All subsystems are fail-safe by default: deny-by-default access, explicit opt-in for elevated permissions, structured error propagation.
Extension Points
Adding a New Provider
Adding a New Channel
Performance Characteristics
| Metric | Value | Why |
|---|---|---|
| Binary Size | 678 KB | Zero dependencies, Zig comptime optimization |
| Startup Time | <2 ms | No runtime init, static binary |
| Memory Usage | ~1 MB | No GC, explicit allocations |
| Test Coverage | 3,230+ tests | Comprehensive subsystem validation |
| Dispatch Overhead | ~0 ns | Direct function pointers |
NullClaw’s vtable pattern has zero runtime overhead compared to direct function calls — the vtable is resolved at init time, then all calls are direct jumps.
Next Steps
Providers
Learn about AI model provider integration
Channels
Explore messaging platform channels
Tools
Understand tool execution system
Memory
Deep dive into memory backends