Jul 20, 2026

Debugging Nanobot with Zhipu AI and Building WebUI

01. Install Nanobot

Make sure Nanobot is installed in your virtual environment.

(venv) pip install nanobot
  • Activate your virtual environment
  • Run pip install nanobot
  • Verify installation with nanobot status

02. Enable WebUI

Nanobot provides a web interface you can launch.

nanobot webui
  • From your project directory, run nanobot webui
  • This starts a local server (default port 8080)
  • You’ll see a message like Running on http://localhost:8080

03. Access in Browser

Open the WebUI in your browser.

  • Navigate to http://localhost:8080
  • You should see the Nanobot WebUI dashboard
  • Use it to manage agents, models, and workflows

04. Configure Defaults

Set provider and model in config for WebUI use.

~/.nanobot/config.json
  • Add provider: zhipu
  • Add model: glm-5.1
  • Restart nanobot webui to apply changes

05. Optional: Change Port

If port 8080 is already in use, specify another.

nanobot webui --port 3000
  • Then open http://localhost:3000

Runtime Details

To check which provider and model Nanobot is using, run:

nanobot status

Example output:

🐈 nanobot Status
Model: GLM-5.1
Zhipu AI: ✓
OpenAI: not set
Anthropic: not set
...
    

Nanobot does not have a --debug option. Instead, check logs in ~/.nanobot/workspace/logs for runtime details.

Summary

Install Nanobot, run nanobot webui, and open the localhost URL in your browser. From there you’ll have a graphical interface to manage your agents and models.

Q: How do I configure Nanobot to use Zhipu AI?

A: In ~/.nanobot/config.json or nanobot.yaml, I set both provider and model:

defaults:
  provider: zhipu
  model: glm-5.1
  

Without provider: zhipu, Nanobot may default to another backend like OpenAI.

Q: What does “out of quota” mean?

A: This error comes directly from Zhipu’s API. It means your account has run out of credits or has unpaid billing. The fix is to log into Zhipu’s dashboard, check quota, and top up your plan.

Q: Can I use the Coding Plan API with Nanobot?

A: Yes. The Coding Plan is just a billing tier. Nanobot calls the same endpoint, so glm-5.1 works fine. The only difference is quota and billing limits.

Q: Why does it work locally but not on my remote server?

A: The problem was environment variables. On the remote server, I had to export my API key:

export ZHIPU_API_KEY=your_key_here
  

Then confirm it’s set:

echo $ZHIPU_API_KEY
  

I also tested connectivity with curl:

curl -H "Authorization: Bearer $ZHIPU_API_KEY" \
     -H "Content-Type: application/json" \
     -d '{"model":"glm-5.1","messages":[{"role":"user","content":"Hello"}]}' \
     https://open.bigmodel.cn/api/paas/v4/chat/completions
  

Q: How do I know which API, model, and provider Nanobot is using?

A: Run:

nanobot status
  

Example output:

🐈 nanobot Status
Model: GLM-5.1
Zhipu AI: ✓
OpenAI: not set
Anthropic: not set
...
  

This confirms Nanobot is using Zhipu AI with GLM‑5.1.

Q: Can I see runtime details with debug?

A: Nanobot doesn’t have a --debug flag. Instead:

  • Check logs in ~/.nanobot/workspace/logs.
  • Use nanobot status for active provider/model.
  • Run curl manually to see raw API responses.

Q: How do I build the WebUI from source?

A: Here’s the full process I followed:

  1. Clone the repo:
    git clone https://github.com/HKUDS/nanobot.git
    cd nanobot
  2. Create a virtual environment:
    python3 -m venv venv
    source venv/bin/activate
  3. Install backend dependencies:
    pip install -r requirements.txt
  4. Build the frontend:
    cd webui
    npm install
    npm run build
  5. Run the WebUI:
    nanobot webui
    or
    uvicorn nanobot.webui:app --reload --port 8080
  6. Open http://localhost:8080 in your browser.

0 comments: