This directory demonstrates the directory-based configuration format for nanobot.
directory-config/
├── agents/ # Agent definitions directory
│ ├── main.md # Main agent (default entrypoint)
│ └── helper.md # Additional helper agent
├── mcp-servers.yaml # MCP server definitions
└── README.md # This file
Agent .md files are placed in the agents/ subdirectory. Each file defines one agent with YAML front-matter:
All HookAgent fields are supported in the front-matter:
id - Agent ID (defaults to filename without .md)name - Display name for the agentmodel - LLM model to use (e.g., gpt-4, claude-3-7-sonnet-latest)mcpServers - List of MCP servers this agent can accesstools - Specific tools to expose to the agentagents - Sub-agents this agent can delegate totemperature - Sampling temperature (0.0 to 1.0)topP - Top-p sampling parametermaxTokens - Maximum tokens in responsestarterMessages - Suggested prompts for usersdescription - Short description of the agenticon - Icon URL (light mode)iconDark - Icon URL (dark mode)The markdown content after the front-matter becomes the agent’s instructions.
Define MCP servers in mcp-servers.yaml ormcp-servers.json:
myserver:
url: https://example.com/mcp
headers:
Authorization: Bearer ${MY_TOKEN}
Note: You can only have ONE of mcp-servers.yaml or mcp-servers.json, not both.
Run this directory-based config with:
nanobot run ./examples/directory-config/
If a main.md file exists in the agents/ directory, it will automatically be set as the default published entrypoint agent. In this example, the Shopping Assistant is the main agent.