โ† AI Tools
MultimodalAdvanced

nanobot

Ultra-lightweight personal AI agent runtime โ€” developed by HKUDS at the University of Hong Kong.

nanobot is an ultra-lightweight personal AI agent runtime released in February 2026 by the HKUDS (Hong Kong University Data Intelligence Lab). Similar to how GPT processes any text, nanobot is designed to enable any LLM to operate within a single, consistent agent loop. It implements the core agent pipeline โ€” message reception, LLM decision-making, tool invocation, and context management โ€” with minimal Python code, while also adopting a modular structure that allows for the addition of practical components such as WebUI, messenger integration, MCP (Model Context Protocol) hosting, long-term memory, and periodic scheduling. The limitation of existing agent frameworks is their complexity. Large frameworks like LangChain and AutoGen stack thousands of lines of abstraction layers, making it difficult for researchers to understand the internal workings or replace specific components. nanobot takes the opposite approach. It maintains the core logic of the agent loop at a readable level of a few thousand lines, while also enabling the switching between more than 30 LLM providers (OpenAI, Anthropic Claude, Google Gemini, DeepSeek, Ollama, vLLM, LM Studio, AWS Bedrock, Azure OpenAI, etc.) using named presets and fallback routing. By connecting multiple MCP servers, external tools can be exposed to the agent, and the context can be automatically compressed and restored in long-term sessions using a token-based, two-stage memory system (Dream). Furthermore, it supports natural language-based cron scheduling, sandbox code execution, and background execution of sub-agents, allowing for the construction of agents that continuously track goals beyond simple chatbots. From the perspective of a biotechnology researcher, the value of nanobot lies in its ability to "quickly build a personal AI assistant without infrastructure dependencies." For example, an agent can be created to monitor research papers, connect the PubMed API as an MCP tool, collect new papers daily via cron, and complete the pipeline with a few dozen lines of code to deliver summaries to Telegram or Slack. In experimental data preprocessing workflows, a local LLM (such as Ollama) can be connected to the agent to automate tasks such as CSV cleaning, statistical summarization, and visualization script generation through natural language instructions, without sending sensitive data to external APIs. The WebUI is embedded within the Python wheel, so a browser-based management screen can be opened with `nanobot run` without separate building, and Docker container deployment is also supported, making it suitable for operating a research support agent that runs continuously on a lab server.

๐Ÿ’ป System Requirements

๐Ÿง RAM

The agent runtime itself does not require a GPU. When connecting to a local LLM (Ollama/vLLM), it adheres to the VRAM requirements of that model.

๐Ÿ’พStorage

Package installation requires approximately 200MB, including the WebUI. Local LLM models are stored separately.

โšก Installation

### 4-1. Quick Start

```bash
# Install via PyPI
pip install nanobot-ai

# Or use uv
uv tool install nanobot-ai

# Run
nanobot run
```

### 4-2. Detailed Installation

```bash
# Install from source
git clone https://github.com/HKUDS/nanobot.git
cd nanobot
pip install -e .

# One-command installation (macOS/Linux)
# Refer to the installation script in the official README.

# Docker
docker compose up -d

# Set environment variables (e.g., OpenAI)
export OPENAI_API_KEY="sk-..."
nanobot run
```

### 4-3. Basic API Call Example

```python
# Use the Python SDK
from nanobot import Nanobot

bot = Nanobot()
response = bot.chat("Summarize the CRISPR-related paper published in Nature today.")
print(response)
```

๐Ÿงฌ Bio Use Cases

๐Ÿ”ฌ

Paper Monitoring Agent

Connect the PubMed/bioRxiv API to the MCP tool and schedule daily collection and summarization of papers with specific keywords using cron. Automatically deliver the results to a Telegram or Slack channel, allowing the entire research team to share real-time trends. Compared to manual RSS readers, LLM summarization and filtering can select only highly relevant papers.

๐Ÿงฌ

Automated Preprocessing of Experimental Data

Connect a local LLM (Ollama) to the agent to generate CSV cleaning, outlier detection, and statistical summary reports based on natural language instructions, without transmitting sensitive experimental data externally. By exposing the file system and Python execution environment as tools in the MCP, the agent can directly write and execute pandas scripts.

๐Ÿ’Š

Lab Server Always-On Assistant

Deploy to the lab server using Docker and share with team members via a WebUI. Maintain project-specific context with a long-term memory system, run multiple analysis tasks in parallel with sub-agents, and automate equipment status checks with cron. Integrate with Slack/Teams to immediately report experiment completion notifications or anomaly detection to the team channel.

๐Ÿ“„ Official Docs๐Ÿ™ GitHub

๐Ÿ“ Update Notes

No update notes yet.

๐Ÿงช Related Code of Life

No related Code of Life posts yet.