Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Federate your NetClaw with other NetClaw operators over the BGP mesh — exchange capability inventories and ask your claw what a peer can do. (US1; remote invocation and chat land in later phases.)
.claude/skills/automateyournetwork-n2n-federation/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-04 | ✗→✓ | ▲ Improved | 161% | 0% |
| case-05 | ✗→✓ | ▲ Improved | 365% | 0% |
| case-07 | ✗→✓ | ▲ Improved | 418% | 0% |
| case-09 | ✗→✓ | ▲ Improved | 291% | 0% |
| case-10 | ✗→✓ | ▲ Improved | 482% | 0% |
Elevate the NetClaw Mesh from route exchange to agent federation. Once two operators mutually consent, their claws exchange signed capability inventories, so you can ask your own NetClaw "does Nicholas's claw have CML?" and get an answer from locally cached inventory — no credentials or secrets ever leave either machine.
Uses the n2n-mcp server, which proxies the mesh daemon's /n2n/* API. The daemon must run with N2N_ENABLED=true.
do?", "does Nicholas have pyATS?", "what skills does he have that I don't?").
Both operators must consent before ANY capability information flows.
the identity check, so verify it before consenting.
n2n_consent(peer_as=65007, router_id="7.7.7.7", display_name="Nicholas").Optionally pass host/port (their ngrok endpoint) to dial immediately.
automatically. n2n_status shows the peer flip to federated.
n2n_peer_capabilities(peer="as65007-7.7.7.7") — their skills, MCPservers/tools, and badges (CML, pyATS, Meraki…), with inventory freshness. If the inventory is stale (peer offline past the refresh window), the answer says so.
n2n_compare_capabilities(peer="as65007-7.7.7.7") — what they have that youdon't, and vice versa.
n2n_set_visibility(item_type="mcp_server", item_name="cml-mcp", visibility="all_federated")to advertise a server; visibility="hidden" removes it from the advertised inventory entirely; visibility="selected_peers" with peers="as65007-7.7.7.7" limits it. Defaults: both skills and MCP servers advertised to federated peers (names/tool-names only, never secrets); hide specific items with visibility=hidden.
n2n_kill(peer="as65007-7.7.7.7") — confirm with the operator first.Stops all federation with that peer and purges their cached inventory immediately. The BGP session is untouched — routes keep flowing.
mesh (not consented) shows as not_federated with no inventory.
.env values, device addresses, ortestbed secrets — only capability names/descriptions.
N2N_ENABLED=true (plus optional N2N_* tuning — see .env.example).n2n-mcp: BGP_DAEMON_API (default http://127.0.0.1:8179).Decision rule: if the request will take more than a few seconds on the peer (any build, multi-tool run, "recreate my CML lab", "configure the testbed", "push these configs"), you MUST use n2n_delegate — NOT n2n_chat and NOT n2n_invoke.
Why this matters (and why builds "time out" even though 053 shipped): chat and synchronous invoke are blocking. A multi-minute build over n2n_chat will time out on the requester side — and worse, the peer often keeps running it, so the result is lost to you. Async delegation is the only path that survives:
n2n_delegate(peer, target_name, input_text) — submits the task, returns atask_id in ~2 seconds while the peer runs it in the background.
n2n_task_status(task_id) — poll progress (short call).n2n_task_result(task_id) — fetch the result when completed; it is capturedand retained even if the channel dropped or a daemon restarted mid-build.
n2n_task_cancel(task_id) — stop it.Use n2n_chat ONLY for short conversational questions ("why is your OSPF area 0 flapping?"). Anything build- or task-shaped → n2n_delegate.
automatically from persisted consent — no manual re-dial.
restart, it tells you over the live session and you re-dial automatically — no host:port swapping.
pre-053 peer degrades gracefully to 052 behavior.
n2n_health shows per-peer channel state, last-seen, endpointfreshness, and in-flight tasks (also on the HUD claw node).
n2n_connect(peer, host, port) — add + consent + dial in one call.n2n_trust(peer, tools="a,b", chat=true) — consent + grants + chat in one call.Peers advertise their RAG collections on their capability card as a knowledge array (content-free: topics, tags, counts — never the documents). Use this so a document/factual question is answered by the claw whose knowledge base is authoritative for it, with citations — instead of guessing from your model.
Before answering a document or factual question about a topic another claw may own (a peer's book, runbooks, product docs, network-of-record):
n2n_knowledge_route(query) — returns {target, peer_identity, collection_id,score}. It scores the query against every advertised collection (yours and peers').
target == "peer": n2n_knowledge_query(peer_identity, collection_id,query) — returns the peer's agent-composed, cited answer. Their documents never leave their infrastructure; only the answer travels. Treat it as remote-untrusted and attribute the source (peer + collection).
target == "local": answer from your own RAG.target == "model": nothing matched the threshold — answer normally, andnever invent a federated source or claim a peer answered when none did.
Fallback order is therefore peer → local → model. Retrieval is default-deny: the owning peer must have granted your claw access to the collection (the grant is the human-in-the-loop control point). Advertise/hide your own collections with n2n_set_visibility(item_type="knowledge", item_name="<collection>", ...).
This is a different, heavier action from knowledge query above — query never moves content (only the answer travels); replication copies the actual vectors, chunk text, and metadata into your own local Chroma store, with no re-embedding. Only reach for it when the operator actually wants a standing local/offline copy (e.g. "replicate John's book so I can answer about it without calling out every time") — for a one-off question, use n2n_knowledge_query instead.
embedding_model (feature 065extends the knowledge array with this field) and confirm it matches your own RAG's configured embedder — a mismatch means replication would produce garbage vectors and is refused before any transfer anyway.
knowledge_replica grant, distinct from and inaddition to the knowledge (query-only) grant — holding one does not grant the other. The peer operator grants it explicitly (n2n_grant(peer, "knowledge_replica", collection_id)).
n2n_replicate(peer, collection_id) triggers the copy and returns atask_id immediately — it does not block. Poll with the existing n2n_task_status(task_id) / fetch with n2n_task_result(task_id), same as any other delegated task, until state is completed or failed.
like a locally-authored collection — no further federated round trip needed. It is visibly marked with its source peer/collection/timestamp in rag_list(kind="replicas"), and is never re-advertised as your own knowledge or replicated onward to a third peer.
collection_id) refreshes it (full replace, same async polling pattern). n2n_replicate_delete(peer, collection_id) removes a replica you no longer want — revoking the grant only blocks future replication/re-sync, it does not delete data already copied.
Everything above is eN2N (external N2N): federating with other operators' claws across the internet. iN2N is the internal counterpart: ONE operator runs a group of focused claws — a risk — coordinated by a single Border Claw, with the others as tightly-scoped Member Claws.
that owns the capability (n2n_route) and returns the result. Members are specialists (a CML claw, a pyATS claw) carrying a handful of skills, not the whole catalog — smaller context, smaller blast radius.
ngrok, no public mesh, no inbound ports. Trust within the risk is a pinned self-signed key bootstrapped by a single-use enrollment token (no CA); the eN2N mutual-consent model is only for the boundary between risks.
(the Border), never member details; all internal + external activity is logged in one place (channel_kind en2n/in2n).
netclaw / POST /n2n/risk)n2n_member_add(name, profile="cml") — provision a member from a catalog-derived profile (or custom + specialty); returns a single-use enrollment token + join instructions. It does NOT spawn the member — that is a separate NetClaw install (N2N_ROLE=member + the token).
n2n_member_list / n2n_member_health — see scope, state, quarantine alerts.n2n_route("recreate my lab", target_hint="cml-lab-lifecycle") — the Borderpicks the right member and delegates (async; poll with n2n_task_status / n2n_task_result). netclaw risk route "…" from the CLI does the same.
n2n_member_remove(member_id) — unpin + refuse reconnect (confirm first).Profiles are derived from the installed catalog by scripts/in2n-profiles.py (cml, pyats, ipfabric, forward, itential, viz, security). A member repeatedly failing auth/health is auto-quarantined and surfaced to the operator.
A phone is a member of the risk too, but of a distinct node_type='edge' — it carries no agent runtime, no skills, and cannot reach BGP/eN2N/inventory methods at all (a dedicated, narrower WebSocket transport and handler map). This spec's slice is enrollment + Border-to-phone push only; asking the Border something from the phone is feature 067's command channel, and camera/mic/biometric capture is feature 068 — don't reach for those here.
netclaw risk token --edge [label] renders ascannable QR (no MCP tool for this — it's an operator/CLI action). The phone scans it, verifies the Border's certified domain matches before dialing at all, and completes the same possession-proof handshake agent members use — just over wss:// instead of raw TCP.
n2n_notify_phone(peer, content, kind="text"|"voice"|"image") isthe ONLY way content reaches the phone — reachable identically from Slack, the TUI, the HUD, or your own reasoning. Never mirror ordinary channel traffic to a phone; only call this when the operator explicitly wants something delivered there. If the device is disconnected, delivery falls back to a platform push notification automatically.
members get from member_heartbeat, via a different, built-in mechanism (periodic heartbeat + on-demand self-status) — nothing to call for this, it's automatic once enrolled.
n2n_member_remove(member_id) unenrolls a phoneexactly like any other member — no separate mechanism.
The reverse direction from the push above: the operator types (or speaks, or scans a device QR) a request on the phone's Chat screen, and it's answered exactly as if it arrived from Slack or the TUI — same trust, same delegation/eN2N routing, same attribution. There is no new MCP tool for this — the phone's request text is bridged straight into a real agent turn (the same gateway.run_agent_turn() mechanism peer-chat already uses), so your own existing reasoning and tool calls (n2n_route, n2n_delegate, n2n_invoke) are what actually answer it. If a phone request needs to reach a member or an external eN2N peer, just do what you'd normally do — there is no special "phone mode."
local trust exactly like Slack/CLI/TUI, never a separate per-device grant.
in-risk member did, or a specific federated peer did — the phone's conversation view depends on this to show who actually answered.
externally is cancellable via the existing task-cancellation mechanism (n2n_task_cancel-equivalent) — nothing new to invoke on your end.
is transcribed on-device before it reaches you, and a scanned/opened device link resolves to a plain "what is the status of device X" question. Neither is distinguishable from a typed request once it reaches you.
Two more phone-edge slices, still no new MCP tool — both reuse existing mechanisms end to end.
notify_approval hook fires(any tool/skill/delegation approval you already trigger via the normal approval flow), it now ALSO pushes to every connected phone as a distinct push content, alongside the existing CLI/HUD path — not instead of it. The phone's operator resolves it with Face ID/fingerprint before the approval is granted or denied; you never see biometric detail, only the eventual approve/deny outcome via the same resolve_approval path CLI approvals use (via differs, nothing else does).
audio capture to its own request (arrives to you as an ordinary ask, just with media attached — treat it like any multimodal input). You can also request a capture from a phone the same way you'd n2n_delegate to any other member — if the phone (an edge node) is the only member advertising a given capture capability, delegation resolves to it automatically via the same RiskRouter capability matching every other member uses. A capability the operator has disabled in Settings is simply absent from that phone's advertised scope — you'll route around it exactly as you would for a member lacking any other capability, never a special "capture refused" case to handle.
US1 capability: n2n_status, n2n_consent, n2n_kill, n2n_peer_capabilities, n2n_compare_capabilities, n2n_set_visibility. US2 invocation: n2n_grant, n2n_revoke_grant, n2n_list_grants, n2n_invoke, n2n_approvals, n2n_approve, n2n_deny, n2n_audit, n2n_config. US3 chat: n2n_chat. 053 reliability/ergonomics: n2n_delegate, n2n_task_status, n2n_task_result, n2n_task_cancel, n2n_health, n2n_connect, n2n_trust. 056 iN2N (risk): n2n_risk_status, n2n_member_list, n2n_member_health, n2n_member_add, n2n_enroll_token, n2n_member_remove, n2n_route. 057 production posture: n2n_posture, n2n_faults. 066 NetClaw Mobile edge node: n2n_notify_phone (enrollment itself is netclaw risk token --edge, a CLI action, not an MCP tool). 067 NetClaw Mobile command channel: no new tool — phone requests reach you through the same agent-turn mechanism as any other chat surface. 068 NetClaw Mobile biometrics and capture: no new tool — reuses your existing approval-resolution and n2n_delegate/capability-routing paths unchanged.
Diagnose trouble with n2n_faults, which reports a single truthful fault_class:
daemon — the federation layer / mesh daemon is down. (If n2n_faults orn2n_posture itself errors or times out, treat that as daemon-down — the daemon serves these endpoints.) Report a federation-layer fault, NOT a member flap.
member — a specific member has no live channel. Name it and say whether itwill_cold_start on the next route.
backend — a member is up but its backend device/API is unreachable. Report abackend-reachability issue, NOT a federation fault.
none — healthy.This is the fix for the 056 misdiagnosis where a poll bug was reported as a member flap. Always report the specific cause, never a generic "something's down."
Every heartbeat MUST report the risk's production posture by calling n2n_posture and stating its summary verbatim — one of:
testing — guards intentionally off (fast iteration).production — enforced — all three controls verified active: member sandbox(host-level systemd kernel confinement — NoNewPrivileges, read-only system, master .env hidden), model-guard (DefenseClaw LLM guardrail proxy on :4000 + component scan), and GAIT immutable git audit. Each claw also advertises its posture + LLM tier in its A2A capability card so peers see it.
production — DEGRADED (<controls> missing) — one or more controls are down.Name exactly which, and note the effect: a containment gap (sandbox / model-guard) means delegations are refused (fail-closed); an audit gap (GAIT) means delegations run but are flagged audit-degraded.
The Border NEVER reports enforced while any control is missing — an honest degraded is always preferred to a false production claim.
The mesh daemon and always-on members run as durable systemd --user services (Restart=always, survive session/terminal churn + reboot), generated repeatably:
bashpython3 scripts/in2n-services.py generate # write units: mesh daemon + one per always-on member python3 scripts/in2n-services.py enable # daemon-reload + enable --now each python3 scripts/in2n-services.py status # per-unit active/failed python3 scripts/in2n-services.py disable <member> # tear a member's unit down (reverts to cold-start)
Single-owner: a member bound to a durable service is brought up via its unit, never double-launched by the Border's cold-start path. On a non-systemd host the generator degrades gracefully and posture reports the durable-runtime aspect accordingly.
Other measured skills in the registry, with their headline benchmark lift.