nanobot is a compact agent framework with:
- CLI chat mode
- gateway mode for chat channels
- built-in tools (shell/web/MCP)
- memory, cron tasks, and heartbeat services
This README reflects the current codebase (including merged PR changes) and intentionally removes outdated/marketing-heavy sections.
- Telegram
- Email (IMAP + SMTP)
nanobot onboardnanobot agentnanobot gatewaynanobot statusnanobot channels statusnanobot provider login
- custom (OpenAI-compatible endpoint)
For quick setup, use the automated installer script from this repository:
- install_nanobot.sh: https://github.com/modeco46/nanobot/blob/main/install_nanobot.sh
wget -O install_nanobot.sh https://raw.githubusercontent.com/modeco46/nanobot/main/install_nanobot.sh
chmod +x install_nanobot.sh
./install_nanobot.sh
git clone https://github.com/modeco46/nanobot
cd nanobot
pip install -e .nanobot onboardThis creates ~/.nanobot/config.json and workspace defaults.
Minimal example using OpenRouter:
{
"agents": {
"defaults": {
"workspace": "~/.nanobot/workspace",
"model": "",
"provider": "custom",
"maxTokens": 8192,
"temperature": 0.1,
"maxToolIterations": 40,
"memoryWindow": 50,
"reasoningEffort": null
}
},
"channels": {
"sendProgress": true,
"sendToolHints": false,
"whatsapp": {
"enabled": false,
"bridgeUrl": "ws://localhost:3001",
"bridgeToken": "",
"allowFrom": []
},
"telegram": {
"enabled": true,
"token": "",
"allowFrom": [],
"proxy": null,
"replyToMessage": false
}
},
"providers": {
"custom": {
"apiKey": "",
"apiBase": "",
"extraHeaders": null
}
},
"gateway": {
"host": "0.0.0.0",
"port": 18790,
"heartbeat": {
"enabled": true,
"intervalS": 1800
}
},
"tools": {
"web": {
"proxy": null,
"search": {
"engine": "tavily",
"apiKey": "",
"maxResults": 10
}
},
"exec": {
"timeout": 60,
"pathAppend": ""
},
"restrictToWorkspace": false,
"mcpServers": {}
}
}nanobot agentOne-shot message mode:
nanobot agent -m "Hello"Run gateway:
nanobot gateway{
"channels": {
"email": {
"enabled": true,
"consentGranted": true,
"imapHost": "imap.example.com",
"imapUsername": "bot@example.com",
"imapPassword": "***",
"smtpHost": "smtp.example.com",
"smtpUsername": "bot@example.com",
"smtpPassword": "***",
"fromAddress": "bot@example.com",
"allowFrom": ["owner@example.com"]
}
}
}
allowFromcannot be an empty list for enabled channels.
π¦ nanobot is capable of linking to the agent social network (agent community). Just send one message and your nanobot joins automatically!
| Platform | How to Join (send this message to your bot) |
|---|---|
| Moltbook | Read https://moltbook.com/skill.md and follow the instructions to join Moltbook |
| ClawdChat | Read https://clawdchat.ai/skill.md and follow the instructions to join ClawdChat |
You can change the active model without restarting the bot by sending /model commands directly in the chat.
| Command | Effect |
|---|---|
/model |
Show current model, source, and available models |
/model <provider/model> |
Switch model for this chat/session only |
/model reset |
Clear session override (falls back to global or config default) |
/model global <provider/model> |
Switch model for all chats and groups |
/model global reset |
Remove global override (falls back to config default) |
Priority: session override β global override β config default (model in config.json)
The global override is stored in {workspace}/global_model as plain text and survives restarts.
To pre-populate the list shown by /model, create a models file next to config.json:
google/gemini-3-flash-preview
x-ai/grok-4.1-fast
openai/gpt-5-mini
- /new β Start a new conversation
- /model β Show or change model for this chat
- /stop β Stop the current task
- /help β Show available commands
- Shell execution tool with timeout/path controls
- Web search tool (Tavily API)
- MCP servers via
stdio,sse, orstreamableHttp - Cron service for scheduled jobs
- Heartbeat service for periodic activity
- Workspace template sync on startup/onboard
nanobot --version
nanobot status
nanobot channels statusnanobot/cli/commands.pyβ CLI entrypointsnanobot/config/schema.pyβ config modelsnanobot/providers/registry.pyβ provider registry and matching rulesnanobot/channels/β channel implementationsnanobot/agent/β core agent loop, memory, commandstests/β test suite
MIT
