Nanobot

Nanobot is an open-source terminal-based AI coding assistant developed by HKUDS. It provides an interactive agent environment directly in the terminal to inspect codebases, execute refactoring tasks, and generate code through multi-model backend integrations. In daily use, Nanobot functions through an interactive Terminal User Interface (TUI) alongside standard command-line workflows. Developers submit instructions through an active composer interface that supports queuing actions and managing execution prompts. Under the hood, Nanobot interfaces with large language model providers (such as OpenAI/Codex APIs) with specialized optimizations like prompt cache routing to reduce latency and token usage. Nanobot differentiates itself through its lightweight architecture, strict type checking (enforced via BasedPyright), and robust TUI navigation that separates task composition from agent execution queues. It also maintains asset tooling for supplementary interfaces such as WebUI components alongside the core terminal interface. Nanobot is released as free open-source software on GitHub. It operates on a bring-your-own-key (BYOK) model where users connect their own provider API keys.

Tags: ai agent, cli, developer tools, memory, OpenSource, personal assistant

Visit Nanobot

Key features

  • Interactive TUI Composer — Features a full terminal interface with composer hint support and background action queuing. - Optimized Provider Routing — Incorporates prompt cache routing and stability mechanisms for major LLM providers including Codex-based models. - Strict Type Checking Architecture — Built with BasedPyright enforcement across its Python codebase for runtime stability. - Multi-Interface Support — Integrates terminal TUI workflows alongside supplementary WebUI support. - Task Execution Queue — Allows developers to queue multiple instruction batches without interrupting running processes.

Use cases

Use Case: Terminal-Native Codebase Refactoring Developers use Nanobot's interactive TUI to navigate local repositories, identify anti-patterns, and apply cross-file refactoring steps directly from their terminal session.

Use Case: Queue-Based Automated Code Generation Engineers submit complex multi-step coding prompts into Nanobot's composer, queuing tasks while the agent resolves dependencies and writes test cases.

Use Case: Provider Cache Optimization for Cost-Conscious Devs Teams leverage Nanobot's Codex prompt caching routing to run repeated code inspection passes over large repositories without incurring full token overhead.

Who it is for

Nanobot is designed for software engineers and CLI-first developers who prefer working in terminal-based environments with optimized LLM provider routing. It is less suitable for users looking for turnkey desktop GUI applications or fully managed IDE plugins with zero terminal interaction.

Install guide

Installation Install Nanobot via pip from the repository (standard Python package installation): bash git clone https://github.com/HKUDS/nanobot.git cd nanobot pip install -e .

First Run Configure your provider API credentials in your shell environment: bash export OPENAI_API_KEY="your-api-key-here" nanobot

Example Session Launch Nanobot within your target repository and request an automated inspection or refactor: bash # Start interactive TUI in current repository nanobot # Inside the composer prompt: > Analyze src/provider/router.py and optimize cache handling logic

Part of CLI Coding Agents

Categories: AI Coding Agents, Assistant, Chatbot Development, Developer Tools

Related CLI agents

  • Data Olympus — Data Olympus is an open-source knowledge base and Model Context Protocol (MCP) server harness created by knaisoma. Built in Python…
  • Vestige — Vestige is an open-source agent harness and persistent memory infrastructure framework developed by samvallad33. Designed specifically for AI coding agents…
  • Agent Memory System — Agent Memory System is an open-source agent orchestration harness developed by RavByte-AI. It provides structured memory retention and retrieval mechanisms…
  • GoodMemory — GoodMemory is an open-source agent memory orchestration harness and context management system developed by hjqcan. Designed to give AI agents…
  • pi-mem — pi-mem is an open-source memory harness and persistent context manager developed by Jo Inc for the Pi CLI coding agent.…
  • Beads — Beads (bd) is an open-source task coordination and state orchestration harness for AI coding agents developed by Gastown Hall. It…
  • AI Tools
  • Categories
  • Industries
  • CLI Coding Agents
  • MCP Servers
  • MCP Categories