freshcrate
Skin:/
Home > AI Agents > RustClaw

RustClaw

Lean Rust AI agent: 6MB binary, 7.9MB RAM. OpenClaw replacement. Telegram + Discord + GitHub auto-PR. Ollama/Anthropic support.

Why this rank:Release freshnessStrong adoptionHealthy release cadence

Description

Lean Rust AI agent: 6MB binary, 7.9MB RAM. OpenClaw replacement. Telegram + Discord + GitHub auto-PR. Ollama/Anthropic support.

README

RustClaw

AI Agent Framework โ€” in Rust

A lean replacement for OpenClaw.
Single binary. 22 tools. Three-tier memory. Telegram + Discord + MCP.

License: MIT Rust Built with Claude Code

7.5 MB binary ยท 14 MB RAM ยท 5,296 lines ยท 98.9% BFCL ยท 95.5% T-Eval ยท 4.3ร— faster with MoE

Quick Start ยท Features ยท Benchmark ยท Architecture ยท Roadmap

๐ŸŒ ็น้ซ”ไธญๆ–‡ ยท ็ฎ€ไฝ“ไธญๆ–‡ ยท ํ•œ๊ตญ์–ด


Why RustClaw?

The idea started with a simple observation: someone rewrote OpenClaw in Go and cut memory usage from 1GB+ down to 35MB. That was impressive. But we asked โ€” could we go further?

Most people don't need 430,000 lines of TypeScript. They need an agent that talks to Telegram, reads their files, runs their code, and opens a GitHub PR when something breaks. That's it.

RustClaw is the 80/20 version of OpenClaw โ€” the features that matter, in a single cargo build.

RustClawOpenClaw
๐Ÿ“ฆ Binary7.5 MB staticrequires Node.js 24 + npm
๐Ÿ’พ Idle RAM14 MB1 GB+
โšก Startup< 100 ms5โ€“10 s
๐Ÿ“ Code5,296 lines~430,000 lines
๐Ÿง  MemoryThree-tier (vector + graph + history)Basic session
๐Ÿ”ง Tools22 built-in + MCPPlugin system
๐Ÿค– LLMAnthropic, OpenAI, Ollama, GeminiOpenAI
๐Ÿ“ฑ ChannelsTelegram, Discord, WebSocketWeb UI

Note

RustClaw is not trying to replace OpenClaw. It's proof that the core of what makes an AI agent useful doesn't require a gigabyte of RAM. It requires good architecture, the right language, and the willingness to start over with clearer constraints.

Built entirely with Claude Code by Ad Huang. Zero human-written code.


๐Ÿ’ก Key Advantages

๐Ÿชถ Runs anywhere โ€” 7.5 MB binary, 14 MB RAM. Raspberry Pi, $5 VPS, or your laptop. No Node.js, no Python, no Docker required.

๐Ÿง  Remembers everything โ€” Three-tier memory (vector + graph + history) with mixed-mode scoping. Tell the bot your name in Telegram, it remembers in Discord. Facts auto-extracted, contradictions auto-resolved.

๐Ÿ›ก๏ธ Safe by design โ€” 14 dangerous command patterns blocked. Tool output truncated. Patch files verified before modification. Error retry with auto-recovery. 120s timeout with graceful fallback.

๐Ÿ”ง Actually does things โ€” 98.9% on the industry-standard BFCL benchmark (1,000 questions). The bot reads your files, runs your commands, creates PRs โ€” it doesn't just describe what it would do.

๐Ÿ”Œ MCP-ready โ€” Connect any MCP server. Tools auto-discovered and routed transparently. Your LLM sees one unified tool list โ€” local and remote, no difference.

๐Ÿ“ˆ Benchmarked and proven โ€” 1,000-question BFCL + 2,146-question T-Eval + 500-question internal benchmark. Dual-model strategy: MoE for speed (2.6s/q), dense for accuracy (99.7%).

โš™๏ธ Claude Code inspired โ€” Understand-first tool ordering, history compression, workspace context loading, error retry hints. The same patterns that make Claude Code effective, applied to an open-source agent.


๐Ÿš€ Quick Start

One-line Install (recommended)

macOS / Linux:

curl -sSL https://raw.githubusercontent.com/Adaimade/RustClaw/main/install.sh | sh

Windows (PowerShell):

irm https://raw.githubusercontent.com/Adaimade/RustClaw/main/install.ps1 | iex

This downloads the pre-built binary, adds it to PATH, and creates a default config. Works on macOS (Intel/Apple Silicon), Linux (x86/ARM), and Windows.

Build from Source

Requirement Install
Rust 1.85+ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
LLM backend Ollama, OpenAI, Anthropic, or Gemini
git clone https://github.com/Adaimade/RustClaw.git && cd RustClaw
cargo build --release && strip target/release/rustclaw
# โ†’ target/release/rustclaw (7.5 MB)

Configure

mkdir -p ~/.rustclaw
cp config.example.toml ~/.rustclaw/config.toml
Ollama (local) Anthropic Gemini
[agent]
provider = "openai"
api_key = "ollama"
base_url = "http://127.0.0.1:11434"
model = "qwen2.5:32b"
[agent]
provider = "anthropic"
api_key = "sk-ant-..."
model = "claude-sonnet-4-20250514"
[agent]
provider = "openai"
api_key = "your-key"
base_url = "https://generativelanguage.googleapis.com/v1beta/openai"
model = "gemini-2.5-flash"

Security: RustClaw binds to 0.0.0.0 by default for cloud deploy. Never put API keys in code โ€” use ~/.rustclaw/config.toml (gitignored) or environment variables (RUSTCLAW__AGENT__API_KEY).

Run

# Start everything (gateway + channels + cron + memory)
rustclaw gateway

# One-shot agent call with tool access
rustclaw agent "List all .rs files and count total lines of code"

# GitHub operations
rustclaw github scan
rustclaw github fix 123

โœจ Features

๐Ÿ”ง Tool Calling (Agentic Loop)

22 built-in tools with autonomous execution. Supports Anthropic and OpenAI function calling. Max 10 iterations per request.

Layered tool loading โ€” understand first, then act, then check:

๐Ÿ‘๏ธ Understand              โšก Act                    ๐Ÿ” Check
โ”œโ”€โ”€ read_file              โ”œโ”€โ”€ run_command           โ”œโ”€โ”€ process_check
โ”œโ”€โ”€ list_dir               โ”œโ”€โ”€ write_file            โ”œโ”€โ”€ docker_status
โ””โ”€โ”€ search_code            โ””โ”€โ”€ patch_file            โ”œโ”€โ”€ system_stats
                                                     โ”œโ”€โ”€ http_ping
๐Ÿ’ฌ Discord (on-demand)     ๐Ÿ“ง Email (on-demand)      โ”œโ”€โ”€ pm2_status
โ”œโ”€โ”€ create/delete channel  โ”œโ”€โ”€ fetch_inbox           โ””โ”€โ”€ process_list
โ”œโ”€โ”€ create_role/set_topic  โ”œโ”€โ”€ read_email
โ””โ”€โ”€ kick/ban_member        โ””โ”€โ”€ send_email

Safety: 14 dangerous patterns blocked ยท output truncated to 4000c ยท patch verification ยท error retry hints ยท 120s graceful timeout

๐Ÿง  Three-Tier Memory

Memory is delegated to R-Mem โ€” a separate Rust crate that handles vector recall, fact extraction, contradiction resolution, and entity-relation graphs. RustClaw is a thin wrapper that adds mixed-mode scoping on top.

Mixed-mode recall โ€” three scopes merged on every query:

Scope Example Shared across
Local telegram:-100xxx Single group
User user:12345 All channels for one person
Global global:system Everyone

๐Ÿ“ฑ Channels

Channel Features
Telegram Long polling ยท streaming edit ยท ACL ยท session history
Discord @mention ยท server management ยท scan / fix issue #N / pr status
Gateway OpenClaw-compatible WebSocket on :18789/ws

๐Ÿ”Œ MCP Client

[mcp]
servers = [
  { name = "fs", command = "npx @modelcontextprotocol/server-filesystem /tmp" },
]

๐Ÿ™ GitHub ยท โฐ Cron ยท ๐Ÿ“ง Email

Auto-scan repos ยท auto-PR from issues ยท system monitoring alerts ยท email classification โ€” all scheduled via cron, notifications to Discord.


๐Ÿ“Š Benchmark

Berkeley Function Calling Leaderboard (BFCL)

Tested on the official Gorilla BFCL benchmark โ€” the industry standard for evaluating function calling. Dual-model comparison on Mac Mini 2024 (M4 Pro, 64 GB):

Test qwen3-coder:30b (MoE) qwen2.5:32b (dense) Speed diff
simple_python (400) 100% ยท 1.5s/q 99.75% ยท 7.3s/q 4.9ร—
multiple (200) 97% ยท 2.4s/q 99.5% ยท 8.4s/q 3.5ร—
parallel (200) 99.5% ยท 2.9s/q 100% ยท 12.0s/q 4.1ร—
parallel_multiple (200) 98% ยท 3.4s/q 100% ยท 15.7s/q 4.6ร—
Overall (1,000) 98.9% ยท 2.6s/q 99.7% ยท 10.8s/q 4.3ร—

MoE model trades -0.8% accuracy for 4.3ร— speed. Both models exceed 98% across all categories.

T-Eval (Shanghai AI Lab)

Tested on T-Eval โ€” Shanghai AI Lab's tool-use evaluation suite covering planning, retrieval, review, and instruction following:

Test Score Questions Speed
T-Eval retrieve 98% (542/553) 553 14.5s/q
T-Eval plan 96% (535/553) 553 25.6s/q
T-Eval review 96% (472/487) 487 3.5s/q
T-Eval instruct 92% (514/553) 553 8.2s/q

2,146 questions across four core categories. Average 95.5% โ€” strong tool selection, multi-step planning, and self-review.

Internal Benchmark

500-question tool calling benchmark (qwen2.5:32b, local Ollama). Not yet re-tested on qwen3-coder:30b:

Version Total Timeout Speed
v3 baseline 81% 74 44s/q
v4 timeout fix 85% 3 36s/q
v5 optimized 97% 0 38s/q
Category v5 Score
Core operations 92%
Basic tools 95%
Medium tasks 100%
Advanced reasoning 98%
Hallucination traps 100%
Multi-step chains 99%

Benchmark questions available at AI-Bench.


๐Ÿ—๏ธ Architecture

src/
โ”œโ”€โ”€ main.rs              CLI dispatch + startup
โ”œโ”€โ”€ cli/mod.rs           clap subcommands
โ”œโ”€โ”€ config.rs            TOML + env config
โ”œโ”€โ”€ gateway/             WebSocket server + protocol + handshake
โ”œโ”€โ”€ agent/runner.rs      LLM streaming + agentic loop + history compression
โ”œโ”€โ”€ channels/            Telegram (teloxide) + Discord (serenity)
โ”œโ”€โ”€ tools/               22 tools: fs, shell, search, discord, email, system, github, mcp
โ”œโ”€โ”€ session/             SessionStore (history) + MemoryManager (R-Mem wrapper)
โ””โ”€โ”€ cron/                Scheduled jobs (system, email, GitHub)

27 files ยท 5,296 lines ยท 7.5 MB binary ยท Zero external services


๐Ÿ—บ๏ธ Roadmap

Status Feature
โœ… Tool calling (22 tools + agentic loop)
โœ… Three-tier memory (vector + graph + mixed scope)
โœ… Telegram + Discord channels
โœ… MCP client (transparent tool routing)
โœ… GitHub integration (scan + auto-PR)
โœ… System monitoring + cron alerts
โœ… Email (IMAP + SMTP)
โœ… SQLite persistence
โœ… Cross-platform install (macOS / Linux / Windows)
โœ… Multi-model routing (per-channel model override via config)
๐Ÿ”ฒ Slack / LINE channels
๐Ÿ”ฒ Prometheus metrics

Community contributions welcome โ€” open an issue or PR.


MIT License ยท v0.5.0

Created by Ad Huang with Claude Code

The framework is there. The rest is up to the community.

Release History

VersionChangesUrgencyDate
v0.5.0**Full Changelog**: https://github.com/Adaimade/RustClaw/compare/v0.3.0...v0.5.0High4/12/2026
v0.1.0## RustClaw v0.1.0 First public release. **Stats** - Binary: 6MB - Idle RSS: 7.9MB - Startup: < 100ms - Lines of code: 4,312 **Features** - Gateway WebSocket (OpenClaw-compatible protocol) - Telegram + Discord channels - Tool calling agentic loop (read/write files, exec, search) - GitHub auto-PR - Ollama + Anthropic support - Zeabur one-click deploy Built entirely with Claude Code.High4/7/2026

Dependencies & License Audit

Loading dependencies...

Similar Packages

openclaw-model-bridgeConnect any LLM to OpenClaw โ€” production-tested middleware for Qwen3-235B and beyondmain@2026-06-03
@robota-sdk/agent-coreComplete AI agent implementation with unified core and tools functionality - conversation management, plugin system, and advanced agent featuresmain@2026-06-05
moltisA secure persistent personal agent server in Rust. One binary, sandboxed execution, multi-provider LLMs, voice, memory, Telegram, WhatsApp, Discord, Teams, and MCP tools. Secure by design, runs on you20260603.01
SeekerClawTurn your Solana Seeker (or any Android phone) into a 24/7 personal AI agentv2.0.0
aitools_clientSeth's AI Tools: A Unity based front end that uses ComfyUI and LLMs to create stories, images, movies, quizzes and postersmain@2026-05-17

More in AI Agents

@blockrun/franklinFranklin โ€” The AI agent with a wallet. Spends USDC autonomously to get real work done. Pay per action, no subscriptions.
hermes-agentThe agent that grows with you
awesome-copilotCommunity-contributed instructions, agents, skills, and configurations to help you make the most of GitHub Copilot.
e2bE2B SDK that give agents cloud environments