OpenKrab is a personal AI assistant designed for self-hosted use across your own devices. The project is implemented in Rust to provide strong performance, predictable resource usage, and memory safety.
OpenKrab integrates with familiar messaging channels (Telegram, Slack, Discord, Signal, WhatsApp, iMessage/BlueBubbles, Matrix, Google Chat, IRC, Microsoft Teams, WebChat) and provides:
- Native Rust performance with low startup overhead
- Efficient memory profile for long-running workloads
- Single-binary deployment across supported platforms
- Compile-time memory safety guarantees
OpenKrab is a Rust implementation inspired by OpenKrab (TypeScript/Node.js), extended with additional runtime capabilities.
Features Β· Quick Start Β· Architecture Β· Channels Β· Providers
| Metric | OpenKrab | NanoBot | PicoClaw | OpenKrab | ZeroClaw |
|---|---|---|---|---|---|
| Language | TypeScript | Python | Go | Rust | Rust |
| RAM | >1GB | >100MB | <10MB | ~50MB | <5MB |
| Binary Size | ~28MB | N/A | ~8MB | ~16MB | ~8.8MB |
| Startup | >500s | >30s | <1s | ~46ms | <10ms |
| Cost | Mac Mini $599 | ~$50 | $10 | $10 | $10 |
Notes: OpenKrab measured on Windows x86_64, Feb 2026. Binary size is release build. Startup time is CLI --version. RAM is typical runtime memory.
- Multi-agent system β Route different channels to different AI personalities
- Tool use β AI can execute shell commands, browse web, process media
- Streaming responses β Real-time token streaming for natural feel
- Context management β Intelligent conversation history handling
- Memory system β AI remembers facts across conversations (vector + text search)
- Hybrid search β Combine vector similarity + full-text search
- MMR reranking β Maximal Marginal Relevance for diverse results
- Temporal decay β Older memories fade naturally
- Query expansion β Automatic keyword extraction (EN/ZH)
- Embeddings β OpenAI, Gemini, Voyage, Ollama providers
- DM pairing β Unknown senders get pairing codes
- Allowlists β
allow_fromcontrols who can interact - Rate limiting β Per-user and global rate limits
- Input sanitization β XSS prevention, content filtering
- Sandbox mode β Docker isolation for non-main sessions
- Audit logging β Comprehensive security event logging
- MFA/OAuth2 β Enterprise authentication support
- Web Dashboard β Beautiful, responsive UI for monitoring agents
- Live Tracking β View active sessions, stats, and AI memory in real-time
- Configuration Management β Easy visual editor for system config
- Voice wake mode β "Hey openkrab" activation
- Talk mode β Continuous conversation with auto-sleep
- VAD β Voice Activity Detection
- Spectral analysis β FFT, spectral features
- Beep generation β Audio feedback
- Microphone capture β Real-time audio input
- WASM runtime β Cross-platform plugin execution via Wasmtime
- Hot reload β Development workflow with auto-reload
- Sandboxing β Security isolation (4 levels)
- Dynamic loading β Native libraries + WASM
- Hook system β Event-driven plugin architecture
- CDP (Chrome DevTools Protocol) β Full browser control
- Connection pooling β Efficient session management
- Multi-tab support β Handle multiple browser tabs
- Screenshots & snapshots β Visual testing and debugging
- Network interception β Monitor and modify requests
- Agent-to-UI protocol β Render dynamic interfaces
- Surface management β Multiple canvas surfaces
- Component system β Reusable UI components
- Theme support β Customizable appearance
| Feature | TypeScript (Node.js) | Rust (OpenKrab) |
|---|---|---|
| Performance | V8 JIT limitations | Native compiled, 5x faster |
| Memory Safety | Runtime errors possible | Compile-time guarantees |
| Startup Time | ~1-2 seconds | Instant (<100ms) |
| Memory Usage | 200-500MB+ | <100MB typical |
| Concurrency | Single-threaded event loop | True async with Tokio |
| Deployment | Requires Node.js runtime | Single static binary |
| Security | Best-effort | Memory-safe by design |
# Clone the repository
git clone https://github.com/openkrab/openkrab.git
cd openkrab
# Build optimized release binary
cargo build --release
# Binary location: target/release/openkrab
./target/release/openkrab --helpDownload from GitHub Releases for your platform:
- Linux (x64, ARM64)
- macOS (Intel, Apple Silicon)
- Windows (x64)
# Start the gateway server
openkrab gateway --port 18789
# Configure your AI provider
openkrab config set providers.openai.api_key "sk-..."
# Send messages
openkrab telegram --to @username --text "Hello from OpenKrab!"
openkrab discord --to 123456789 --text "Hello from OpenKrab!"
openkrab whatsapp --to +1234567890 --text "Hello from OpenKrab!"
# Talk to your AI assistant
openkrab ask "What's on my calendar today?"
openkrab ask "Summarize my recent emails"
# Voice commands
openkrab voice wake
openkrab voice speak "Hello World"
openkrab voice status
# Plugin management
openkrab plugin list
openkrab plugin load ./plugins/my-plugin
# Check system status
openkrab status
openkrab doctor
# Interactive configuration
openkrab configure
# Memory operations (AI knowledge base)
openkrab memory sync --path ./docs
openkrab memory search "machine learning concepts"
openkrab memory index --recursive ./knowledge-base
# Browser automation
openkrab browser open https://example.com
openkrab browser screenshotThe system is organized around a gateway control plane that receives channel events, routes sessions, and coordinates AI/runtime services.
flowchart TB
subgraph Clients["Messaging Channels"]
Telegram["Telegram"]
Slack["Slack"]
Discord["Discord"]
WhatsApp["WhatsApp"]
Signal["Signal"]
iMessage["iMessage"]
WebChat["WebChat"]
end
subgraph GatewayPlane["Gateway (Rust/Tokio)"]
GatewayCore["WebSocket and HTTP Server"]
Sessions["Sessions Manager"]
Channels["Channels Registry"]
Auth["Authentication & Rate Control"]
end
subgraph Runtime["Core Runtime"]
Agents["AI Agents"]
Memory["Memory - Vector + Full-text Search"]
Providers["Model Providers"]
Tools["Tools - Shell, Web, Media, Browser"]
Voice["Voice - Wake/VAD/TTS"]
end
subgraph Plugins["Plugin System (WASM)"]
WASM["Wasmtime Runtime"]
HotReload["Hot Reload"]
Sandbox["Sandbox Security"]
end
Telegram --> GatewayCore
Slack --> GatewayCore
Discord --> GatewayCore
WhatsApp --> GatewayCore
Signal --> GatewayCore
iMessage --> GatewayCore
WebChat --> GatewayCore
GatewayCore --> Agents
GatewayCore --> Memory
GatewayCore --> Providers
GatewayCore --> Tools
GatewayCore --> Voice
Agents --> Plugins
| Channel | Status | Features | Lines |
|---|---|---|---|
| Telegram | β Complete | Bot API, polling, webhooks, media | ~1,200 |
| Discord | β Complete | Gateway, threads, reactions, moderation | ~2,500 |
| Slack | β Complete | Bolt events, blocks, threading | ~1,800 |
| β Complete | Cloud API, Business API | ~1,500 | |
| Signal | β Complete | signal-cli integration | ~800 |
| iMessage | β Complete | BlueBubbles bridge | ~1,200 |
| Matrix | β Complete | Matrix.org protocol | ~900 |
| Google Chat | β Complete | Chat API | ~600 |
| IRC | β Complete | IRC protocol | ~500 |
| Microsoft Teams | β Complete | Bot Framework | ~700 |
| Mattermost | β Complete | Webhooks | ~400 |
| Twitch | β Complete | IRC + API | ~600 |
| Zalo | β Complete | Zalo API | ~500 |
| Feishu/Lark | β Complete | Lark API | ~450 |
| Nextcloud Talk | β Complete | Talk API | ~400 |
| Nostr | β Complete | Nostr protocol | ~550 |
| LINE | β Complete | LINE API | ~600 |
| WebChat | β Complete | WebSocket/HTTP | ~800 |
| Provider | Status | Auth | Models |
|---|---|---|---|
| OpenAI | β | API Key | GPT-4, GPT-4o, GPT-3.5 |
| Anthropic | β | API Key | Claude 3.5/3 Opus/Sonnet/Haiku |
| Gemini | β | API Key / OAuth | Gemini 1.5 Pro/Flash |
| Ollama | β | Local | Llama, Mistral, CodeLlama, etc. |
| GitHub Copilot | β | OAuth | GPT-4 powered |
| MiniMax | β | OAuth | MiniMax models |
| Qwen | β | OAuth | Qwen models |
# Voice control
openkrab voice wake # Force wake
openkrab voice sleep # Force sleep
openkrab voice status # Show voice status
openkrab voice speak "Hello" # TTS output
openkrab voice beep wake # Play wake beep
# Audio analysis
openkrab voice analyze_audio file.wav # Analyze audio file
openkrab voice detect "hey openkrab" # Detect wake phrase
openkrab voice vad file.wav # Voice activity detection
openkrab voice spectral file.wav # Spectral analysis
# Microphone
openkrab voice mic_list # List microphones
openkrab voice mic_start [device] # Start capture
openkrab voice mic_stop # Stop capture
openkrab voice mic_read # Read audio buffer
openkrab voice mic_status # Check mic status# List loaded plugins
openkrab plugin list
# Load a plugin
openkrab plugin load ./plugins/my-plugin
# Unload a plugin
openkrab plugin unload my-plugin
# Enable hot reload (development)
openkrab plugin watch ./pluginsCreate plugin.json:
{
"name": "my-plugin",
"version": "1.0.0",
"description": "My custom plugin",
"author": "Your Name",
"kind": "extension",
"sandbox": {
"level": "medium",
"resources": {
"max_memory": 67108864
}
},
"tools": [
{
"name": "my_tool",
"description": "Does something useful"
}
],
"hooks": [
{
"event": "message.received",
"handler": "on_message"
}
]
}# Browser control
openkrab browser open https://example.com
openkrab browser tabs
openkrab browser navigate https://example.com
openkrab browser click "#button"
openkrab browser type "#input" "Hello World"
openkrab browser screenshot
openkrab browser snapshot
# Profile management
openkrab browser profiles
openkrab browser create-profile --name my-profile| Metric | Value |
|---|---|
| Total Lines | ~60,000+ lines of Rust |
| Test Coverage | 450+ tests, 0 failures |
| Porting Parity | 100% Feature Parity with OpenKrab |
| Channels | 18 messaging platforms |
| AI Providers | 7+ LLM providers |
| Core Modules | 62 Rust modules |
| Module | Lines | Description |
|---|---|---|
| Browser | 2,708 | CDP automation with pooling |
| Canvas/A2UI | 452 | Agent-to-UI protocol |
| Hooks | 177 | Event system |
| Voice | ~5,000 | Wake/VAD/TTS pipeline |
| Memory | ~10,000 | Vector + text search |
| Plugins | ~6,000 | WASM runtime |
| Gateway | ~12,000 | WebSocket/HTTP server |
| Agents | ~8,000 | AI runtime + tools |
# Debug build
cargo build
# Optimized release build
cargo build --release
# Run tests
cargo test # All tests
cargo test --lib # Library tests only
cargo test --release # Release mode tests
# Code quality
cargo clippy # Linting
cargo fmt # Formatting
cargo doc --open # Generate docs
# Run CLI
cargo run -- --help
cargo run -- gateway --port 18789
cargo run -- ask "Hello world"- Config format: JSON β TOML (better for humans)
- Config location:
~/.openkrab/β~/.config/openkrab/ - Binary name:
OpenKrabβopenkrab - Most connectors: Compatible with same tokens/webhooks
Migration tool:
openkrab migrate --from-OpenKrab ~/.openkrab/config.jsonSee Migration Guide for detailed instructions.
- Migration Guide β Migrating from OpenKrab
- PORTING.md β Detailed porting status
- AGENT.md β Agent development guide
- CONTRIBUTING.md β Contribution guidelines
- SECURITY.md β Security practices
- CHANGELOG.md β Release history
OpenKrab was built for Molty, a space lobster AI assistant.
This is a complete Rust port of OpenKrab, originally created by Peter Steinberger and the community.
- Website: OpenKrab.ai
- Twitter: @OpenKrab
- Original: github.com/OpenKrab/OpenKrab
MIT License β see LICENSE
Built with Rust
