By HKUDS @ University of Hong Kong
Understanding the nano bot framework that achieves full AI agent functionality in just ~4,000 lines of Python code
nanobot is an ultra-lightweight personal AI assistant developed by HKUDS (Data Intelligence Lab at the University of Hong Kong). Released on February 2, 2026, the nanobot ai framework delivers core agent functionality in approximately 4,000 lines of clean Python code — a remarkable 99% reduction compared to Clawdbot's 430,000+ lines.
The nano bot is built on the principle that powerful AI assistants don't require massive codebases. By focusing on essential functionality and clean architecture, nanobot proves that ~4,000 lines can deliver what others accomplish in 430,000+.
nanobot ai is designed for researchers, developers, and minimalists who want to understand AI agent architecture without drowning in complexity. Perfect for learning, experimentation, and rapid prototyping.
The nanobot framework stands out through extreme simplification while preserving core AI assistant capabilities. Here's what sets the nano bot apart from other solutions.
nanobot contains approximately 4,000 lines of core agent code. This is 99% smaller than Clawdbot (430,000+ lines) and dramatically simpler than OpenClaw. Every line serves a purpose, with no bloat or unnecessary complexity.
The nano bot codebase is clean, well-structured, and easy to understand. Researchers can comprehend the entire system in days instead of weeks. Perfect for studying AI agent architecture, memory systems, and tool integration patterns.
Installing nanobot ai is remarkably simple: pip install nanobot-ai or uv tool install nanobot-ai. No complex setup, no dependency hell, no configuration nightmares. Get started in seconds.
Despite its small size, nanobot supports 8+ messaging platforms including Telegram, Discord, WhatsApp, Slack, Email, QQ, DingTalk, and Feishu. One nano bot instance manages all your communication channels.
The nanobot Provider Registry supports 11+ LLM providers: OpenRouter, Anthropic (Claude), OpenAI (GPT), DeepSeek, Google Gemini, Zhipu, DashScope, Moonshot, Groq, AiHubMix, and vLLM. Adding new providers takes just 2 steps.
nanobot ai features long-term memory (MEMORY.md) and short-term memory (daily notes). The system was redesigned on February 12, 2026, for improved reliability with less code. Hybrid semantic search combines vector and keyword matching.
Understanding where nanobot came from helps explain its design philosophy and relationship to other AI assistant projects.
OpenClaw (430,000+ lines, Python, ~1GB RAM)
↓ Inspiration for simplification
nanobot (by HKUDS, ~4,000 lines, Python, ~100MB RAM)
↓ Inspiration for further optimization
PicoClaw (by Sipeed, Go rewrite, <10MB RAM)
The nano bot project was inspired by OpenClaw, an open-source personal AI assistant platform with 60,000+ GitHub stars (rapidly growing to 145,000+). While OpenClaw offers comprehensive functionality, it comes with 430,000+ lines of code and ~1GB RAM usage.
HKUDS (Data Intelligence Lab at the University of Hong Kong) asked a fundamental question: "Can we achieve core AI assistant functionality with 99% less code?" The nanobot ai project proved the answer is yes, demonstrating that extreme simplification is possible without sacrificing essential features.
nanobot's success inspired PicoClaw, developed by Sipeed. PicoClaw takes the minimalist philosophy even further by rewriting in Go and targeting embedded devices with less than 10MB RAM. The nano bot serves as the bridge between OpenClaw and PicoClaw.
While inspired by OpenClaw, nanobot is a complete rewrite with its own architecture, design decisions, and codebase. It's not a fork or subset of OpenClaw — it's an independent project that rethinks AI assistant design from first principles.
The nano bot achieves full functionality through a modular, layered architecture. Here are the core components that make nanobot ai work.
nanobot/
├── nanobot/
│ ├── agent/ # Agent Core
│ │ ├── context.py # Context Builder
│ │ └── memory.py # Memory System
│ ├── channels/ # Communication Channels
│ │ ├── telegram/ # Telegram Integration
│ │ ├── discord/ # Discord Integration
│ │ ├── whatsapp/ # WhatsApp Integration
│ │ └── ... # 8+ platforms
│ ├── providers/ # LLM Providers
│ │ ├── openrouter.py # OpenRouter
│ │ ├── anthropic.py # Anthropic (Claude)
│ │ ├── openai.py # OpenAI (GPT)
│ │ └── ... # 11+ providers
│ ├── tools/ # Tool Registry
│ │ ├── file_ops.py # File Operations
│ │ ├── shell.py # Shell Execution
│ │ └── web.py # Web Access
│ └── cron/ # Cron System
│ └── scheduler.py # Job Scheduling
├── pyproject.toml # Project Config
└── README.md # Documentation
The heart of nanobot. context.py builds system prompts by combining personality, memory, tools, and conversation history. memory.py manages both long-term (MEMORY.md) and short-term (daily notes) memory with hybrid semantic search.
nanobot ai connects to 8+ platforms through modular channel integrations. Each platform has dedicated code for handling messages, media, and platform-specific features like Telegram voice transcription.
The Provider Registry makes it trivial to add new LLM APIs. With 11+ providers already integrated (OpenRouter, Anthropic, OpenAI, DeepSeek, Gemini, and more), the nano bot gives you choice and flexibility.
Tools enable the nanobot to interact with files, execute shell commands, access the web, and more. The extensible architecture makes adding new tools straightforward for developers.
The nano bot excels in scenarios where simplicity, understandability, and resource efficiency matter. Here are the primary use cases for nanobot ai.
With only ~4,000 lines of code, nanobot is perfect for studying AI agent architecture. Understand how memory systems work, how tools integrate with LLMs, and how multi-platform support is implemented — all without getting lost in complexity.
Use the nano bot for daily tasks, automation, and productivity. The nanobot ai assistant handles conversations, remembers context, executes commands, and integrates with your favorite messaging platforms.
Want to test a new LLM provider? Try a different memory approach? Experiment with tool designs? The nanobot codebase is small enough that you can modify and extend it in hours, not weeks.
The nano bot Cron system enables scheduled tasks and recurring jobs. Set up automated market analysis, data collection, monitoring, or any other time-based workflow. Low resource usage means nanobot ai can run continuously.
Manage conversations across Telegram, Discord, WhatsApp, Slack, Email, and more from a single nanobot instance. Unified interface, consistent behavior, centralized memory and context.
Teach AI assistant development using nanobot as the reference implementation. Students can comprehend the entire system, trace execution flow, and learn best practices without overwhelming complexity.
Now that you understand what nanobot is, explore its features in depth or jump straight to installation. The nano bot is free, open source, and ready to use.