RustyClaw 🦀🦞
A lightweight, secure agentic AI runtime written in Rust.
RustyClaw is a drop-in Rust implementation of OpenClaw — the agentic AI assistant that lives in your terminal. It brings the same powerful 30-tool ecosystem with improved security, lower memory footprint, and native performance.
Why RustyClaw?
| Feature | RustyClaw | OpenClaw (Node.js) |
|---|---|---|
| Memory usage | ~15 MB | ~150 MB |
| Startup time | <50 ms | ~500 ms |
| Binary size | ~8 MB | ~200 MB (with node) |
| Sandbox isolation | Built-in (bwrap/Landlock/macOS) | External only |
| Secrets vault | AES-256 + TOTP | External (1Password, etc.) |
| Language | Rust 🦀 | TypeScript |
Security-First Design
RustyClaw was built with the assumption that AI agents can't always be trusted. The security model includes:
- Encrypted secrets vault — AES-256 encryption for API keys, credentials, SSH keys
- TOTP two-factor authentication — Optional 2FA for vault access
- Per-credential access policies — Always, WithApproval, WithAuth, SkillOnly
- Sandbox isolation — Bubblewrap (Linux), Landlock (Linux 5.13+), sandbox-exec (macOS)
- Credentials directory protection — Agent tools cannot read the secrets directory
Quick Start
Install from crates.io
With optional features
# Matrix messenger support
# Browser automation (CDP)
# All publishable features
📝 Signal messenger requires building from source. See BUILDING.md.
Or build from source
Run the interactive setup
Start chatting
Features
30 Agentic Tools
RustyClaw implements the complete OpenClaw tool ecosystem:
| Category | Tools |
|---|---|
| File Operations | read_file, write_file, edit_file, list_directory, search_files, find_files |
| Code Execution | execute_command, process, apply_patch |
| Web Access | web_fetch, web_search |
| Memory | memory_search, memory_get |
| Scheduling | cron |
| Multi-Agent | sessions_list, sessions_spawn, sessions_send, sessions_history, session_status, agents_list |
| Secrets | secrets_list, secrets_get, secrets_store |
| System | gateway, message, tts |
| Devices | browser, canvas, nodes, image |
Skills System
Load skills from the OpenClaw ecosystem or write your own:
name: my-skill
description: A custom skill
metadata: {"openclaw": {"requires": {"bins": ["git"]}}}
Do something useful with git.
Skills support gating — require binaries, environment variables, or specific operating systems.
Multi-Provider Support
Connect to any major AI provider:
- Anthropic (Claude 4, Claude Sonnet)
- OpenAI (GPT-4, GPT-4o)
- Google (Gemini Pro, Gemini Ultra)
- GitHub Copilot (with subscription)
- xAI (Grok)
- Ollama (local models)
- OpenRouter (any model)
Terminal UI
A beautiful TUI with:
- Syntax-highlighted code blocks
- Markdown rendering
- Tab completion
- Slash commands (
/help,/clear,/model,/secrets) - Streaming responses
Gateway Mode
Run as a daemon for integration with other tools:
Supports WebSocket connections, heartbeats, and multi-session management.
Configuration
Configuration lives at ~/.rustyclaw/config.toml:
= "/Users/myuser/.rustyclaw"
= []
= true
= true
= true
= false
= "A Rusty Little Crab"
= 1
= 5
[]
= "openrouter"
= "gpt-4.1"
= "https://openrouter.ai/api/v1"
[]
= ""
= []
= []
Documentation
- Building — Feature flags, Signal support, cross-compilation
- Getting Started — Installation and first run
- Security Model — How RustyClaw protects your secrets
- Tools Reference — All 30 tools explained
- Skills Guide — Writing and using skills
- Gateway Protocol — WebSocket API reference
Testing
RustyClaw has comprehensive test coverage:
# Run all tests (330+)
# Run specific test suites
Community
- 💬 Discord — Join the OpenClaw community
- 🐛 Issues — Bug reports and feature requests
- 🔧 ClawhHub — Find and share skills
Contributing
Contributions welcome! See CONTRIBUTING.md for guidelines.
License
MIT License — See LICENSE for details.
Acknowledgments
- OpenClaw — The original project and inspiration
- The Rust community for excellent crates