2026-04-19 09:42:17 +00:00
# Install and Quick Start
2026-11-19 16:48:17 +08:00
Get your first reply from nanobot in a few minutes. Skip chat apps, MCP servers, and deployment until this basic setup works.
2026-06-10 00:36:22 +08:00
2026-11-19 16:48:17 +08:00
If terminals, Python, or API keys are new to you, start with the [beginner walkthrough ](./start-without-technical-background.md ) instead.
2026-06-10 00:36:22 +08:00
2026-11-19 16:48:17 +08:00
> [!NOTE]
> These docs follow the latest development branch, while the installer below installs the latest stable release. If a screen looks different, check `nanobot --version` and see the [matching release guide](https://nanobot.wiki/docs/latest/getting-started/quick-start).
2026-06-10 00:36:22 +08:00
2026-07-14 13:59:47 +08:00
## What You Need
2026-06-10 00:36:22 +08:00
- Python 3.11 or newer.
2026-11-19 16:48:17 +08:00
- Access to a supported AI provider, company endpoint, or local model server (such as Ollama).
- The API key (or sign-in) and model ID for that service.
2026-04-19 09:42:17 +00:00
2026-11-19 16:48:17 +08:00
Packaged releases include the WebUI and native terminal UI (TUI) for macOS, Linux, and Windows—no Node.js or frontend build tools are needed.
2026-04-19 09:42:17 +00:00
2026-07-14 13:59:47 +08:00
## 1. Install nanobot
2026-06-10 00:36:22 +08:00
2026-11-19 16:48:17 +08:00
The official installer sets up nanobot in its own isolated environment and automatically opens the WebUI on a local desktop.
2026-06-10 00:36:22 +08:00
2026-07-14 13:59:47 +08:00
**macOS / Linux**
2026-06-10 00:36:22 +08:00
```bash
2026-06-16 12:57:46 +05:00
curl -fsSL https://raw.githubusercontent.com/HKUDS/nanobot/main/scripts/install.sh | sh
2026-06-10 00:36:22 +08:00
```
2026-07-14 13:59:47 +08:00
**Windows PowerShell**
2026-06-10 00:36:22 +08:00
```powershell
irm https : // raw . githubusercontent . com / HKUDS / nanobot / main / scripts / install . ps1 | iex
```
2026-11-19 16:48:17 +08:00
You can inspect [`install.sh` ](../scripts/install.sh ) or [`install.ps1` ](../scripts/install.ps1 ) before running them. If `nanobot` is not on your `PATH` afterward, use the full command printed at the end of the installer output.
2026-06-10 00:36:22 +08:00
2026-07-26 01:22:25 +08:00
## 2. Configure Your Model
2026-06-10 00:36:22 +08:00
2026-11-19 16:48:17 +08:00
When the WebUI opens in your browser, go to **Settings → Models** :
2026-06-10 00:36:22 +08:00
2026-11-19 16:48:17 +08:00
1. Click **New preset** and give it a name (if **Convert to presets** appears, click it first).
2. Open **Provider** and select your provider—or click **Add provider** to enter its API key / sign in.
3. Select a model from the list or enter a model ID available to your account.
4. Click **Save** .
2026-06-10 00:36:22 +08:00
2026-11-19 16:48:17 +08:00
If the browser did not open automatically, run:
2026-07-26 01:22:25 +08:00
```bash
nanobot webui
```
2026-11-19 16:48:17 +08:00
On a headless server or over SSH, use the terminal wizard instead:
2026-04-19 09:42:17 +00:00
2026-06-10 00:36:22 +08:00
```bash
2026-06-21 21:33:25 +08:00
nanobot onboard --wizard
2026-06-10 00:36:22 +08:00
```
2026-04-19 09:42:17 +00:00
2026-11-19 16:48:17 +08:00
By default, nanobot stores its files under `~/.nanobot/` :
| Path | Purpose |
|---|---|
| `~/.nanobot/config.json` | Providers, models, channels, tools, and runtime settings |
| `~/.nanobot/workspace/` | Memory, skills, automations, and generated files |
| `~/.nanobot/sessions/` | Saved conversation history |
2026-07-14 13:59:47 +08:00
## 3. Check the Setup
2026-06-10 00:36:22 +08:00
2026-11-19 16:48:17 +08:00
Verify your local configuration without making a model request:
2026-07-14 13:59:47 +08:00
```bash
nanobot status
```
2026-06-10 00:36:22 +08:00
2026-11-19 16:48:17 +08:00
Confirm that **Config** and **Workspace** show a check mark, your chosen model/preset is listed, and its provider is configured. Unused providers showing `not set` is normal.
2026-06-10 00:36:22 +08:00
2026-07-14 13:59:47 +08:00
## 4. Get the First Reply
2026-11-19 16:48:17 +08:00
In the WebUI (running locally on `http://127.0.0.1:8765` , reachable only from your machine), send:
2026-07-14 13:59:47 +08:00
```text
Hello!
```
2026-11-19 16:48:17 +08:00
Any normal reply confirms that your config, provider, workspace, and WebUI are all working.
2026-07-14 13:59:47 +08:00
2026-11-19 16:48:17 +08:00
### Managing the background gateway
2026-10-21 19:16:56 +08:00
2026-11-19 16:48:17 +08:00
With the official installer, nanobot runs a background gateway so closing the browser or terminal does not stop it. You can manage it anytime:
2026-07-14 13:59:47 +08:00
```bash
nanobot gateway status
2026-11-19 16:48:17 +08:00
nanobot gateway logs
nanobot gateway restart
nanobot gateway stop
2026-07-14 13:59:47 +08:00
```
2026-11-19 16:48:17 +08:00
If you installed nanobot another way (such as `uv` or `pip` ), `nanobot webui` stops when you close the terminal unless you start it with `nanobot webui --detach` or `nanobot gateway --background` .
2026-07-14 13:59:47 +08:00
## Terminal-Only Check
2026-11-19 16:48:17 +08:00
To test without a browser, send a single message from the terminal:
2026-07-14 13:59:47 +08:00
```bash
2026-11-19 16:48:17 +08:00
nanobot agent -m "Hello!"
2026-07-14 13:59:47 +08:00
```
2026-11-19 16:48:17 +08:00
Or open an interactive terminal chat:
2026-07-14 13:59:47 +08:00
```bash
2026-08-27 14:38:40 +08:00
nanobot
2026-07-14 13:59:47 +08:00
```
2026-11-19 16:48:17 +08:00
In interactive mode, `Enter` sends and `Shift+Enter` (or `Ctrl+J` ) inserts a newline. While nanobot is replying, `Enter` sends immediately, `Tab` queues your message for after the reply, and `Option+Up` (macOS) / `Alt+Up` (Windows/Linux) edits your queued message. Exit with `exit` , `/exit` , `:q` , or `Ctrl+D` .
2026-07-14 13:59:47 +08:00
2026-10-13 00:44:25 +08:00
## Continue with nanobot
2026-07-14 13:59:47 +08:00
2026-11-19 16:48:17 +08:00
Once you have your first reply, you can ask nanobot directly in chat to guide your next setup step. When the built-in `nanobot-document` skill is enabled (under **Skills → Installed** ), nanobot reads the documentation bundled with your installation. For example:
2026-10-13 00:44:25 +08:00
2026-11-19 16:48:17 +08:00
- *"I am already using the WebUI. Help me connect Telegram and allow only my account."*
- *"Explain what is shared when I start a new topic or choose a different project."*
- *"My second model preset returns an authentication error. Help me find which setting to check."*
2026-10-13 00:44:25 +08:00
2026-11-19 16:48:17 +08:00
To invoke the documentation skill explicitly:
2026-10-13 00:44:25 +08:00
```text
$nanobot-document Explain how sessions, workspaces, and memory relate in this installation.
```
2026-11-19 16:48:17 +08:00
Or read the guides yourself—add one capability and test it before moving on:
2026-07-14 13:59:47 +08:00
| Goal | Recommended path |
|---|---|
2026-11-19 16:48:17 +08:00
| Learn topics, workspaces, tools, and access modes | [WebUI guide ](./webui.md ) |
| Connect a chat app | Open **Channels** , then check [Chat Apps ](./chat-apps.md ) for platform steps |
| Change or add a model | Open **Settings → Models** or browse the [Provider Cookbook ](./provider-cookbook.md ) |
| Add web search, voice, or image generation | Open **Settings → Capabilities** (see [Configuration ](./configuration.md ) for advanced options) |
| Add a plugin, CLI App, or MCP server | Open **Apps** or follow [Configure MCP Tools ](./guides/configure-mcp-tools.md ) |
| Schedule tasks or triggers | Read [Automations ](./automations.md ) |
2026-07-14 13:59:47 +08:00
| Run continuously or remotely | Read [Deployment ](./deployment.md ) |
2026-11-19 16:48:17 +08:00
| Integrate from Python | Use the [Python SDK ](./python-sdk.md ) |
2026-07-14 13:59:47 +08:00
## Other Install Methods
2026-11-19 16:48:17 +08:00
Pick one method below, then continue at [Configure Your Model ](#2-configure-your-model ).
2026-07-14 13:59:47 +08:00
**uv**
```bash
uv tool install nanobot-ai
2026-07-26 01:22:25 +08:00
nanobot webui
2026-07-14 13:59:47 +08:00
```
2026-11-19 16:48:17 +08:00
**pip (inside a virtual environment)**
2026-07-14 13:59:47 +08:00
```bash
python -m pip install nanobot-ai
2026-07-26 01:22:25 +08:00
nanobot webui
2026-07-14 13:59:47 +08:00
```
2026-11-19 16:48:17 +08:00
If pip reports `externally-managed-environment` , use the official installer, `uv tool install nanobot-ai` , `pipx install nanobot-ai` , or a virtual environment instead of forcing a system-wide install.
2026-07-14 13:59:47 +08:00
2026-11-19 16:48:17 +08:00
**From source (latest `main`)**
2026-07-14 13:59:47 +08:00
2026-11-19 16:48:17 +08:00
Requires Git. nanobot downloads the matching Bun runtime automatically for the TUI; Node.js is not required.
2026-07-14 13:59:47 +08:00
```bash
git clone https://github.com/HKUDS/nanobot.git
cd nanobot
2026-11-14 22:36:01 +08:00
python3 -m venv .venv
2026-08-17 11:17:36 +08:00
```
2026-11-19 16:48:17 +08:00
On Windows, use `py -3 -m venv .venv` . Activate the environment (`source .venv/bin/activate` on macOS/Linux or `.venv\Scripts\Activate.ps1` in PowerShell), then run:
2026-08-17 11:17:36 +08:00
```bash
python -m pip install -e .
2026-07-26 01:22:25 +08:00
nanobot webui
2026-07-14 13:59:47 +08:00
```
2026-11-19 16:48:17 +08:00
For contributor details, see [`CONTRIBUTING.md` ](../CONTRIBUTING.md ).
2026-07-14 13:59:47 +08:00
2026-11-19 16:48:17 +08:00
<details>
<summary>If the <code>nanobot</code> command is not found</summary>
2026-07-14 13:59:47 +08:00
2026-11-19 16:48:17 +08:00
Reuse the full command printed by the official installer, or call Python directly from its dedicated environment:
2026-07-14 13:59:47 +08:00
2026-11-19 16:48:17 +08:00
- **macOS / Linux:** `~/.nanobot/venv/bin/python -I -m nanobot --version`
- **Windows PowerShell:** `& "$HOME\.nanobot\venv\Scripts\python.exe" -I -m nanobot --version`
2026-10-21 19:16:56 +08:00
2026-11-19 16:48:17 +08:00
Replace `--version` with `webui` , `status` , or any other subcommand. For `uv` or `pipx` installs, use the same package manager's environment.
2026-10-21 19:16:56 +08:00
2026-11-19 16:48:17 +08:00
</details>
2026-07-14 13:59:47 +08:00
## Manual Configuration Fallback
2026-10-13 00:44:25 +08:00
<details>
<summary>Manual configuration</summary>
2026-11-19 16:48:17 +08:00
Use this only when the WebUI and terminal wizard are unavailable or you manage `config.json` directly. Run `nanobot onboard` first, then merge a provider and named model preset into `~/.nanobot/config.json` :
2026-04-19 09:42:17 +00:00
```json
{
"providers" : {
2026-06-21 00:38:22 +08:00
"custom" : {
2026-07-14 13:59:47 +08:00
"apiKey" : "${PROVIDER_API_KEY}" ,
2026-06-21 00:38:22 +08:00
"apiBase" : "https://api.example.com/v1"
2026-04-19 09:42:17 +00:00
}
2026-07-14 13:59:47 +08:00
},
2026-06-10 00:36:22 +08:00
"modelPresets" : {
"primary" : {
2026-06-21 00:38:22 +08:00
"provider" : "custom" ,
2026-07-14 13:59:47 +08:00
"model" : "model-id-from-your-provider"
2026-06-10 00:36:22 +08:00
}
},
2026-04-19 09:42:17 +00:00
"agents" : {
"defaults" : {
2026-06-10 00:36:22 +08:00
"modelPreset" : "primary"
2026-04-19 09:42:17 +00:00
}
}
}
```
2026-11-19 16:48:17 +08:00
Keep the provider, endpoint URL, and model ID matched to the same service. See [Provider Cookbook ](./provider-cookbook.md ) for provider-specific examples and [Configuration ](./configuration.md ) for all fields.
2026-06-10 00:36:22 +08:00
2026-10-13 00:44:25 +08:00
</details>
2026-06-10 00:36:22 +08:00
## Updating
2026-11-19 16:48:17 +08:00
Open **Settings → About → Update** in the WebUI. Supported installations update and restart in place; others display instructions for their package manager. See [Updating nanobot ](./updating.md ) for preview releases, backups, and recovery.
2026-10-21 19:16:56 +08:00
2026-11-19 16:48:17 +08:00
For standard Python virtual environments, you can also update from the CLI:
2026-06-10 00:36:22 +08:00
```bash
2026-10-21 19:16:56 +08:00
nanobot update --check
nanobot update
2026-06-16 22:18:56 +08:00
```
2026-07-14 13:59:47 +08:00
## If the First Reply Fails
2026-11-19 16:48:17 +08:00
Change one thing at a time. Start with:
2026-06-10 00:36:22 +08:00
```bash
2026-07-14 13:59:47 +08:00
nanobot --version
nanobot status
nanobot agent -m "Hello!"
2026-06-10 00:36:22 +08:00
```
2026-07-14 13:59:47 +08:00
| Symptom | First check |
|---|---|
2026-11-19 16:48:17 +08:00
| `nanobot: command not found` | Reuse the full command printed by the installer (see [Other Install Methods ](#other-install-methods )) |
| JSON parse error | Check commas and braces; remember that doc examples are snippets to merge |
| `401` or invalid API key | Confirm the key belongs to the selected provider and has no extra spaces |
| Model not found | Use a model ID available to your account on the selected provider |
| CLI works, but WebUI does not open | Open port `8765` , not the gateway health port `18790` |
| WebUI works, but a chat app does not | Check **Channels** in WebUI, then run `nanobot channels status` |
2026-06-10 00:36:22 +08:00
2026-11-19 16:48:17 +08:00
Continue with [Troubleshooting ](./troubleshooting.md ) if the cause is still unclear.