A Rust reimplementation of nanobot β delivering the same features with zero runtime dependencies, ultra-low memory, and sub-second startup.
π¦ OxiBot is an ultra-lightweight personal AI assistant built entirely in Rust.
β‘οΈ Ships as a single static binary (~18K lines of Rust) with no Python, no pip, no runtime dependencies.
π― Feature-complete port of nanobot: same config format, same channels, same skills, same CLI.
| Metric | OxiBot | nanobot |
|---|---|---|
| Language | Rust | Python |
| Binary | Single static file | pip install + 50+ deps |
| RAM | < 8 MB | ~50-100 MB |
| Startup | < 1 s | 2-4 s |
| LOC (core) | ~18,372 | ~3,510 |
| Cross-compile | x86_64, ARM64, RISC-V | Python-only |
git clone https://github.com/DioCrafts/OxiBot.git
cd OxiBot
cargo build --releaseBinary output: target/release/oxibot
# Only Telegram
cargo build --release --features "telegram"
# Multiple channels
cargo build --release --features "telegram,discord,slack"
# All channels (what the Dockerfile uses)
cargo build --release --features "telegram,discord,whatsapp,slack,email"| Feature | Description |
|---|---|
telegram |
Telegram bot via teloxide |
discord |
Discord bot via WebSocket gateway |
whatsapp |
WhatsApp via Node.js bridge (Baileys) |
slack |
Slack bot via Socket Mode |
email |
Email via IMAP + SMTP |
Tip
Set your API key in ~/.oxibot/config.json.
Get API keys: OpenRouter (recommended) Β· Anthropic Β· Brave Search (optional)
1. Initialize
oxibot onboard2. Configure (~/.oxibot/config.json)
{
"providers": {
"openrouter": {
"apiKey": "sk-or-v1-xxx"
}
},
"agents": {
"defaults": {
"model": "anthropic/claude-sonnet-4-20250514"
}
}
}3. Chat
oxibot agent -m "What is 2+2?"That's it! Working AI assistant in 2 minutes. π
Run OxiBot with your own local LLMs using vLLM or any OpenAI-compatible server.
{
"providers": {
"vllm": {
"apiKey": "dummy",
"apiBase": "http://localhost:8000/v1"
}
},
"agents": {
"defaults": {
"model": "meta-llama/Llama-3.1-8B-Instruct"
}
}
}oxibot agent -m "Hello from my local LLM!"Tip
The apiKey can be any non-empty string for local servers that don't require authentication.
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β oxibot (single binary) β
β β
β ββββββββββββ βββββββββββββββββ ββββββββββββββ βββββββββββββββ β
β β oxibot- β β oxibot- β β oxibot- β β oxibot- β β
β β cli ββββ agent ββββ providers β β cron β β
β β β β β β β β β β
β β commands β β loop, tools, β β 12 LLM β β scheduler, β β
β β gateway β β memory, ctx β β backends β β jobs, store β β
β β repl β β skills, sub β β + whisper β β β β
β ββββββββββββ βββββββββββββββββ ββββββββββββββ βββββββββββββββ β
β β β β β
β ββββββΌβββββββββββββββββΌβββββββββββββββββββββββββββββββββββββΌβββββ β
β β oxibot-core β β
β β config Β· bus Β· session Β· heartbeat Β· types Β· utils β β
β ββββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββββ β
β β β
β ββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββββββββ β
β β oxibot-channels β β
β β telegram Β· discord Β· whatsapp Β· slack Β· email β β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β (WhatsApp only)
β WebSocket ws://localhost:3001
ββββββββββΌββββββββββββββββββββββββββ
β Node.js WhatsApp Bridge β
β (Baileys v7, TypeScript) β
ββββββββββββββββββββββββββββββββββββ
Talk to OxiBot through Telegram, Discord, WhatsApp, Slack, or Email β anytime, anywhere.
| Channel | Setup | Requires |
|---|---|---|
| Telegram | Easy | Bot token |
| Discord | Easy | Bot token + intents |
| Medium | Node.js + QR scan | |
| Slack | Medium | Bot + App tokens |
| Medium | IMAP/SMTP credentials |
Telegram (Recommended)
1. Create a bot β Open Telegram β @BotFather β /newbot β copy the token
2. Configure
{
"channels": {
"telegram": {
"token": "YOUR_BOT_TOKEN",
"allowedUsers": ["YOUR_USER_ID"]
}
}
}3. Build & Run
cargo build --release --features telegram
oxibot gatewayDiscord
1. Create a bot
- Discord Developer Portal β Create Application β Bot β Add Bot
- Enable MESSAGE CONTENT INTENT
- Copy the bot token
2. Invite the bot
- OAuth2 β URL Generator β Scopes:
botβ Permissions:Send Messages,Read Message History - Open the generated URL and add to your server
3. Configure
{
"channels": {
"discord": {
"token": "YOUR_BOT_TOKEN",
"allowedUsers": ["YOUR_USER_ID"]
}
}
}4. Build & Run
cargo build --release --features discord
oxibot gatewayRequires Node.js β₯20 for the Baileys bridge.
1. Build the bridge
cd bridge && npm install && npm run build && cd ..2. Link device
oxibot channels login
# Scan QR with WhatsApp β Settings β Linked Devices3. Configure
{
"channels": {
"whatsapp": {
"bridgeUrl": "ws://localhost:3001",
"allowedUsers": ["+1234567890"]
}
}
}4. Run (two terminals)
# Terminal 1: Start the bridge
cd bridge && npm start
# Terminal 2: Start the bot
cargo build --release --features whatsapp
oxibot gatewaySlack
Uses Socket Mode β no public URL required.
1. Create a Slack app
- Slack API β Create New App β "From scratch"
- Socket Mode: Toggle ON β Generate App-Level Token (
xapp-...) - OAuth & Permissions: Add scopes:
chat:write,reactions:write,app_mentions:read - Event Subscriptions: Toggle ON β Subscribe:
message.im,message.channels,app_mention - App Home: Enable Messages Tab β Allow messages
- Install to Workspace β Copy Bot Token (
xoxb-...)
2. Configure
{
"channels": {
"slack": {
"botToken": "xoxb-...",
"appToken": "xapp-...",
"groupPolicy": "mention"
}
}
}3. Build & Run
cargo build --release --features slack
oxibot gateway[!TIP]
groupPolicy:"mention"(respond to @mentions),"open"(all messages), or"allowlist".
Polls IMAP for incoming mail, replies via SMTP.
1. Get credentials (Gmail example: enable 2FA β create App Password)
2. Configure
{
"channels": {
"email": {
"imapHost": "imap.gmail.com",
"imapPort": 993,
"imapUsername": "my-oxibot@gmail.com",
"imapPassword": "your-app-password",
"smtpHost": "smtp.gmail.com",
"smtpPort": 587,
"smtpUsername": "my-oxibot@gmail.com",
"smtpPassword": "your-app-password",
"fromAddress": "my-oxibot@gmail.com",
"allowedUsers": ["your-real-email@gmail.com"]
}
}
}3. Build & Run
cargo build --release --features email
oxibot gatewayConfig file: ~/.oxibot/config.json
| Provider | Purpose | Get API Key |
|---|---|---|
openrouter |
LLM (recommended, access to all models) | openrouter.ai |
anthropic |
LLM (Claude direct) | console.anthropic.com |
openai |
LLM (GPT direct) | platform.openai.com |
deepseek |
LLM (DeepSeek direct) | platform.deepseek.com |
groq |
LLM + Voice transcription (Whisper) | console.groq.com |
gemini |
LLM (Gemini direct) | aistudio.google.com |
minimax |
LLM (MiniMax direct) | platform.minimax.io |
aihubmix |
LLM (API gateway) | aihubmix.com |
dashscope |
LLM (Qwen) | dashscope.console.aliyun.com |
moonshot |
LLM (Moonshot/Kimi) | platform.moonshot.cn |
zhipu |
LLM (Zhipu GLM) | open.bigmodel.cn |
vllm |
LLM (local, any OpenAI-compatible server) | β |
Tip
Groq provides free voice transcription via Whisper. If configured, Telegram voice messages will be automatically transcribed.
All env vars use OXIBOT_ prefix with __ as section delimiter:
export OXIBOT_PROVIDERS__ANTHROPIC__API_KEY=sk-ant-xxx
export OXIBOT_AGENTS__DEFAULTS__MODEL=anthropic/claude-sonnet-4-20250514
export OXIBOT_GATEWAY__PORT=9090Config precedence: Defaults β config.json β Environment variables (env overrides all).
For production, set
"restrictToWorkspace": trueto sandbox the agent.
| Option | Default | Description |
|---|---|---|
tools.restrictToWorkspace |
false |
Restricts all agent tools to workspace directory |
channels.*.allowedUsers |
[] (allow all) |
Whitelist of user IDs. Empty = allow everyone |
See SECURITY.md for comprehensive security guidance.
| Command | Description |
|---|---|
oxibot onboard |
Initialize config & workspace |
oxibot agent -m "..." |
Chat (single message) |
oxibot agent |
Interactive REPL |
oxibot agent --no-markdown |
Plain-text replies |
oxibot agent --logs |
Show debug logs |
oxibot gateway |
Start all channels + cron + heartbeat |
oxibot status |
Show config & provider status |
oxibot channels status |
Show channel status |
oxibot channels login |
Link WhatsApp (scan QR) |
oxibot cron list |
List scheduled jobs |
oxibot cron add |
Add a scheduled job |
oxibot cron remove <id> |
Remove a job |
oxibot cron enable <id> |
Enable/disable a job |
oxibot cron run <id> |
Manually trigger a job |
Interactive mode exits: exit, quit, /exit, /quit, :q, Ctrl-C, Ctrl-D.
Scheduled Tasks (Cron)
# Cron expression
oxibot cron add --name "morning" --message "Daily summary" --cron "0 9 * * *"
# Interval (seconds)
oxibot cron add --name "check" --message "Status update" --every 3600
# One-time at specific time
oxibot cron add --name "remind" --message "Call dentist" --at "2026-03-01T09:00:00"
# With channel delivery
oxibot cron add --name "alert" --message "Health check" --every 300 \
--deliver --channel telegram --to "123456789"
# List / remove
oxibot cron list
oxibot cron remove <job_id>Bundled skills in crates/oxibot-agent/skills/:
| Skill | Description |
|---|---|
| skill-creator | Guides the agent on creating new skills |
| weather | Weather via wttr.in (no API key needed) |
| cron | Schedule reminders and recurring tasks |
| tmux | Remote-control tmux sessions |
| github | Interact with GitHub via gh CLI |
| summarize | Summarize URLs and articles |
Custom skills can be added to ~/.oxibot/workspace/skills/.
# Build the image
docker build -t oxibot .
# Initialize (first time)
docker run -v ~/.oxibot:/home/oxibot/.oxibot --rm oxibot onboard
# Edit config to add API keys
vim ~/.oxibot/config.json
# Run gateway
docker run -d \
-v ~/.oxibot:/home/oxibot/.oxibot \
-p 18790:18790 \
oxibot gateway
# Single command
docker run -v ~/.oxibot:/home/oxibot/.oxibot --rm oxibot agent -m "Hello!"
docker run -v ~/.oxibot:/home/oxibot/.oxibot --rm oxibot statusTip
The -v ~/.oxibot:/home/oxibot/.oxibot flag persists config and workspace across container restarts.
OxiBot/
βββ Cargo.toml # Workspace root
βββ Dockerfile # Multi-stage build (Rust + Node.js bridge)
βββ bridge/ # π Node.js WhatsApp bridge (Baileys)
β βββ src/
β β βββ index.ts # Entry point
β β βββ server.ts # WebSocket server
β β βββ whatsapp.ts # Baileys client
β βββ package.json
βββ crates/
βββ oxibot-core/ # βοΈ Config, bus, session, heartbeat, utils
βββ oxibot-agent/ # π§ Agent loop, tools, memory, context, skills
β βββ skills/ # π― Bundled skills (weather, cron, tmux, etc.)
βββ oxibot-providers/ # π€ 12 LLM backends + Whisper transcription
βββ oxibot-channels/ # π± Telegram, Discord, WhatsApp, Slack, Email
βββ oxibot-cron/ # β° Scheduled task engine
βββ oxibot-cli/ # π₯οΈ CLI commands, gateway, REPL
# Run all tests
cargo test --workspace
# With all channel features
cargo test --workspace --features "telegram,discord,whatsapp,slack,email"
# Specific crate
cargo test -p oxibot-core
cargo test -p oxibot-agent
cargo test -p oxibot-providers
cargo test -p oxibot-channels
cargo test -p oxibot-cron
cargo test -p oxibot-cliSee TESTING-GUIDE.md for comprehensive testing procedures, sample configs, and Docker instructions.
PRs welcome! See CONTRIBUTING.md for guidelines.
Roadmap:
- Core agent loop (tools, memory, sessions)
- 12 LLM providers
- 5 chat channels (Telegram, Discord, WhatsApp, Slack, Email)
- Cron scheduler
- Heartbeat service
- Voice transcription (Groq Whisper)
- WhatsApp bridge (TypeScript + Baileys)
- Multi-modal support (images, video)
- Enhanced long-term memory
- Web UI dashboard
- Plugin system for custom tools
- CI/CD with GitHub Actions
OxiBot is a Rust reimplementation of nanobot for educational and research purposes.