explaingit

hkuds/nanobot

41,803PythonAudience · developerComplexity · 3/5Setup · moderate

TLDR

A lightweight AI agent you install on your own machine that can browse the web, run shell commands, manage files, and respond via Discord, Slack, or Telegram, supporting Anthropic, OpenAI, and local models.

Mindmap

mindmap
  root((nanobot))
    What it does
      Personal AI agent
      Self-hosted
      Task automation
    Channels
      Discord
      Slack
      Telegram
    AI Providers
      Anthropic
      OpenAI
      Local models
    Features
      File operations
      Web browsing
      Scheduled tasks
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Run a personal AI assistant that autonomously executes shell commands, reads files, and searches the web on your own computer without a cloud platform.

USE CASE 2

Connect your AI agent to Discord, Slack, or Telegram so it responds to your messages and takes real actions through those apps.

USE CASE 3

Set up scheduled tasks so the agent automatically sends reminders, runs scripts, or monitors websites on a cron-style schedule.

USE CASE 4

Extend the agent with custom tools using the MCP protocol without depending on any third-party cloud service.

Tech stack

Python

Getting it running

Difficulty · moderate Time to first run · 30min

Requires Python 3.11+ and API keys for your chosen AI provider, each chat platform integration needs its own bot token configured separately.

In plain English

Nanobot is an open-source, lightweight personal AI agent that you run on your own machine or server. It sits in the same category as tools like Claude Code or OpenAI Codex, agents that use a large language model as a brain and can autonomously take actions like reading files, running shell commands, browsing the web, and managing tasks, but with a deliberate focus on staying small, readable, and easy to self-host. The problem it solves is that mainstream AI agent platforms either lock you into a proprietary cloud service or require complex infrastructure to deploy. Nanobot aims to let anyone run a capable personal AI agent with minimal setup: install via pip, configure which AI provider to use (it supports Anthropic, OpenAI, DeepSeek, Google Gemini, GitHub Copilot, local models via LM Studio, and many others), and the agent is ready to work. Here is how it works: Nanobot maintains an agent loop where it receives a message or task, reasons about it using the connected AI model, decides which tools to use (file operations, shell commands, web search, notebook editing, etc.), executes those tools, and repeats until the task is complete. It supports MCP (Model Context Protocol) for plugging in additional tools, has a memory system so it can remember context across sessions, and can be reached through multiple channels, Discord, Slack, Telegram, WeChat, Microsoft Teams, email, or a local web UI. Scheduled tasks (cron-style reminders and routines) are also supported. You would use Nanobot if you want a personal AI assistant that can autonomously perform tasks on your computer, respond to you through your preferred messaging app, and be customized or extended without depending on any cloud vendor. The stack is Python (3.11 or later), with direct integrations to multiple AI provider SDKs and chat platform APIs.

Copy-paste prompts

Prompt 1
Help me configure Nanobot with the Anthropic Claude API and set up a Discord bot that can answer questions about files in my home directory.
Prompt 2
Using Nanobot, write a scheduled task config that runs every morning at 8am, checks a news website for updates, and sends me a Telegram summary.
Prompt 3
Show me how to add a custom MCP tool to Nanobot that queries a local SQLite database and returns results to the agent.
Prompt 4
Help me configure Nanobot to use a local LLM via LM Studio instead of a cloud API so the agent runs fully offline.
Prompt 5
Using Nanobot's memory system, help me set up a personal knowledge base the agent can search and update across sessions.
Open on GitHub → Explain another repo

← hkuds on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.