nanobot
Ultra-lightweight, open-source personal AI agent with persistent memory, multi-channel chat, MCP support, and long-horizon task execution.
At a Glance
About nanobot
nanobot is an open-source, ultra-lightweight personal AI agent built in Python and released under the MIT License. Started by Xubin Ren as a personal project and maintained with community contributions, it centers on a small, readable agent loop that keeps the core portable while supporting real long-running work. The project has accumulated over 44,000 GitHub stars since its February 2026 launch.
What It Is
nanobot is a CLI-first personal AI agent that you install locally and connect to any OpenAI-compatible LLM provider, local model, or cloud API. It handles multi-step tasks, maintains persistent memory across sessions, and routes conversations through a unified agent kernel that can be embedded in chat apps, automated workflows, or your own code. The design philosophy is "lean and enduring": compact context management, token budgets, and a small core that stays readable and extensible without becoming a monolith.
Architecture and Core Design
The agent loop is intentionally minimal. Messages arrive from chat channels, the LLM decides when tools are needed, and memory or skills are pulled in as context rather than through a heavy orchestration layer. Key architectural pieces include:
- Agent runtime kernel — a portable core that can be embedded in business or personal workflows
- Dream two-stage memory — persistent memory that survives long-running sessions and learns discovered skills
- Context compaction — automatic session shrinking on the fly to stay within token budgets
- MCP (Model Context Protocol) — full support for MCP servers, resources, prompts, and presets
- OpenAI-compatible API — exposes an SSE-streaming API so other tools can talk to nanobot
Channel and Provider Reach
nanobot connects to a wide range of chat platforms and LLM providers out of the box:
- Chat channels: WebUI (bundled in the wheel), Telegram, Discord, Slack, Feishu/Lark, WeChat, WeCom, DingTalk, Microsoft Teams, Matrix, Signal, Email, QQ, WhatsApp, and WebSocket
- LLM providers: OpenAI, Anthropic, OpenRouter, Azure OpenAI, AWS Bedrock, GitHub Copilot, DeepSeek, Qwen, MiniMax, Moonshot/Kimi, VolcEngine, StepFun, Novita, NVIDIA NIM, Ollama, vLLM, LM Studio, Hugging Face, and others via OpenAI-compatible endpoints
- Observability: Langfuse and LangSmith integration for tracing
Setup Path
Installation requires Python 3.11 or newer. Three install methods are supported: one-command shell script, pip install nanobot-ai, or uv tool install nanobot-ai. A source install from the GitHub repository is recommended for the newest features. After install, nanobot onboard --wizard walks through provider selection and model configuration interactively. The WebUI ships inside the published wheel — enabling the WebSocket channel and running nanobot gateway is all that is needed to open it at http://127.0.0.1:8765.
Update: v0.2.1 — The Workbench Release
The latest stable release is v0.2.1, published on 2026-06-01. The changelog describes it as "The Workbench Release," turning the packaged WebUI into a daily agent workbench with clearer Thought/response timelines, live file-edit activity, project workspaces, model and context controls, steadier sustained goals, CLI Apps plus MCP extensions, and broader provider and channel support. Prior notable releases include v0.2.0 (May 2026, adding /goal for sustained objectives, image generation, five new providers, and a full agent-loop refactor) and v0.1.5 (April 2026, adding sturdier long-running tasks, Dream two-stage memory, production-ready sandboxing, and a programming Agent SDK). The repository shows active daily commits throughout the project's history.
Community Discussions
Be the first to start a conversation about nanobot
Share your experience with nanobot, ask questions, or help others learn from your insights.
Pricing
Open Source
Fully free and open-source under the MIT License. Self-host and run nanobot on your own infrastructure.
- Full agent core with persistent memory
- Multi-channel support (Telegram, Discord, Slack, WeChat, etc.)
- MCP support
- WebUI bundled in the wheel
- OpenAI-compatible API
Capabilities
Key Features
- Ultra-lightweight agent core with small, readable internals
- Persistent memory (Dream two-stage memory) across sessions
- Long-horizon task execution with /goal for sustained objectives
- MCP (Model Context Protocol) support with presets, resources, and prompts
- WebUI bundled inside the published wheel — no extra build step
- Multi-channel support: Telegram, Discord, Slack, Feishu, WeChat, Teams, Matrix, Signal, Email, QQ, WhatsApp
- OpenAI-compatible API with SSE streaming
- Model routing with fallback_models and named presets
- Context compaction to automatically shrink sessions on the fly
- Cron-based scheduling and automation
- Image generation end-to-end
- Python SDK and CLI Apps
- Access control and security sandboxing
- Langfuse and LangSmith observability integration
- Docker and Linux service deployment support
- Interactive setup wizard (nanobot onboard --wizard)
- Extension registry and CLI Apps + MCP unified interface
- Project workspaces with live file-edit activity
