
On Trove · from Matan Marudi
NanoClaw
The Complete Agent Developer's Guide
A definitive reference for building, customizing, and operating NanoClaw v2 agents.
You can read the contents and the first 2,000 characters.
Free accounts get the whole book.
- By Matan Marudi
- 27 chapters
- Updated Nov 1, 2026
- 49 readers
What’s inside
- What is NanoClaw?
- The Core Architecture
- Entity Model and Data Model
- Claude Integration
- Your First Agent
- Agent Identity (CLAUDE.md)
From the first page
Last updated: 2026-06-14 · Scope of validity: NanoClaw v2 (≈ v2.0.64, May 2026); Anthropic model/pricing facts current as of 2026-06-14. Review cadence: model, pricing, and breaking-changes pages quarterly or on any Anthropic model release; architecture/skills pages on each NanoClaw minor version. Maintainer: see CONTRIBUTING.md in the NanoClaw repository.
Preview · 2,000 of 179,090 characters
Contents
- 01NanoClaw: The Complete Agent Developer's Guidep.1
- 02Decision Matrixp.2
- 03What is NanoClaw?p.3
- Philosophyp.3
- v1 vs v2p.3
- How NanoClaw differsp.3
- When to use NanoClawp.3
- 04The Core Architecturep.4
- Agent rulesp.4
- 05Entity Model and Data Modelp.5
- Users and rolesp.5
- Agent groups, messaging groups, and wiringsp.5
- Sessionsp.5
- Other central tablesp.5
- Querying databasesp.5
- 06Claude Integrationp.6
- The Anthropic Agent SDKp.6
- Continuationp.6
- The prompt/context flowp.6
- Model selection for NanoClawp.6
- Effort levelsp.6
- Provider alternativesp.6
- 07Your First Agentp.7
- Prerequisitesp.7
- Create the agent groupp.7
- Write the identityp.7
- Create a messaging group and wire itp.7
- Testp.7
- Debugging startupp.7
- 08Agent Identity (CLAUDE.md)p.8
- Structurep.8
- System prompt assembly orderp.8
- CLAUDE.local.mdp.8
- The pruning rulep.8
- What goes wherep.8
- Module fragmentsp.8
- Common mistakesp.8
See all 27 parts
- 09Container Configurationp.9
- The schemap.9
- Editing via nclp.9
- MCP serversp.9
- Packages: apt and npmp.9
- Additional mounts and mount securityp.9
- cli_scopep.9
- Skill configurationp.9
- 10Channel Integrationp.10
- How adapters workp.10
- Installing channelsp.10
- InboundEvent formatp.10
- Multi-channel wiringp.10
- Channel topology in promptsp.10
- Platform IDs and threadingp.10
- 11Memory Architecturep.11
- Why files, not vectorsp.11
- Four memory typesp.11
- MEMORY.md (the index)p.11
- Post-conversation memory extractionp.11
- The Dream processp.11
- Shared CLAUDE.md vs personal memoryp.11
- Cross-referencesp.11
- 12Multi-Agent Systemsp.12
- When to use multiple agentsp.12
- Template vs Instance patternp.12
- Tool scoping for blast radiusp.12
- The Visibility Principlep.12
- Inter-agent message typesp.12
- Policy enforcementp.12
- The GroupQueue patternp.12
- Agent failure modesp.12
- 13Human-in-the-Loopp.13
- The approval primitivep.13
- Approval handler registrationp.13
- OneCLI credential approvalp.13
- Sender approvalp.13
- Interactive questionsp.13
- Three approval modes per agentp.13
- Building trust progressivelyp.13
- 14Scheduling and Automationp.14
- The `schedule` MCP toolp.14
- One-shot vs recurringp.14
- Drift preventionp.14
- Task managementp.14
- Webhook processingp.14
- The `on_wake` message patternp.14
- 15Self-Modificationp.15
- What can be self-modifiedp.15
- Host-side authorization for `create_agent`p.15
- The flowp.15
- Why approval is requiredp.15
- Common use casesp.15
- 16Skills Developmentp.16
- The four skill typesp.16
- SKILL.md formatp.16
- Progressive disclosurep.16
- Container skills vs host skillsp.16
- Registry-backed skills (channels and providers)p.16
- Testing skillsp.16
- 17Model Selection and Context Economicsp.17
- Context is finitep.17
- The five context-management layersp.17
- Static / dynamic system prompt splitp.17
- Tiered model strategyp.17
- When to reach above Opus 4.8 (Fable 5)p.17
- Token budget trackingp.17
- 18Prompt Engineering for NanoClaw Agentsp.18
- Three layers of agent qualityp.18
- System prompt assembly orderp.18
- Hard constraints vs soft guidancep.18
- "Lead with the finding"p.18
- The parallel tool calling blockp.18
- Anti-patternsp.18
- 19Tool Design for NanoClaw Agentsp.19
- Ten principlesp.19
- Poka-yoke principlesp.19
- MCP server design for NanoClawp.19
- 20Multi-Agent Orchestration Patternsp.20
- The five patternsp.20
- The coordinator mode four-phase workflowp.20
- Continue vs spawn decision matrixp.20
- Verification agent patternp.20
- Session Separation Testingp.20
- Sub-agents for knowledge retrievalp.20
- WorkTree parallel developmentp.20
- 21Security Modelp.21
- OS-level container isolationp.21
- Mount allowlistp.21
- OneCLI credential injectionp.21
- Egress lockdownp.21
- cli_scope enforcementp.21
- Prompt injection defensesp.21
- The permission spectrump.21
- 22Monitoring and Debuggingp.22
- Log filesp.22
- The `/debug` skillp.22
- Session inspectionp.22
- The heartbeat filep.22
- Common issuesp.22
- Inter-agent message auditp.22
- 23Best Practices and Anti-Patternsp.23
- Best practicesp.23
- Anti-patternsp.23
- 24The NanoClaw Skills Ecosystemp.24
- Feature / capability skills (channels & providers are registry-backed; install by additive fetch — see Ch. 24)p.24
- Operational skills (instruction-only, always on `main`)p.24
- Utility skills (with code)p.24
- Container skills (runtime, mounted into every agent)p.24
- 25Anthropic API Deep Referencep.25
- 23.1 Model Referencep.25
- 23.2 Choosing the Right Modelp.25
- 23.3 Effort Levels: What They Actually Changep.25
- 23.4 Thinking Modesp.25
- 23.5 Universal Prompting Techniquesp.25
- 23.6 Model-Specific Behaviors and Fixesp.25
- 23.7 Agentic Patterns for NanoClawp.25
- 23.8 Tool Use Referencep.25
- +5 more sections
- 26The Skills Customization Contractp.26
- 24.1 The problem and the betp.26
- 24.2 A fork is a recipe of skillsp.26
- 24.3 Two kinds of skillsp.26
- 24.4 Skill anatomyp.26
- 24.5 Change shapes, in safety orderp.26
- 24.6 Registry branches: additive fetch, never mergep.26
- 24.7 A test for every integration pointp.26
- 24.8 The anti-patterns registerp.26
- +2 more sections
- 27Appendicesp.27
- Appendix A: Key Database Queriesp.27
- Appendix B: Environment Variables Referencep.27
- Appendix C: Container Configuration Referencep.27
- Appendix D: ncl CLI Referencep.27
- Appendix E: Glossaryp.27
- The Edit/Reaction API: Contract and Rate Limitsp.27
- Prompt-Level Injection Containment: The Data/Instruction Boundaryp.27
- Chapter 25: Proposed Extensions (Design Guidance, Not Implemented)p.27




