Scripts2026年5月31日·1 分钟阅读

NullClaw — Autonomous AI Assistant Infrastructure Written in Zig

The fastest and smallest fully autonomous AI assistant infrastructure, written in Zig for minimal resource usage and maximum portability across platforms.

Agent 就绪

这个资产会安全暂存

这个资产会先安全暂存。复制的指令会要求 Agent 读取暂存文件,并在激活脚本、MCP 配置或全局配置前先确认。

Stage only · 29/100策略:需暂存
Agent 入口
任意 MCP/CLI Agent
类型
Skill
安装
Stage only
信任
信任等级:Established
入口
NullClaw
安全暂存命令
npx -y tokrepo@latest install 28c822b7-5ca8-11f1-9bc6-00163e2b0d79 --target codex

先暂存文件;激活前需要读取暂存 README 和安装计划。

Introduction

NullClaw is an AI personal assistant infrastructure written in Zig, designed for developers who want the smallest possible runtime with the fastest startup. It compiles to a single static binary under 5 MB with zero dependencies, making it deployable anywhere from cloud servers to embedded systems without runtime installation.

What NullClaw Does

  • Provides a fully autonomous AI assistant in a single static binary
  • Supports tool calling, file operations, and shell command execution
  • Runs on any platform Zig targets including Linux, macOS, Windows, and FreeBSD
  • Connects to multiple LLM providers (Anthropic, OpenAI, local endpoints)
  • Manages conversation sessions with persistent memory across restarts

Architecture Overview

NullClaw is built entirely in Zig with no C dependencies or garbage collector overhead. The core runtime implements an event loop that processes user input, dispatches tool calls, and manages LLM API communication using Zig's async I/O. Memory management uses arena allocators for predictable performance with no GC pauses. The binary includes a built-in HTTP client, JSON parser, and terminal UI.

Self-Hosting & Configuration

  • Download a prebuilt static binary or compile from source with Zig 0.13+
  • Configure LLM provider credentials via environment variables or a config file
  • Customize available tools by enabling or disabling built-in capabilities
  • Set memory persistence path for conversation history across sessions
  • Run as a system service for always-available assistant access

Key Features

  • Sub-5 MB static binary with zero external dependencies
  • Instant startup (under 50 ms) for responsive interactive sessions
  • Memory-safe implementation in Zig without garbage collection overhead
  • Cross-compilation to 40+ target platforms from a single source tree
  • Built-in tools for file I/O, HTTP requests, shell execution, and search

Comparison with Similar Tools

  • Claude Code — Node.js-based with larger footprint; NullClaw is a minimal native binary
  • PicoClaw — Go-based lightweight agent; NullClaw is even smaller using Zig
  • OpenCode — TypeScript terminal agent; NullClaw trades ecosystem size for raw performance
  • llama.cpp — C++ inference only; NullClaw includes full agent runtime with tool use

FAQ

Q: Why Zig instead of Rust or Go? A: Zig provides C-level performance with simpler tooling, no hidden allocations, and excellent cross-compilation support, making it ideal for minimal binaries.

Q: Can it run local models? A: Yes. NullClaw can connect to any OpenAI-compatible local endpoint including Ollama and llama.cpp servers.

Q: Does it support plugins? A: Tools are defined as configuration entries that map to shell commands. Custom tools can be added without recompiling.

Q: What is the memory footprint at runtime? A: Typical sessions use under 20 MB of RAM, including conversation context and tool state.

Sources

讨论

登录后参与讨论。
还没有评论,来写第一条吧。

相关资产