Skip to content

Add NanoClaw to aimx agents setup#200

Merged
uzyn merged 2 commits into
mainfrom
worktree-curried-strolling-quokka
May 4, 2026
Merged

Add NanoClaw to aimx agents setup#200
uzyn merged 2 commits into
mainfrom
worktree-curried-strolling-quokka

Conversation

@uzyn

@uzyn uzyn commented May 4, 2026

Copy link
Copy Markdown
Owner

Summary

  • Adds NanoClaw as the eighth aimx agents setup agent. NanoClaw is a Claude-Agent-SDK-based container-isolated personal AI agent forked per-user from qwibitai/nanoclaw, so the integration target is the fork directory (default ~/nanoclaw, override via $NANOCLAW_HOME) instead of a global $HOME config dir.
  • Auto-merges an mcpServers.aimx entry into <fork>/.mcp.json via temp-file + atomic rename, preserving any other servers. NanoClaw exposes no mcp add CLI and the file is JSON5-flavoured, so this is the one supported agent where aimx mutates the agent's primary config — --print is a dry-run, --force overwrites an existing aimx entry, and the trade-off is documented next to the helper and in book/agent-integration.md.
  • Documents NanoClaw's scheduled-job pull model in the bundled SKILL.md.header. NanoClaw is a long-running daemon, so on_receive hook recipes don't fit; the recommendation is to add a NanoClaw scheduled job that polls email_list on a cadence, with a one-line escape hatch for operators who need sub-second latency (wire a different agent as the hook).
  • Fork-dir existence precheck before write_files so a host without a NanoClaw clone can never end up with a stub ~/nanoclaw/ that a follow-up git clone would conflict with; error names $NANOCLAW_HOME so users can fix the misconfig.
  • Removal flow updated symmetrically — aimx agents remove nanoclaw deletes the skill bundle and prints a hint pointing at <fork>/.mcp.json. The .mcp.json itself is preserved, matching the behaviour for every other agent.

Test plan

  • cargo build (clean)
  • cargo test --bin aimx — 1052 unit tests pass (118 agents_setup::tests::*, 14 of them new for NanoClaw)
  • cargo test --test integration agents_ — 4 integration tests pass, including the new agents_setup_list_includes_nanoclaw
  • cargo clippy -- -D warnings (clean)
  • cargo fmt -- --check (clean)
  • Verifier crate: cd services/verifier && cargo clippy -- -D warnings (clean)
  • Banned-tokens guard from CLAUDE.local.md returns zero hits
  • End-to-end smoke under NANOCLAW_HOME=/tmp/fake-nanoclaw: --print prints proposed JSON without writing; real install lays out skills/aimx/{SKILL.md,references/*.md} and creates .mcp.json; merge into a pre-seeded .mcp.json preserves a someone-else server and an unrelated top-level field; fork-missing case fails fast with a message naming $NANOCLAW_HOME; aimx agents remove nanoclaw deletes the skill dir and prints the cleanup hint

uzyn added 2 commits May 4, 2026 07:43
NanoClaw is the eighth supported agent. It is a Claude-Agent-SDK-based
container-isolated personal AI agent that is forked per-user from
qwibitai/nanoclaw, so the integration target is the fork directory
(default ~/nanoclaw, override via $NANOCLAW_HOME) rather than a global
$HOME config dir. NanoClaw exposes no `mcp add` CLI and reads MCP
servers from <fork>/.mcp.json, so the installer reads-merges-renames
that file in place under mcpServers.aimx — preserving any other
servers — instead of asking the user to hand-edit JSON5. This is the
one supported agent where aimx mutates the agent's own MCP config;
every other agent either has a registration CLI or expects a pasted
snippet, and that line is documented next to the merge helper.

NanoClaw is a long-running daemon listening on messaging channels, so
on_receive hook recipes don't fit. The bundled SKILL.md.header
documents the scheduled-job pull model instead: NanoClaw polls aimx
via MCP on its own cadence and acts on unread mail. Operators who
need sub-second-latency reactions can wire a different agent
(Claude Code, Codex, Hermes) as the on_receive hook and let NanoClaw
consume the resulting state on its next tick.

The fork-directory existence precheck runs before write_files so a
host without a NanoClaw clone can never end up with a stub
~/nanoclaw/ that a follow-up `git clone … nanoclaw` would conflict
with; the error message names the override env var so the user can
fix the misconfig in one step.
Surfaces NanoClaw alongside the other seven in the headline paragraph
and the agent-install table, with a one-line callout that NanoClaw
uses a scheduled-job pull model rather than on_receive hooks (so the
hook-recipes pointer doesn't mislead readers).
@uzyn uzyn merged commit 3b8b8ba into main May 4, 2026
10 checks passed
@uzyn uzyn deleted the worktree-curried-strolling-quokka branch May 4, 2026 08:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant