Back to services

NullClaw

Fastest, smallest, and fully autonomous AI assistant infrastructure written in Zig

View alternatives to NullClaw
Suggest edit
Open source
Self-hostable
MIT
Recent reviews

Alternatives

Tech stack

No tech stack added yet. Sign in to suggest some

Overview

NullClaw is an execution engine for autonomous AI agents, written in Zig with no external dependencies and no garbage collector (GC), and it compiles to a single binary. It integrates model providers, tool execution, contextual memory, and multi-channel gateways, covering everything from running locally to deploying in production. It is part of the NullHub ecosystem and can be used together with NullHub's other components.

Key figures listed on the official website:

  • 19 top-level CLI commands
  • 0 external dependencies
  • Built with Zig, single binary, no GC
  • Supports both a terminal and a web interface

Core Capabilities

Universal Model Multiplexing Layer (Providers)

This is a high-throughput model abstraction layer that supports OpenRouter, OpenAI-compatible APIs, and custom local or remote endpoints.

  • Automatic model discovery and selection
  • Supports streaming and non-streaming completions
  • Rotates API keys and handles rate limits

Tool Execution Engine (Tools)

Safely executes shell commands, file operations, and custom scripts, with approval policies and strict sandbox limits.

  • Built-in file, shell, and search tools
  • Configurable auto-approve lists and deny lists
  • Control over execution timeouts and resource usage

Communication Channels (Channels)

Offers three modes, terminal, WebSocket, and headless gateway, making it easy to plug into different runtime scenarios or external infrastructure.

  • Terminal mode: local interactive sessions
  • WebChannel v1 protocol: for browser clients
  • Gateway mode: headless worker execution

Context and Memory (Memory)

Manages conversation history and persistent state, and automatically optimizes the context window, which suits long-running, multi-turn agent tasks.

  • Automatic context window compression
  • Sessions can be saved and restored after a restart
  • Remembers tool output in a structured way

Use Cases

  • Interactive agent sessions: Suited to having a dedicated assistant complete complex multi-step tasks end to end. In terminal mode, you can have it refactor code, run tests, and submit PRs, with a human in the loop supervising throughout.
  • Headless worker execution: Suited to unattended automated background pipelines. Deployed in gateway mode, it can receive tasks dispatched directly by orchestrators such as NullBoiler.
  • Browser-based operation: Suited to teams that need a visual control panel. Paired with the NullHub ecosystem's chat interface, you can see live streaming output and a tool execution timeline, and handle human approvals in the UI.

Quick Start

You need to install the Zig toolchain first to build from source:

# 克隆并构建
git clone https://github.com/nullclaw/nullclaw.git
cd nullclaw
zig build -Doptimize=ReleaseSmall

# 配置模型提供商
./zig-out/bin/nullclaw onboard --provider openrouter --api-key <YOUR_KEY>

# 启动交互式智能体会话
./zig-out/bin/nullclaw agent -m "hello from nullclaw"

You can also install the whole suite of components in one go through NullHub (https://nullhub.io).

Highlights

  • Lightweight and easy to deploy: A single binary with no external libraries, making distribution and deployment simple.
  • Good performance: Implemented in Zig with no GC, so resource overhead is low.
  • Works with many models: Can connect to OpenRouter, OpenAI-compatible interfaces, and local model endpoints.
  • Controlled execution: Constrains agent behavior through approval policies, sandboxing, and resource limits.
  • Ecosystem support: Can be combined with components such as NullHub and NullBoiler to build a complete agent platform.
  • Source code is hosted on GitHub: https://github.com/nullclaw/nullclaw