NanoClaw: Lightweight OpenClaw Alternative for Safer Local AI Agents

Run a personal AI assistant in container-isolated agent groups, connect messaging channels as needed, and keep the code in a fork you control.

NanoClaw is a free, open-source personal AI assistant that runs on your computer or server. Once you connect a messaging app such as Telegram, WhatsApp, or Slack, you can ask it questions, give it work involving your files, and have it send updates on a schedule.

Created as a lightweight alternative to OpenClaw, NanoClaw runs agent sessions in Docker containers by default. Each agent can have its own working files, memory, and AI provider. For example, you can give a development agent access to a project folder while keeping your personal assistant in a different workspace.

Features

  • Chat with your assistant through Telegram, WhatsApp, Discord, Slack, Microsoft Teams, and other connected services.
  • Schedule recurring jobs, including morning briefings and weekly project updates, directly from a conversation.
  • Give agents access to specific local folders and run their sessions inside Docker containers.
  • Use separate agents for different chats, or connect multiple channels to a shared agent and conversation.
  • Run Claude by default, or choose Codex, Cursor, or OpenCode for individual agent groups.
  • Create assistants from reusable templates containing instructions, skills, and MCP tools.
  • Extend your own NanoClaw fork with channel and provider skills as your needs change.
  • Search the web and work with connected MCP tools during agent tasks.
  • Store model credentials in a proxy gateway and grant specific service credentials to selected agent groups.

How NanoClaw Works

Send Nano a message in Telegram and the request goes to the agent attached to that chat. NanoClaw writes it to an incoming SQLite mailbox, wakes the agent’s Docker container, and returns the answer through an outgoing mailbox. Scheduled jobs use the same routing: each task runs in its own session and sends results to the destination named in its instructions.

One Node.js host coordinates those messages and sessions. Each agent group has its own instructions and memory, and its containers see the host directories you explicitly mount. You could connect a project folder to a coding agent and an Obsidian vault to a personal assistant. The agents would work with their own files and conversation histories.

You can also assign different AI providers to different agents. Claude is the default, but Codex and Cursor are available for coding-focused work, and OpenCode can connect to other hosted providers or a local OpenAI-compatible model server. Channels and providers are added through skills that update your NanoClaw fork. Once configured, everyday requests happen in chat, with a coding agent available when you want to change the underlying behavior.

Model credentials are stored in a gateway such as OneCLI or Iron Proxy. Requests routed through the gateway receive their credentials there, and current OneCLI installations can grant tool secrets to selected agent groups. A credential passed directly to an MCP server as an environment variable is visible inside its agent container, so model and service keys are better stored in the gateway.

NanoClaw vs. OpenClaw

Openclaw

Both assistants connect AI agents to messaging apps, but their design priorities differ. NanoClaw starts with containerized agent sessions and a small codebase you extend through skills. OpenClaw offers a larger ready-made integration ecosystem and optional sandboxing for tool execution.

QuestionNanoClawOpenClaw
Agent isolationDocker containers for agent sessions by default, with explicit folder mounts.Optional sandboxing for tool execution, alongside tool permissions and access controls.
ArchitectureA Node.js host routes messages to containerized sessions through SQLite.A gateway coordinates agents, channels, and integrations.
Adding capabilitiesInstall skills that add channel or provider code to your fork.Use its built-in integrations and plugin/skill ecosystem.
CustomizationModify a small source codebase with a coding agent; configure agent groups using ncl.Configure agents, tools, channels, and policies through gateway settings.
AI providersClaude, Codex, Cursor, and OpenCode are available per agent group.Choose models through its model-provider configuration.

What Can You Use NanoClaw For?

A research assistant can collect information from selected websites and turn it into a digest for a private chat. After scheduling the job, you can ask Nano to change its timing, inspect the task list, or pause future deliveries.

For a development project, an agent can review Git history, run tools available inside its container, and update documentation in a mounted repository. Another agent can search a notes folder or Obsidian vault and answer questions about those documents. Both tasks use a messaging app as the entry point, with access to the specific folders you assigned.

In Slack, several agents can work in shared rooms while keeping separate bot identities through NanoClaw’s optional managed Slack integration. A reporting agent can send cards with KPI values, tables, and charts through send_card. Templates give each new agent an initial role, instructions, and tools, letting a research assistant and a coding assistant work in the same workspace.

How to Use It

Installation

NanoClaw runs on macOS and Linux, or on Windows through WSL2. You need Git, Docker, and approximately 4 GB of RAM.

Clone the official repository and open its folder:

git clone https://github.com/nanocoai/nanoclaw.git nanoclaw-v2
cd nanoclaw-v2

Then start the setup wizard:

bash nanoclaw.sh

Setup asks which AI provider to use, installs a credential gateway, prepares the agent image, and connects your first chat channel. You can build the image locally with no NanoClaw account, or sign in to a free account for the optional hardened Claude image and managed Slack apps.

When the channel is ready, message your assistant directly or mention it in a group. These are examples of the requests you can send:

@Nano send an overview of the sales pipeline every weekday morning at 9am
@Nano review the git history for the past week each Friday
@Nano every Monday at 8am, compile news on AI developments and message me

You can manage the jobs through the same chat, including asking what is already scheduled or pausing a recurring briefing:

@Nano list all scheduled tasks across groups
@Nano pause the Monday briefing task
@Nano join the Family Chat group

To add a second assistant, select an agent template during setup or ask an existing agent to create one.

For example, you can browse the public template library with ncl templates list --registry, create a group with ncl groups create --template sales/sdr --name "SDR Agent", and connect it to a messaging channel through /manage-channels.

For tasks that must run on a precise schedule, use the host CLI as well. This example schedules a weekday briefing for one agent group. Replace the group ID and delivery destination with the values configured on your installation:

ncl tasks create --group <agent-group-id> --name "weekday briefing" --recurrence "0 9 * * 1-5" --prompt "Prepare a briefing and send it to telegram"

NanoClaw runs the scheduled prompt in a task session that is separate from your chat thread. The prompt names telegram because scheduled tasks do not automatically inherit a chat destination. You can pause the task from chat or with ncl tasks pause <task-id> --group <agent-group-id>.

Choosing an AI Provider or Local Model

Claude is the default runtime. During setup you can choose Codex, Cursor, or OpenCode, and existing agent groups can use different providers. You can run /add-codex, /add-cursor, or /add-opencode from a coding agent to add another provider.

For a local model, install OpenCode and configure it to call a local OpenAI-compatible model server. NanoClaw also maintains an /add-ollama-provider skill for routing an existing agent group to a running Ollama installation: start Ollama on the host, pull a tool-capable model, run the skill in your coding agent, and select the agent group and model.

Migrating from NanoClaw v1

If you have an older NanoClaw v1 installation, clone v2 into a different directory and run the migration script from that new checkout. You can point it at the old installation with NANOCLAW_V1_PATH if the script does not find it automatically:

bash migrate-v2.sh

Updating an Existing Installation

To update NanoClaw, open the checkout in your coding agent and run /update-nanoclaw. For a local OneCLI installation, assign its database password from the NanoClaw checkout:

pnpm exec tsx .claude/skills/add-onecli/scripts/postgres-password.ts

If an affected Codex/ChatGPT agent cannot respond after updating, reauthenticate with:

pnpm exec tsx setup/index.ts --step provider-auth codex

Then update the host runtime and rerun setup if NanoClaw manages your Node.js installation:

bash setup/install-node.sh
bash nanoclaw.sh

NanoClaw Cheat Sheet

Installation and lifecycle commands

Command / OptionPurpose
git clone https://github.com/nanocoai/nanoclaw.git nanoclaw-v2Clone the official repository into a new directory.
cd nanoclaw-v2Enter the NanoClaw checkout.
bash nanoclaw.shStart or resume the installer. Set up Docker, the agent runtime, credentials, and a chat channel.
bash migrate-v2.shMigrate supported state from an existing NanoClaw v1 install; run from a separate v2 checkout.
NANOCLAW_V1_PATH=/path/to/v1 bash migrate-v2.shGive the migration script an explicit v1 path.
bash setup/install-node.shRefresh Node.js after an update when Node is managed by NanoClaw.
/update-nanoclawRun the supported updater from your coding agent, usually on the stable release channel.
pnpm exec tsx .claude/skills/add-onecli/scripts/postgres-password.tsAssign a unique password to an existing local OneCLI database.
GW="$GW" sh .claude/skills/add-onecli/scripts/pre-upgrade-check.shBefore converting an older OneCLI gateway, inspect policies that migration would remove.
GW="$GW" sh .claude/skills/add-onecli/scripts/post-upgrade-check.shCheck the OneCLI grant conversion after upgrading the pinned gateway.
pnpm exec tsx setup/index.ts --step provider-auth codexReauthenticate a Codex/ChatGPT connection if a previous login fails after upgrading.
bash nanoclaw.sh --uninstall --dry-runPreview everything the uninstaller would remove.
bash nanoclaw.sh --uninstallInteractively uninstall this copy of NanoClaw.
bash nanoclaw.sh --uninstall --yesUninstall this copy without per-item confirmation.
pnpm exec tsx setup/portal.ts --stage echoRevisit setup for the optional hardened-image perk.
pnpm exec tsx setup/portal.ts --stage slackRevisit setup for the optional managed Slack perk.
source setup/lib/install-slug.sh && launchd_labelShow the current installation’s macOS service label.
source setup/lib/install-slug.sh && systemd_unitShow the current installation’s Linux user-service unit.

Slash commands, channel skills, and agent actions

CommandPurpose
@Nano ...Mention the configured assistant in a group chat. Direct messages do not require a mention; the name can be changed.
/customizeAsk a coding agent to change NanoClaw behavior, prompts, memory, or source code.
/debugInvestigate installation, scheduler, channel, or agent-runtime problems.
/setupOpen the repository’s guided setup skill; the recommended fresh-install command is bash nanoclaw.sh.
/manage-channelsConnect messaging channels to agents and select whether their sessions are separate or shared.
/manage-mountsManage which host folders are available inside agent containers.
/add-<channel>General pattern for installing a channel adapter into your NanoClaw fork.
/add-telegramInstall Telegram messaging.
/add-discordInstall Discord messaging.
/add-slackInstall Slack messaging.
/add-whatsappInstall WhatsApp messaging.
/add-whatsapp-cloudInstall the WhatsApp Cloud API channel.
/add-signalInstall Signal messaging.
/add-imessageInstall iMessage integration on a supported host.
/add-teamsInstall Microsoft Teams integration.
/add-mattermostInstall Mattermost integration.
/add-matrixInstall Matrix messaging.
/add-gchatInstall Google Chat integration.
/add-githubInstall the GitHub channel adapter.
/add-linearInstall Linear integration.
/add-wechatInstall WeChat integration.
/add-webexInstall Webex integration.
/add-resendInstall the Resend email channel.
/add-codexAdd OpenAI Codex as an agent provider.
/add-opencodeAdd OpenCode, including hosted providers and local OpenAI-compatible endpoints.
/add-cursorAdd Cursor Agent SDK as an agent provider.
/add-ollama-providerSet up a direct local Ollama-backed Claude-compatible agent group; may modify fork files.
/add-ollama-toolInstall a tool skill for working with Ollama.
/add-onecliInstall or refresh the OneCLI credential gateway integration.
/add-iron-proxyInstall the Iron Proxy credential gateway as an alternative.
/add-tavily-toolAdd Tavily-powered search as an agent tool.
/add-vercelAdd Vercel integration and grant its credentials to selected agents.
/add-dial-toolAdd Dial as a tool for selected agents, subject to gateway grants.
/add-dashboardAdd the optional NanoClaw dashboard.
/add-macos-statusbarAdd the optional macOS status-bar integration.
/update-nanoclawUpdate NanoClaw while managing changes in your fork.
/update-skillsRefresh installed skills.
/migrate-nanoclawReplay supported fork customizations onto a newer base.
/migrate-memoryMigrate compatible memory stored by different providers.
/migrate-from-v1Continue guided migration from NanoClaw v1.
/migrate-from-openclawUse the skill that assists migration from OpenClaw.
/clearClear the current conversation in a coding agent that supplies this command; not a NanoClaw skill.
/compactCompact the current coding-agent conversation when that agent supports it.
/costInspect coding-agent usage or cost when that command is available.
/statusInspect coding-agent status when that command is available.

Admin CLI commands

CommandPurpose
ncl helpDisplay available CLI resources and commands.
ncl <resource> helpDisplay a resource’s commands and available flags.
ncl groups listList the configured agent groups.
ncl groups create --folder <slug> --name "Agent Name"Create an agent group with its own workspace.
ncl groups config get --id <group-id>Read a group’s runtime configuration.
ncl groups config update --id <group-id> --provider <provider>Assign Claude, Codex, Cursor, or OpenCode to a group.
ncl groups config update --id <group-id> --model <model> --effort <level>Set a group’s model and supported effort level.
ncl groups config update --id <group-id> --timezone <IANA-timezone>Set the time zone used by the group’s scheduled tasks.
ncl groups config add-mcp-serverAdd an MCP server to a group (use ncl groups help config for all arguments).
ncl groups config remove-mcp-serverRemove an MCP server from a group.
ncl groups config add-packageAdd an OS or npm package to a group’s container.
ncl groups config remove-packageRemove a group package.
ncl groups restart --id <group-id>Restart the running sessions for an agent group.
ncl groups restart --id <group-id> --rebuildRebuild the group image and restart its sessions.
ncl groups restart --id <group-id> --message "Check the new tool"Restart a group and pass an on-wake instruction.
ncl templates listList agent templates already downloaded on this computer.
ncl templates list --registryBrowse the public agent-template library.
ncl groups create --template sales/sdr --name "SDR Agent"Create an agent from the selected template.
ncl wirings helpInspect channel-to-agent wiring commands.
ncl destinations helpInspect destination-management commands.
onecli agents list --max 0Find OneCLI agent IDs for assigning secrets.
onecli agents grants list --id <agent-id>Check which OneCLI secrets are granted to an agent.
onecli agents grants attach-secret --id <agent-id> --secret-id <secret-id>Grant one existing OneCLI secret to an agent.
onecli agents grants detach-secret --id <agent-id> --secret-id <secret-id>Remove one granted OneCLI secret from an agent.
ncl sessions get <session-id>Read a session accessible to the current caller.
ncl tasks list --group <group-id>List scheduled tasks for a group; omit --group on the host to see all.
ncl tasks create --group <group-id> --name "briefing" --recurrence "0 9 * * 1-5" --prompt "Send a briefing to telegram"Create a recurring weekday task. Its prompt must specify a delivery destination if you want a message.
ncl tasks create --group <group-id> --name "reminder" --process-after "<ISO8601-date-time>" --prompt "Remind me in telegram"Schedule a one-time task at a specific date and time.
ncl tasks get <task-id> --group <group-id>Inspect a task’s run counts, failures, and recent log entries.
ncl tasks update <task-id> --group <group-id> --prompt "Updated instructions"Update a task’s instructions.
ncl tasks pause <task-id> --group <group-id>Pause a scheduled series.
ncl tasks resume <task-id> --group <group-id>Resume a paused series.
ncl tasks run <task-id> --group <group-id>Run a task once immediately without changing its recurrence.
ncl tasks cancel <task-id> --group <group-id>Cancel a running task while retaining its history.
ncl tasks delete <task-id> --group <group-id>Delete a scheduled series and its history.

Configuration options and environment variables

OptionPurpose
CONTAINER_CPU_LIMITApply a Docker CPU limit across this NanoClaw install, such as 2.
CONTAINER_MEMORY_LIMITSet a Docker memory limit, such as 8g.
CONTAINER_PIDS_LIMITCap processes inside each container. The original setup default is 2048.
DEFAULT_AGENT_PROVIDERSet the default agent provider for newly created groups.
NANOCLAW_DEFAULT_MODELSet the default model where an agent group has no explicit override.
NANOCLAW_FAST_MODEUse fast inference when the selected provider supports it; provider charges can differ.
NANOCLAW_NO_DIAGNOSTICS=1Disable NanoClaw’s setup and uninstall diagnostic reports.
NANOCLAW_EGRESS_LOCKDOWN=trueEnable the optional locked-down agent network so default outbound traffic is blocked.
NANOCLAW_ANTHROPIC_BASE_URLPoint advanced Claude-compatible provider setup to a custom HTTPS API.
NANOCLAW_ANTHROPIC_AUTH_TOKENCredential for that Claude-compatible endpoint, registered through setup.
NANOCLAW_V1_PATHGive the migration script the location of the existing v1 install.
NANOCLAW_TEMPLATES_DIRChange the local directory used for agent templates.
NANOCLAW_TEMPLATE_PATHPreselect an agent template during advanced setup.
WEBHOOK_HOSTChange the webhook listener address; 127.0.0.1 is the default. Use 0.0.0.0 only if another host must reach the service.
GOOGLE_CHAT_ENDPOINT_URLSupply the endpoint URL for verifying Google Chat Workspace add-on webhooks.
GOOGLE_CHAT_PROJECT_NUMBERSet the numeric Google Cloud project number for Google Chat webhook verification.
GOOGLE_CHAT_BOT_USER_IDIdentify the bot user for Google Chat @mentions in spaces, in users/<id> form.
providerSet a group’s provider (for example claude, codex, cursor, or opencode).
modelOverride the model for an individual group.
effortChoose an effort level supported by that provider and model.
speedChoose a supported provider-specific inference speed tier.
cli_scopeSet the agent container’s CLI access scope: disabled, group, or global.
session_modeSet whether connected channels use separate sessions or shared conversations.
on_wakeDefine an instruction for an agent container that has restarted.
com.nanoclaw.<slug>macOS per-installation background-service name pattern.
nanoclaw-<slug>.serviceLinux per-installation systemd user-service name pattern.

Alternatives & Related Resources

Pros

  • Explicit container mounts.
  • Single Node.js host process.
  • Channel skills keep forks lean.
  • Local builds need no account.

Cons

  • Docker or WSL2 setup.
  • A coding agent is needed to apply customization and integration skills.
  • Channels install on demand.

FAQs

Do I need Claude Code to run NanoClaw?

No. NanoClaw can run agent groups with Claude, Codex, Cursor, or OpenCode. You need a coding agent that can apply the repository’s skills for customizations and additional channels. The setup wizard can use Claude Code, Codex, or OpenCode to help recover from a failed installation.

Can NanoClaw use a local AI model?

Yes. /add-opencode can connect to a local OpenAI-compatible model endpoint. For Ollama specifically, the repository also includes /add-ollama-provider, which configures an existing group to use a local Ollama model.

Can I use NanoClaw on Android or iPhone?

NanoClaw runs on a computer or server. You can message it from your phone through a connected chat app, such as Telegram or WhatsApp.

Can multiple messaging apps share one agent?

Yes. You can attach several channels to an agent group. In /manage-channels, choose whether each channel has its own session or shares one conversation with the others.

Is NanoClaw free and open source?

Yes. NanoClaw is distributed under the MIT license and can run locally without a NanoClaw account. You supply credentials for the selected AI model or provider, which may charge for usage. The optional free NanoClaw account gives access to the managed Slack apps and a prebuilt hardened image for Claude agents.

Can NanoClaw schedule tasks and deliver them automatically?

Yes. Schedule a recurring or one-time task from chat or with ncl tasks create. A scheduled job runs in its own agent session. Include a destination such as telegram in the task prompt if you want its result delivered to a particular channel. Use ncl tasks list, pause, resume, and run to manage it from the host.

Can NanoClaw run on a Linux server?

Yes. A Linux host with Docker Engine, Git, and enough RAM can run NanoClaw. Setup installs its supported Node.js and pnpm versions when needed. You maintain the host, agent containers, messaging channels, and model credentials.

Last Updated: November 22, 2026

Leave a Reply

Your email address will not be published. Required fields are marked *

Get the latest & top AI tools sent directly to your email.

Subscribe now to explore the latest & top AI tools and resources, all in one convenient newsletter. No spam, we promise!