This document describes the complete YAML schema for NodeTool agent configurations used with the nodetool agent command.
# REQUIRED FIELDS
name: string # Agent identifier
system_prompt: string # Agent behavior instructions
model: ModelConfig # Primary model configuration
planning_agent: PlanningConfig # Planning agent (must be enabled)
# OPTIONAL FIELDS
description: string # Human-readable description
tools: list[string] # Available tool names
max_tokens: integer # Maximum response length
context_window: integer # Context window size
temperature: float # Response randomness (0.0-1.0)
max_iterations: integer # Maximum planning cycles
workspace: WorkspaceConfig # Workspace configuration
Type: string
Description: Unique identifier for the agent. Used for logging and workspace naming.
Constraints:
Examples:
name: research-assistant
name: code_helper
name: content-creator-v2
Type: string
Description: Human-readable description of the agent’s purpose and capabilities.
Examples:
description: Autonomous research agent for web information gathering
description: AI coding assistant for Python development
description: Content creation and copywriting agent
Type: string (supports multiline)
Description: Core instructions defining agent behavior, workflow, and guidelines. This is the primary way to shape agent behavior.
Best practices:
|)Example:
system_prompt: |
You are a professional research assistant.
Your responsibilities:
- Conduct thorough research on assigned topics
- Verify information across multiple sources
- Organize findings systematically
- Provide well-structured summaries
Workflow:
1. Break down research objective into specific queries
2. Use google_search to find relevant sources
3. Use browser to extract detailed content
4. Save findings using write_file
5. Synthesize results into report
Guidelines:
- Prioritize authoritative sources
- Cross-reference information
- Cite sources clearly
- Note uncertainties or conflicts
Type: ModelConfig object
Description: Configuration for the primary AI model used by the agent.
Structure:
model:
provider: string # REQUIRED: AI provider name
id: string # REQUIRED: Model identifier
name: string # OPTIONAL: Display name
Supported providers:
openai — OpenAI modelsanthropic — Anthropic Claude modelsgoogle — Google Gemini modelsollama — Local Ollama modelsExamples:
# OpenAI
model:
provider: openai
id: gpt-4o
name: GPT-4o
# Anthropic
model:
provider: anthropic
id: claude-3-5-sonnet-20241022
name: Claude 3.5 Sonnet
# Google
model:
provider: google
id: gemini-2.0-flash-exp
name: Gemini 2.0 Flash
# Local Ollama
model:
provider: ollama
id: llama3.2:3b
Type: PlanningConfig object
Description: Configuration for the planning agent that coordinates task execution. Must always be enabled.
Structure:
planning_agent:
enabled: boolean # REQUIRED: Must be true
model: ModelConfig # REQUIRED: Model for planning
Best practices:
gpt-4o-mini, claude-3-haiku, gemini-flashExamples:
# Using GPT-4o Mini for cost-effective planning
planning_agent:
enabled: true
model:
provider: openai
id: gpt-4o-mini
# Using Claude Haiku for fast planning
planning_agent:
enabled: true
model:
provider: anthropic
id: claude-3-haiku-20240307
Type: list[string]
Description: List of tool names available to the agent. Tools extend agent capabilities beyond pure language model responses.
Default: Basic file operations (read_file, write_file)
Available tools:
File Operations:
write_file — Write content to files in workspaceread_file — Read file contents from workspacelist_directory — List directory contentsdelete_file — Delete files from workspaceWeb Research:
google_search — Search the web for informationbrowser — Browse URLs and extract web contentCode Execution:
execute_code — Run Python/JavaScript code in sandboxterminal — Execute shell commands in workspaceAdditional:
grep — Search for patterns within filesimage_generation — Generate imagesaudio_generation — Generate audiovideo_generation — Generate videosExamples:
# Minimal file operations
tools:
- read_file
- write_file
# Research agent tools
tools:
- google_search
- browser
- write_file
- read_file
# Code assistant tools
tools:
- read_file
- write_file
- execute_code
- terminal
- grep
Type: integer
Description: Maximum number of tokens the agent can generate in a single response.
Default: 8192
Range: 1 to model’s maximum (varies by model)
Recommendations:
409681921638432768+ (model dependent)Examples:
max_tokens: 4096 # Conservative
max_tokens: 8192 # Standard
max_tokens: 16384 # Extended
Type: integer
Description: Size of the context window for the conversation. Determines how much prior conversation and context the agent can see.
Default: 8192
Model limits:
Examples:
context_window: 4096 # Small context
context_window: 8192 # Standard
context_window: 32768 # Large context
context_window: 200000 # Very large (Claude)
Type: float
Description: Controls randomness/creativity in agent responses. Higher values make output more random and creative.
Default: 0.7
Range: 0.0 to 1.0 (some models support up to 2.0)
Recommendations:
0.0-0.3: Analytical, deterministic tasks (code, data analysis)0.4-0.7: Balanced, general-purpose tasks0.8-1.0: Creative tasks (writing, brainstorming)Examples:
temperature: 0.0 # Deterministic
temperature: 0.3 # Focused, precise
temperature: 0.7 # Balanced (default)
temperature: 0.9 # Creative
Type: integer
Description: Maximum number of planning and execution cycles the agent can perform. Prevents infinite loops while allowing task completion.
Default: 10
Recommendations:
5-810-1515-2020+Examples:
max_iterations: 5 # Quick tasks
max_iterations: 10 # Standard (default)
max_iterations: 20 # Complex tasks
Type: WorkspaceConfig object
Description: Configuration for the agent’s file workspace. The workspace is a sandboxed directory where the agent can read and write files.
Structure:
workspace:
path: string # OPTIONAL: Workspace directory path
auto_create: bool # OPTIONAL: Create if doesn't exist
Default:
path: ~/.nodetool-workspaces/<agent-name>auto_create: trueExamples:
# Use default workspace
workspace:
auto_create: true
# Custom workspace path
workspace:
path: ~/my-projects/agent-workspace
auto_create: true
# Specific project workspace
workspace:
path: /tmp/research-$(date +%Y%m%d)
auto_create: true
# Research Assistant Agent
name: research-assistant
description: Research agent for information gathering
system_prompt: |
You are a professional research assistant specializing in thorough, accurate research.
Responsibilities:
- Conduct research on assigned topics
- Gather information from multiple credible sources
- Verify facts and cross-reference data
- Organize findings in structured format
- Provide citations and source references
Workflow:
1. Analyze the research objective
2. Break down into specific research queries
3. Use google_search to find relevant sources
4. Use browser to extract detailed content from promising URLs
5. Save important findings using write_file
6. Synthesize all information into report
7. Review and verify accuracy
Tools Available:
- google_search: Find web resources
- browser: Extract content from URLs
- write_file: Save findings and reports
- read_file: Review previous findings
- list_directory: Check saved files
Output Guidelines:
- Structure reports with clear sections
- Include executive summary
- Cite all sources with URLs
- Note any conflicting information
- Highlight key findings and insights
- Use markdown formatting
model:
provider: openai
id: gpt-4o
name: GPT-4o
planning_agent:
enabled: true
model:
provider: openai
id: gpt-4o-mini
name: GPT-4o Mini
tools:
- google_search
- browser
- write_file
- read_file
- list_directory
max_tokens: 8192
context_window: 8192
temperature: 0.7
max_iterations: 15
workspace:
path: ~/.nodetool-workspaces/research
auto_create: true
required_fields = [
"name",
"system_prompt",
"model",
"planning_agent"
]
# model must have:
model_required = ["provider", "id"]
# planning_agent must have:
planning_required = ["enabled", "model"]
Missing required fields:
Error: Missing required field 'system_prompt'
Invalid model configuration:
Error: model.provider is required
Error: model.id is required
Planning agent not enabled:
Error: planning_agent.enabled must be true
Invalid tool name:
Error: Unknown tool 'invalid_tool'
Invalid value ranges:
Error: temperature must be between 0.0 and 1.0
Error: max_tokens must be positive
Error: max_iterations must be at least 1
Configuration values can reference environment variables:
model:
provider: openai
id: ${OPENAI_MODEL:-gpt-4o} # Default to gpt-4o if not set
workspace:
path: ${WORKSPACE_DIR:-~/.nodetool-workspaces}/agent
If upgrading from older configuration formats:
Old format:
agent:
name: my-agent
model: gpt-4o
tools: [search, browser]
New format:
name: my-agent
model:
provider: openai
id: gpt-4o
planning_agent:
enabled: true
model:
provider: openai
id: gpt-4o-mini
tools:
- google_search
- browser