nanobot logo

nanobot

Visit

Ultra-lightweight, self-hosted personal AI agent framework in Python with WebUI, tools, long-term memory, MCP integrations, multi-agent workflows, and scheduled automation.

Share:

nanobot is an ultra-lightweight, open-source, self-hosted personal AI agent framework written in Python. It runs in a browser WebUI, a terminal, or as a long-running gateway, and combines tools, long-term memory, MCP integrations, model routing, multi-agent delegation, and scheduled automation inside a small, readable core. With more than 47,000 GitHub stars and an MIT license, it is one of the most popular self-hosted agent frameworks for people who want an agent they can truly own.

Core Features

  • Small agent loop: Messages come in from a chat app, the LLM decides when tools are needed, and memory or skills are pulled in only as context instead of becoming a heavy orchestration layer.
  • Chat-native reach: WebUI (port 8765), terminal CLI, plus Telegram, Discord, Slack, WeChat, Feishu, Email, Mattermost, and other channels.
  • Built-in tools: File read/write and patching, shell execution with configurable sandboxing, web search and fetch with SSRF checks, MCP servers, cron reminders, image generation, and subagents.
  • Long-term memory: Session history plus Dream, a persistent memory system that survives long-running work; goals, memory, tools, and chat context persist across turns.
  • Model freedom: Works with any OpenAI-compatible provider (OpenRouter, Anthropic, OpenAI, Bedrock, Ollama, vLLM) plus local LLMs, with model fallback chains.
  • Integration surface: Python SDK, an OpenAI-compatible API via nanobot serve (/v1/chat/completions), and Langfuse observability for tracing model calls.

Use Cases

  • Personal AI assistant: A private agent that lives in your chat apps, handles email, files, and web research, and keeps its own memory.
  • Automation hub: Cron schedules, heartbeat tasks, and local triggers let nanobot run long-horizon jobs and scheduled automations.
  • Local-first deployment: WebUI binds to localhost by default, so your data stays on your machine; deploy as a gateway for 24/7 availability.
  • Multi-agent workflows: Delegation to subagents and workspace-scoped sessions for repository-specific work.

Advantages

  1. Truly lightweight: A readable Python core instead of a platform-scale orchestration stack; install with uv tool install nanobot-ai and run.
  2. Own your stack: MIT-licensed, self-hosted, and easy to inspect and extend, from tools to channels.
  3. MCP and memory built in: Model Context Protocol servers, long-term memory, and multi-channel chat arrive out of the box rather than as paid add-ons.

Getting Started

  1. Install: uv tool install nanobot-ai (or python -m pip install nanobot-ai), then run nanobot webui.
  2. Configure: In the WebUI, go to Settings to add a provider and model preset, then enable channels as needed.
  3. Use: Chat in the browser, connect Telegram or Discord, or script it via the Python SDK and OpenAI-compatible API.
  4. Secure: WebUI is localhost-only by default; review shell, workspace, and SSRF settings before exposing the gateway.

Tips

  1. Start with the wizard: nanobot onboard --wizard sets up config and workspace before you edit JSON.
  2. Use MCP for external tools: Add stdio or HTTP MCP servers in tools.mcpServers for GitHub, databases, and more.
  3. Mind the security surface: The project is Alpha; sandbox shell execution and review SSRF whitelists before long-running deployments.

Conclusion

nanobot delivers a genuinely lightweight, self-hosted personal agent with memory, MCP, multi-channel chat, and automation in a package you can read and extend. If you want an agent you own rather than a platform you rent, nanobot is one of the strongest open options today.

Alternatives

  • FastClaw: Go-based agent runtime and multi-agent framework, a lighter alternative to OpenClaw.
  • OpenClaw: The original open-source agent runtime with a larger plugin ecosystem.
  • CrewAI: Python role-based multi-agent orchestration framework.

Comments

No comments yet. Be the first to comment!