> ## Documentation Index
> Fetch the complete documentation index at: https://docs.venice.ai/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> The Venice API is OpenAI-compatible: use any OpenAI SDK with the base URL `https://api.venice.ai/api/v1` and a Venice API key, or pay per request from a USDC wallet through x402 with no account.
> Read model IDs from `GET /models` or `GET /models/traits` at runtime instead of hardcoding them from memory or from these pages. Models are added and retired often.
> Every model's price is in https://docs.venice.ai/pricing.md. Quote video and audio jobs with `POST /video/quote` or `POST /audio/quote` before you queue them.
> Search these docs from an MCP client at https://docs.venice.ai/mcp. The full agent guide is https://docs.venice.ai/agents.md.

# NanoClaw

> Deploy NanoClaw, a self-hosted AI assistant for WhatsApp and Telegram, on Venice AI with Docker isolation and a choice of Private or Anonymized models.

[NanoClaw](https://github.com/qwibitai/nanoclaw) is a lightweight, self-hosted AI assistant that runs on WhatsApp and Telegram. This fork adds Venice AI support, so it runs on the Venice API without an Anthropic subscription.

> [card] Pay Per Token
>
> No subscription. Pay only for what you use

> [card] Private Inference
>
> Zero data retention on Venice servers

> [card] Docker Isolation
>
> Each chat runs in its own secure container

***

## Why Venice AI?

[Venice](https://venice.ai/?utm_source=venice-api-documentation) is a privacy-first AI platform. They [don't store or log any prompts or responses](https://venice.ai/privacy?utm_source=venice-api-documentation) on their servers — your conversations exist only on your device. Requests are encrypted in transit through their proxy to decentralized GPU providers, with zero data retention.

Venice provides anonymized access to frontier models (Claude Opus, Claude Sonnet) and private access to many open-source models through a single API — switch between them anytime. Privacy is set per model, not per family: some GLM and Qwen models are Anonymized, so check `model_spec.privacy` in the [Models API](https://docs.venice.ai/api-reference/endpoint/models/list.md) for the model you choose.

| | **Venice AI** | **Traditional AI providers** |
| - | - | - |
| **Data retention** | None — zero logs | Yes |
| **Prompt privacy** | Encrypted, never stored | Stored on provider servers |
| **Open-source models** | Yes (GLM, Qwen, and others) | No |
| **Frontier models** | Claude, GPT, and others — anonymously | Only through direct subscriptions |
| **Pricing** | Pay-per-token, no subscription. Or stake [DIEM](https://venice.ai/lp/diem?utm_source=venice-api-documentation) for daily refreshing credits | \$20–200/mo subscriptions or pay-per-token API |
| **Uncensored inference** | Yes (open-source models) | No |

***

## Why NanoClaw?

NanoClaw is a clean, minimal alternative to larger platforms like OpenClaw. It's designed for one person running one bot.

| | **NanoClaw (Venice)** | **OpenClaw** |
| - | - | - |
| **Codebase** | \~2,000 lines, handful of files | \~500,000 lines, 53 config files |
| **Dependencies** | \~15 packages | 70+ packages |
| **Security model** | OS-level Docker container isolation | Application-level allowlists and pairing codes |
| **Per-group isolation** | Each group gets its own container, filesystem, and memory | Shared process, shared memory |
| **Setup** | One wizard (`/setup`), \~10 minutes | Manual multi-step configuration |
| **AI provider** | Venice AI (private, no subscription) | Anthropic (requires API key or subscription) |
| **Customization** | Edit the code directly — it's small enough to read | Config files and plugins |
| **Target user** | One person, one bot | Multi-user platform |

***

## What You Get

* Personal AI assistant on **Telegram** and/or **WhatsApp**
* Powered by **Venice AI** — no Anthropic account needed
* Bot runs in an **isolated Docker container** (sandboxed, can't access your system)
* **Model switching** — tell the bot "switch to zai-org-glm-5" or "use opus" anytime
* **Scheduled tasks** — set reminders, recurring tasks
* **Web search and browsing** built in
* **Markdown formatting** in Telegram messages

***

## Prerequisites

> [card] [Node.js 20+](https://nodejs.org/)
>
> Check with `node --version`

> [card] [Docker](https://docker.com/products/docker-desktop)
>
> Install and open once so it's running

> [card] [Claude Code CLI](https://claude.ai/download)
>
> Check with `claude --version`

> [card] [Venice API Key](https://venice.ai/settings/api?utm_source=venice-api-documentation)
>
> Generate from your Venice account

**For Telegram** (recommended for first-time users):

1. Open Telegram and search for **@BotFather**
2. Send `/newbot` and follow the prompts
3. Save the token BotFather gives you (looks like `123456789:ABCdef...`)

> [!WARNING]
>
> **For WhatsApp — use a virtual number, NOT your personal one:**
>
> NanoClaw connects as a linked device on your WhatsApp number. That means **the agent can see every message coming in and going out** — all your personal conversations, group chats, photos, everything. Your phone still works normally, but the bot has full visibility into your entire WhatsApp account.
>
> **Use a virtual phone number instead.** These apps give you a second number that you can dedicate entirely to the bot:
>
> | App | Price | Notes |
> | - | - | - |
> | [Hushed](https://hushed.com) | \~\$5/mo | Reliable, works well for WhatsApp verification |
> | [Burner](https://www.burnerapp.com) | \~\$5/mo | Similar to Hushed, disposable numbers |
> | [Google Voice](https://voice.google.com) | Free | US-only, may not work for WhatsApp verification in all cases |
>
> **How to set it up:**
>
> 1. Get a virtual number from one of the apps above
> 2. Install WhatsApp on a second device (old phone, tablet, or emulator) using that virtual number
> 3. During NanoClaw setup, scan the QR code with that second device — not your personal phone

***

## Setup

The setup takes about 10 minutes. You only need **one Terminal window**.

**1. Clone and Install**

Open Terminal and run:

```bash theme={"system"}
git clone https://github.com/lorenzovenice/nanoclaw-venice.git
cd nanoclaw-venice
npm install
```

Wait for `npm install` to finish with no errors.

**2. Launch Claude Code with Venice**

Replace `your-key` with your Venice API key and run:

```bash theme={"system"}
VENICE_API_KEY=your-key npm run venice
```

This starts the Venice proxy and launches Claude Code through it in a single command.

> [!NOTE]
>
> Claude Code defaults to **GLM 5** (`zai-org-glm-5`) to keep setup costs low. After setup, type `/model` inside Claude Code to switch to `claude-sonnet-4-6` or `claude-opus-4-6` for best performance.

If prompted "Do you want to use this API key?" — select **Yes**.

**3. Run the Setup Wizard**

In your Claude Code terminal, type:

```
/setup
```

The wizard walks you through:

1. **Bootstrap** — checks Node.js and dependencies
2. **Venice API key** — validates and saves your key
3. **Channel choice** — pick WhatsApp, Telegram, or both
4. **Container build** — builds the Docker container (takes a few minutes first time)
5. **WhatsApp auth** — scan QR code with your phone (if applicable)
6. **Telegram setup** — send a message to your bot so it detects your chat
7. **Trigger word** — prefix that activates the bot (default: `@Andy`)
8. **Mount directories** — pick "No" for now (you can add file access later)
9. **Start services** — NanoClaw and the Venice proxy both start as background services

The setup wizard installs two background services:

* **NanoClaw** — the bot itself
* **Venice proxy** — a small local server (localhost:4001) that translates between Claude Code and Venice AI

Both start automatically on boot and restart themselves if they crash.

> [!NOTE]
>
> If the wizard stops between steps, type "continue" or "next step" to nudge it forward.

**4. Start Chatting**

Once setup is complete, open your chat (Telegram or WhatsApp) and send:

```
@Andy hello, are you there?
```

The bot should respond within seconds. In your main channel, you can type normally without the `@Andy` prefix.

**You can now close the terminal window.** Everything runs as background services and starts automatically when your computer boots.

***

## How It Works

There are two layers to NanoClaw:

| Layer | What It Does |
| - | - |
| **Claude Code CLI** | Admin tool for setup, debugging, and customization |
| **The Bot** | AI in your chat, running inside an isolated Docker container |

To open Claude Code anytime:

```bash theme={"system"}
cd nanoclaw-venice
ANTHROPIC_BASE_URL=http://localhost:4001 ANTHROPIC_API_KEY=venice-proxy claude
```

Use it to run `/setup`, `/debug`, `/customize`, or make changes to the bot's behavior.

***

## Models

| Context | Default Model | How to Switch |
| - | - | - |
| Bot (in chat) | `claude-sonnet-4-6` | Tell the bot: "switch to opus" or "use zai-org-glm-5" |
| Claude Code CLI | `zai-org-glm-5` (GLM 5) | Use `/model` in Claude Code or `claude --model <name>` |

> [!TIP]
>
> The CLI defaults to GLM 5 to keep setup costs low. After setup, switch to `claude-sonnet-4-6` or `claude-opus-4-6` for best performance.

> [!NOTE]
>
> The bot's default, `claude-sonnet-4-6`, and `claude-opus-4-6` are Anonymized models. `zai-org-glm-5` is a Private model. If every chat needs the Private tier, switch the bot to a model whose `model_spec.privacy` is `private`.

See the [model catalog](https://docs.venice.ai/models/text.md) for all available Venice models.

***

## Troubleshooting

> [accordion] The proxy isn't running
>
> The Venice proxy runs as a background service and restarts itself automatically. If it's not working:
>
> **macOS:**
>
> ```bash theme={"system"}
> # Check if it's running
> launchctl list | grep venice-proxy
>
> # Restart it
> launchctl kickstart -k gui/$(id -u)/com.nanoclaw.venice-proxy
>
> # Check logs
> tail -f ~/nanoclaw-venice/logs/venice-proxy.log
> ```
>
> **Linux:**
>
> ```bash theme={"system"}
> # Check if it's running
> systemctl --user status nanoclaw-venice-proxy
>
> # Restart it
> systemctl --user restart nanoclaw-venice-proxy
>
> # Check logs
> tail -f ~/nanoclaw-venice/logs/venice-proxy.log
> ```

> [accordion] Claude Code shows 403 error or 'Please run /login'
>
> This means Claude Code can't connect to the Venice proxy.
>
> 1. **Check the proxy is running.** See the troubleshooting step above.
> 2. **Make sure you're in the right folder.** Always `cd nanoclaw-venice` first.
> 3. **Start fresh:** Close all terminals and run:
>    ```bash theme={"system"}
>    cd nanoclaw-venice
>    ANTHROPIC_BASE_URL=http://localhost:4001 ANTHROPIC_API_KEY=venice-proxy claude
>    ```

> [accordion] Model errors ('model does not exist')
>
> Restart the proxy and the bot:
>
> **macOS:**
>
> ```bash theme={"system"}
> # Restart proxy
> launchctl kickstart -k gui/$(id -u)/com.nanoclaw.venice-proxy
>
> # Restart bot
> launchctl kickstart -k gui/$(id -u)/com.nanoclaw
> ```
>
> **Linux:**
>
> ```bash theme={"system"}
> # Restart proxy
> systemctl --user restart nanoclaw-venice-proxy
>
> # Restart bot
> systemctl --user restart nanoclaw
> ```
>
> Check available models at the [model catalog](https://docs.venice.ai/models/text.md).

> [accordion] Bot doesn't respond to messages
>
> Work through these steps in order:
>
> 1. **Check your trigger word.** Make sure you're using the right prefix (e.g., `@Andy hello`).
> 2. **Check Docker is running.** Run `docker info` — if it errors, open Docker Desktop.
> 3. **Check the proxy is running.** See "The proxy isn't running" above.
> 4. **Check logs:** `tail -f logs/nanoclaw.log` in the project folder.
> 5. **Check container logs.** Open the `nanoclaw-venice/groups/main/logs/` folder. Open the most recent file that starts with `container-`.
> 6. **Restart everything:** Restart both proxy and bot (see above).

> [accordion] Container build fails during setup
>
> Make sure Docker Desktop is open and running. Wait 10 seconds for Docker to fully start, then type `continue` in the wizard to retry.

> [accordion] WhatsApp disconnected
>
> Your WhatsApp session can expire. To reconnect:
>
> ```bash theme={"system"}
> cd nanoclaw-venice
> npm run auth
> ```
>
> Scan the QR code with WhatsApp (Settings → Linked Devices → Link a Device), then restart the bot:
>
> * macOS: `launchctl kickstart -k gui/$(id -u)/com.nanoclaw`
> * Linux: `systemctl --user restart nanoclaw`

***

## Advanced

> [accordion] Give the bot access to files on your computer
>
> By default, the bot is completely walled off from your computer — it can only see its own memory and conversation history.
>
> * **During setup:** When asked about directory access, choose "Yes"
> * **After setup:** Run `/customize` in Claude Code

> [accordion] Manually start/stop the bot
>
> NanoClaw runs two background services that start automatically on boot.
>
> **macOS:**
>
> | Action | Command |
> | - | - |
> | Start bot | `launchctl load ~/Library/LaunchAgents/com.nanoclaw.plist` |
> | Stop bot | `launchctl unload ~/Library/LaunchAgents/com.nanoclaw.plist` |
> | Restart bot | `launchctl kickstart -k gui/$(id -u)/com.nanoclaw` |
> | Start proxy | `launchctl load ~/Library/LaunchAgents/com.nanoclaw.venice-proxy.plist` |
> | Stop proxy | `launchctl unload ~/Library/LaunchAgents/com.nanoclaw.venice-proxy.plist` |
> | Restart proxy | `launchctl kickstart -k gui/$(id -u)/com.nanoclaw.venice-proxy` |
>
> **Linux:**
>
> | Action | Command |
> | - | - |
> | Start bot | `systemctl --user start nanoclaw` |
> | Stop bot | `systemctl --user stop nanoclaw` |
> | Restart bot | `systemctl --user restart nanoclaw` |
> | Start proxy | `systemctl --user start nanoclaw-venice-proxy` |
> | Stop proxy | `systemctl --user stop nanoclaw-venice-proxy` |
> | Restart proxy | `systemctl --user restart nanoclaw-venice-proxy` |

> [accordion] Using Claude Code through Venice (no bot)
>
> If you just want Claude Code with Venice and don't need WhatsApp/Telegram, the proxy service needs to be running. If you've already run `/setup`, it's already running as a background service.
>
> ```bash theme={"system"}
> cd nanoclaw-venice
> ANTHROPIC_BASE_URL=http://localhost:4001 ANTHROPIC_API_KEY=venice-proxy claude
> ```
>
> **Tip:** Add this to your `~/.zshrc` (or `~/.bashrc`) so you can quickly switch any terminal to Venice:
>
> ```bash theme={"system"}
> alias venice='export ANTHROPIC_BASE_URL=http://localhost:4001 && export ANTHROPIC_API_KEY=venice-proxy && echo "Using Venice API"'
> alias anthropic='unset ANTHROPIC_BASE_URL && unset ANTHROPIC_API_KEY && echo "Using Anthropic API"'
> ```
>
> Then just type `venice` in any terminal before running `claude` to use Venice, or `anthropic` to switch back.

> [accordion] Running multiple bots
>
> You can run multiple NanoClaw bots on the same machine (e.g., one for personal use and one for a team). Just clone the repo into a different folder and run setup again. Note: they share the same Docker image, so rebuilding one affects all of them.

> [accordion] Developer commands
>
> For people who want to modify NanoClaw's code:
>
> ```bash theme={"system"}
> npm run dev          # Start proxy + NanoClaw with hot reload
> npm run proxy        # Start just the Venice proxy
> npm run build        # Compile TypeScript
> npm test             # Run tests
> ./container/build.sh # Rebuild agent container
> ```

***

## Architecture

```
You (WhatsApp/Telegram)
        ↓
   NanoClaw (Node.js)
        ↓
   Docker Container (isolated sandbox)
        ↓
   Venice Proxy (localhost:4001)
        ↓
   api.venice.ai (Venice API)
```

| File | Purpose |
| - | - |
| `proxy/venice-proxy.ts` | Translates Anthropic format to OpenAI format for Venice |
| `src/index.ts` | Main orchestrator — message loop, agent invocation |
| `src/channels/whatsapp.ts` | WhatsApp connection via baileys |
| `src/channels/telegram.ts` | Telegram bot via grammy |
| `src/container-runner.ts` | Spawns isolated agent containers |

***

## FAQ

> [accordion] Why do I need a proxy?
>
> The Claude Agent SDK speaks Anthropic's message format. Venice speaks OpenAI's format. The proxy translates between them so everything works without modifying the SDK.

> [accordion] Can I use open-source models?
>
> Yes. Venice hosts many models. Tell the bot "switch to zai-org-glm-5" or any Venice model ID. See the [model catalog](https://docs.venice.ai/models/text.md).

> [accordion] Is it secure?
>
> Agents run in Docker containers with real OS-level isolation. The Venice API key is passed via stdin, never written to disk inside containers. Each group gets its own isolated environment.

> [accordion] Do I need an Anthropic subscription?
>
> No. Everything runs through Venice AI. You only need a Venice API key.

> [accordion] Can I use this on a server?
>
> Yes. It works on any Linux machine with Docker. Use the systemd service for auto-start on boot.

***

## Resources

> [card] [NanoClaw Venice Repo](https://github.com/lorenzovenice/nanoclaw-venice)
>
> Source code and full README

> [card] [Original NanoClaw](https://github.com/qwibitai/nanoclaw)
>
> Upstream project by qwibitai

> [card] [Venice Model Catalog](https://docs.venice.ai/models/text.md)
>
> Browse available models

> [card] [Venice Privacy](https://docs.venice.ai/overview/privacy.md)
>
> How Venice protects your data


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.