nanobot

GitHub

Ultra-lightweight, open-source, self-hosted personal AI agent framework in Python with WebUI, tools, memory, MCP, multi-agent workflows, automation, and chat apps

RAW Compose
1. Pull Image docker pull HKUDS/nanobot:latest
2. 1-Click Launch Command docker run -d --name nanobot -p 18790:18790 --restart always HKUDS/nanobot:latest
3. Compose Deployment docker compose up -d
docker-compose.yml
Download .yml
x-common-config: &common-config
  build:
    context: .
    dockerfile: Dockerfile
    args:
      NANOBOT_CHANNELS: ${NANOBOT_CHANNELS:-whatsapp}
  volumes:
    - ~/.nanobot:/home/nanobot/.nanobot
  cap_drop:
    - ALL
  # Entrypoint uses these to fix bind-mount ownership and drop to the nanobot user.
  cap_add:
    - CHOWN
    - SETGID
    - SETUID
  # Prevent the non-root process from regaining capabilities through setuid
  # binaries or file capabilities left inside the container image.
  security_opt:
    - no-new-privileges:true

services:
  nanobot-gateway:
    container_name: nanobot-gateway
    <<: *common-config
    command: ["gateway"]
    restart: unless-stopped
    ports:
      - 127.0.0.1:18790:18790
      - 8765:8765
    deploy:
      resources:
        limits:
          cpus: "1"
          memory: 1G
        reservations:
          cpus: "0.25"
          memory: 256M

  nanobot-api:
    container_name: nanobot-api
    <<: *common-config
    command:
      ["serve", "--host", "0.0.0.0", "-w", "/home/nanobot/.nanobot/api-workspace"]
    restart: unless-stopped
    ports:
      - 127.0.0.1:8900:8900
    deploy:
      resources:
        limits:
          cpus: "1"
          memory: 1G
        reservations:
          cpus: "0.25"
          memory: 256M

  nanobot-cli:
    <<: *common-config
    profiles:
      - cli
    command: ["status"]
    stdin_open: true
    tty: true