NANOBOTYAML(5)NANOBOTYAML(5)

NAME

nanobot.yaml — instruction file for Nanobot

SYNOPSIS

./nanobot.yaml

METADATA

FORMATYaml
FILENAMEnanobot.yaml
CASE SENSITIVENo
TOOLNanobot
ENCODINGUTF-8
GIT COMMITTEDYes

DESCRIPTION

nanobot.yaml is the central orchestration configuration file for the Nanobot framework. It defines a multi-agent system in a single YAML file: the agents available, their models and system prompts, the tools they can use, and the routing rules that determine which agent handles each task.

The file follows a declarative approach to agent orchestration. Rather than writing code to wire agents together, you define their roles and capabilities in YAML, and the Nanobot runtime handles message passing, tool invocation, and task routing. This makes it easy to prototype multi-agent systems and adjust the architecture without changing application code.

nanobot.yaml supports environment variable interpolation for secrets and can reference external files for lengthy system prompts.

STRUCTURE

├──agentsREQUIRED
Map of agent definitions. Each agent has a model, system prompt, and optional tool list. At least one agent must be defined.
├──tools
Tool definitions available to agents. Each tool specifies a command or API endpoint the agent can invoke.
└──routes
Task routing rules that determine which agent handles incoming requests. Supports pattern matching on message content or metadata.

ANNOTATED EXAMPLE

nanobot.yaml
yaml
1# nanobot.yaml — Multi-agent project config
2
3agents:
4  planner:
5    model: claude-sonnet
6    system: |
7      You are a project planner. Break down user requests into
8      discrete tasks and assign them to the appropriate agent.
9    tools:
10      - route_to_agent
11
12  coder:
13    model: claude-sonnet
14    system: |
15      You are a senior developer. Write clean, tested code.
16      Follow the project's existing patterns and conventions.
17    tools:
18      - read_file
19      - write_file
20      - run_tests
21      - bash
22
23  reviewer:
24    model: claude-sonnet
25    system: |
26      You are a code reviewer. Check for bugs, security issues,
27      and style violations. Be thorough but constructive.
28    tools:
29      - read_file
30      - comment_on_pr
31
32tools:
33  read_file:
34    command: cat {path}
35  write_file:
36    command: "write --path {path} --content {content}"
37  run_tests:
38    command: pnpm test
39  bash:
40    command: bash -c "{command}"
41  route_to_agent:
42    type: internal
43    description: Route a subtask to another agent
44  comment_on_pr:
45    command: gh pr review --comment --body "{comment}"
46
47routes:
48  - pattern: "plan *"
49    agent: planner
50  - pattern: "review *"
51    agent: reviewer
52  - pattern: "*"
53    agent: coder

COMMON MISTAKES

Gotchas
✗WRONG Defining all logic in a single agent
✓RIGHT Split responsibilities across multiple specialized agents with clear routing

Nanobot is designed for multi-agent orchestration. A single monolithic agent misses the framework's key value proposition. Define specialized agents (planner, coder, reviewer) and use routing rules to direct tasks to the right one.

✗WRONG Using nanobot.yml (with .yml extension)
✓RIGHT Use nanobot.yaml (with .yaml extension)

The Nanobot framework specifically looks for nanobot.yaml. While .yml and .yaml are generally interchangeable in the YAML ecosystem, Nanobot requires the .yaml extension.

✗WRONG Hardcoding API keys in the nanobot.yaml file
✓RIGHT Use environment variable references for all secrets and API keys

nanobot.yaml is committed to version control. Use environment variable syntax (e.g. ${OPENAI_API_KEY}) for any sensitive values. The framework resolves environment variables at runtime.

USED BY

agentconfig.ing2026-03-16NANOBOTYAML(5)