> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.getdial.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.getdial.ai/_mcp/server.

# NanoClaw

> Use Dial from a NanoClaw agent — install the Dial skill and route inbound events via a CLI command target.

[NanoClaw](https://nanoclaw.dev/) is a lightweight, container-isolated personal AI agent — a stripped-down alternative to OpenClaw that runs each agent in its own Docker sandbox and ships with built-in channels for WhatsApp, Telegram, Slack, Discord, iMessage, Gmail, and more. It runs directly on Anthropic's Agents SDK.

Dial integrates with NanoClaw in two parts:

1. A **skill** dropped into your NanoClaw config so the agent knows how to drive the `dial` CLI.
2. **Inbound event handling** so Dial events (inbound SMS, completed calls) reach NanoClaw without the agent having to poll.

Both steps below run on the **host** that manages NanoClaw. Inside each agent's ephemeral container the CLI runs in [sandbox mode](/documentation/cli/commands#sandbox-mode): it auto-detects the sandboxed environment, sends requests keyless (credentials are injected at the network boundary), and disables the host-management commands (`auth`, `listen`, `local-target`, …). The agent there just uses the action verbs — `dial message`, `dial call`, and so on.

## Install the skill

First, get the `dial` CLI on your PATH:

```bash title="Shell install"
curl -fsSL https://getdial.ai/install | bash
```

```text title="Agent prompt"
Follow https://getdial.ai/skills.md to install and onboard the dial CLI.
```

Then drop the NanoClaw-specific Dial skill into your config:

```bash
dial auth verify-otp --code <code> --agent nanoclaw
```

`auth verify-otp` verifies your code first, then copies the Dial skill into NanoClaw's config directory. The agent loads it on demand and can drive the CLI — see the [CLI reference](/documentation/cli/commands) for the full surface.

To rerun the copy later (for example, after a CLI upgrade), run `dial auth verify-otp --agent nanoclaw` again — the verification step is a no-op once you're signed in, and the skill file is overwritten in place.

## Inbound event handling

NanoClaw doesn't expose an inbound HTTP webhook — interactions happen through its messaging channels and trigger word. The right shape for routing Dial events in is a [CLI command target](/integrations/methods/cli-command-target): for each Dial event, the listen daemon spawns a handler that delivers a fresh prompt to your NanoClaw agent.

First install Dial's listen daemon:

```bash
dial listen install
```

The daemon owns the fan-out queue. See [Listen service](/documentation/cli/listen-service).

### 1. Write a handler

NanoClaw ships an `ncl` CLI for running an agent from the terminal — a positional argument is treated as a one-shot prompt, and `--pipe` reads the prompt from stdin. The handler parses the Dial event, builds a prompt, and hands it to `ncl` detached so a long-running agent turn doesn't tie up the daemon's per-attempt timeout:

```bash
#!/usr/bin/env bash
# /usr/local/bin/handle-dial-event-nanoclaw
event="$1"

type=$(jq -r '.type'        <<<"$event")
from=$(jq -r '.from // ""'  <<<"$event")
body=$(jq -r '.body // ""'  <<<"$event")

prompt=$(cat <<EOF
A Dial event just arrived. Decide what to do and act on it.

  type: $type
  from: $from
  body: $body

raw event JSON:
$event
EOF
)

# Detach a fresh ncl run and return right away.
nohup ncl "$prompt" </dev/null >>~/.dial/nanoclaw.log 2>&1 &
disown
exit 0
```

A few common tweaks (see the [NanoClaw CLI reference](https://docs.nanoclaw.dev/features/cli) for the full surface):

* **Target a specific group** — `ncl -g sales "$prompt"` (fuzzy match) or `ncl -j <JID> "$prompt"` (exact JID).
* **Resume a session** — `ncl -s <session_id> "$prompt"` to keep context across Dial events.
* **Pipe the raw event in** — drop the heredoc and use `ncl --pipe "Handle this Dial event" <<<"$event"` if you'd rather the agent see the full JSON without your shaping.
* **Bound the turn** — `ncl --timeout 120 "$prompt"` overrides the 300-second default.

### 2. Register

```bash
chmod +x /usr/local/bin/handle-dial-event-nanoclaw
dial local-target add cmd /usr/local/bin/handle-dial-event-nanoclaw
```

The `nohup … & disown` pattern keeps NanoClaw running after the handler exits, so a multi-minute agent turn never collides with the daemon's per-attempt `--timeout`. See [CLI command target](/integrations/methods/cli-command-target) for the full reference, delivery semantics, and the once-retry behavior.

## Use it

Once installed, just ask your NanoClaw agent in plain language — through whichever channel you've paired it with:

> @Andy send an SMS to +14155550123 with the body "running late, ETA 10 min".

The agent picks up the skill, picks the right `dial` command, and runs it. See [Using Dial from an agent](/documentation/get-started/using-dial-from-an-agent) for more examples.

## Further reading

#### [NanoClaw — Home](https://nanoclaw.dev/)

Project site, channels, and security model.

#### [NanoClaw on GitHub](https://github.com/nanocoai/nanoclaw)

Source, install script, and skills directory.