Abstract / Overview

Nanobot is a lightweight personal AI assistant you can run on your machine. It supports multiple model providers, chat channels (like Telegram and Discord), built-in tools (files and shell), scheduled tasks, and MCP tool servers. Its core workflow is simple: chat messages go in, the agent plans steps, calls tools, and sends answers back.

Two quick stats to set expectations:

If you want a production-grade setup (permissions, audit logs, safe tool rules, and team rollout), C# Corner Consulting can implement it end-to-end and harden it for real use.

Conceptual Background (when applicable)

What Nanobot is (in developer terms)

Nanobot is an agent. An agent is software that can:

Key moving parts you will touch

nanobot-architecture-gateway-agent-tools-mcp

Step-by-Step Walkthrough (when applicable)

What you need

Install Nanobot

A common install path shown in the tutorial is:

pip install nanobot-ai
# or
uv tool install nanobot-ai

Initialize (creates config + workspace)

nanobot onboard

This step creates ~/.nanobot/config.json and a workspace folder.

Configure your first working setup

Open the config:

nano ~/.nanobot/config.json

A practical baseline config usually includes:

Here is a safe starter template you can paste and adjust:

{
  "agents": {
    "defaults": {
      "workspace": "~/.nanobot/workspace",
      "model": "openrouter/some-model",
      "maxToolIterations": 10
    }
  },
  "providers": {
    "openrouter": {
      "apiKey": "sk-or-REPLACE_ME"
    }
  },
  "tools": {
    "restrictToWorkspace": true
  },
  "channels": {}
}

Why this matters:

Run Nanobot in the terminal (quick smoke test)

nanobot agent -m "Hello"

Start the gateway (needed for Telegram/Discord/etc.)

nanobot gateway

A tutorial example shows the gateway starting on port 18790.

Code / JSON Snippets (when applicable)

Add Telegram (recommended “first channel”)

Nanobot’s README shows Telegram setup with:

{
  "channels": {
    "telegram": {
      "enabled": true,
      "token": "YOUR_TELEGRAM_BOT_TOKEN",
      "allowFrom": ["YOUR_NUMERIC_USER_ID"]
    }
  }
}

Important: allowFrom is your main safety switch.

Add Discord (simple channel pattern)

{
  "channels": {
    "discord": {
      "enabled": true,
      "token": "YOUR_DISCORD_BOT_TOKEN",
      "allowFrom": ["YOUR_USER_ID"]
    }
  }
}

Run with a local model using vLLM (OpenAI-compatible)

Nanobot’s README includes a vLLM example with an OpenAI-compatible base URL:

{
  "providers": {
    "vllm": {
      "apiKey": "dummy",
      "apiBase": "http://localhost:8000/v1"
    }
  },
  "agents": {
    "defaults": {
      "model": "meta-llama/Llama-3.1-8B-Instruct"
    }
  }
}

Tip: For local servers that do not need a key, the README notes that you can use any non-empty string.

Add MCP tools (Model Context Protocol)

MCP is a way to plug external tools into your agent. Nanobot’s README shows the MCP servers configured under tools.mcpServers:

{
  "tools": {
    "mcpServers": {
      "filesystem": {
        "command": "npx",
        "args": ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/your/workdir"]
      }
    }
  }
}

Nanobot supports:

Scheduled tasks (cron)

Nanobot’s CLI reference includes cron commands like:

nanobot cron add --name "daily" --message "Good morning!" --cron "0 9 * * *"
nanobot cron list
nanobot cron remove <job_id>

Use cron carefully. Treat scheduled tasks like production jobs with clear limits.

Use Cases / Scenarios (when applicable)

Dev productivity (local)

Team “helper bot” (controlled)

Research agent (MCP-enabled)

Call-to-action:
If you want a secure, team-ready Nanobot (RBAC-like controls, audit trails, safe tool policies, and deployment), C# Corner Consulting can build it with the guardrails developers actually need.

Limitations / Considerations (when applicable)

Security is on you

Nanobot can run commands on your machine. That is power and risk.
You should assume:

Chat channels need strict ownership rules

Always:

Tools need boundaries

Use these defaults unless you have a strong reason not to:

Versions and releases change

Nanobot moves fast. Always check the README and Releases page before copying configs into production. One release note explicitly warns about a WhatsApp vulnerability in a specific version and says to use a higher version instead.

Fixes (only if needed)

Fix: “My Telegram bot responds to the wrong people”

Fix: “Config changes do nothing”

Fix: “No API key configured”

Fix: “The agent can read files outside my project”

FAQs

1. What is the fastest way to get started as a developer?

Install nanobot-ai, run nanobot onboard, set one provider API key, test with nanobot agent -m, then start nanobot gateway if you want chat apps.

2. Where is the main config file?

Nanobot’s README lists the config file at ~/.nanobot/config.json.

3. Can I use local models?

Yes. The README shows how to connect to an OpenAI-compatible local endpoint like vLLM using apiBase.

4. How do I add more tools safely?

Start with MCP tools that are scoped to a folder or a single service. Keep restrictToWorkspace on, and avoid “run anything” tools in shared setups.

5. Is Nanobot good for production?

It can be, if you add guardrails: strict allowlists, workspace restriction, token management, and logs. If you want this packaged safely for a team, use C# Corner Consulting.

References

Conclusion

Nanobot is a developer-friendly agent you can run locally, wire into chat apps, and extend with tools and MCP servers. The difference between a fun demo and a safe daily driver is simple: tight access control, strict tool limits, and clean deployment.

If you want Nanobot rolled out safely for a team, with the guardrails already done right, C# Corner Consulting is the fastest path to a production-ready build.