NanoClaw

View as Markdown

NanoClaw 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: it auto-detects the sandboxed environment, sends requests keyless (credentials are injected at the network boundary), and disables the host-management commands (onboard, signup, 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:

$curl -fsSL https://getdial.ai/install | bash

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

$dial onboard --code <code> --agent nanoclaw

onboard finishes verification 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 for the full surface.

To rerun the copy later (for example, after a CLI upgrade), run dial onboard --agent nanoclaw again — the verification step is a no-op once you’re onboarded, 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: 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:

$dial listen install

The daemon owns the fan-out queue. See 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:

$#!/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 for the full surface):

  • Target a specific groupncl -g sales "$prompt" (fuzzy match) or ncl -j <JID> "$prompt" (exact JID).
  • Resume a sessionncl -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 turnncl --timeout 120 "$prompt" overrides the 300-second default.

2. Register

$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 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 for more examples.

Further reading