Agent Configuration Examples

This directory contains example YAML configuration files for the nodetool agent command.

Available Examples

research-agent.yaml

Autonomous research agent for gathering and synthesizing information from the web.

Use cases:

Tools:

Example:

nodetool agent \
  --config examples/agents/research-agent.yaml \
  --prompt "Research the latest developments in quantum computing"

code-assistant.yaml

AI coding assistant for development tasks, debugging, and code review.

Use cases:

Tools:

Example:

nodetool agent \
  --config examples/agents/code-assistant.yaml \
  --prompt "Create a Python script to parse CSV files and generate visualizations"

content-creator.yaml

Creative writing agent for generating blog posts, marketing content, and documentation.

Use cases:

Tools:

Example:

nodetool agent \
  --config examples/agents/content-creator.yaml \
  --prompt "Write a blog post about sustainable software development practices"

minimal.yaml

Minimal agent configuration showing required fields only.

Use cases:

Example:

nodetool agent \
  --config examples/agents/minimal.yaml \
  --prompt "Summarize the main features of NodeTool"

Creating Custom Agents

Basic Structure

name: my-agent
description: Agent description

system_prompt: |
  Agent instructions and behavior

model:
  provider: openai
  id: gpt-4o

planning_agent:
  enabled: true
  model:
    provider: openai
    id: gpt-4o-mini

tools:
  - write_file
  - read_file

max_tokens: 8192

Best Practices

  1. Start with minimal.yaml and add complexity as needed
  2. Be specific in system_prompt about expected behavior and workflow
  3. Choose appropriate models for the task complexity and budget
  4. Enable only necessary tools to reduce complexity and improve focus
  5. Set reasonable iteration limits to prevent infinite loops
  6. Test incrementally with simple prompts before complex tasks

Configuration Tips

System Prompt:

Model Selection:

Tool Configuration:

Parameters:

Testing Agents

Quick Test

nodetool agent --config your-agent.yaml --prompt "Simple test task"

Interactive Testing

nodetool agent --config your-agent.yaml --interactive

This allows multi-turn conversations to test different scenarios.

Automated Testing

# Test multiple prompts
for prompt in "Test 1" "Test 2" "Test 3"; do
  nodetool agent --config your-agent.yaml --prompt "$prompt" --jsonl
done

Documentation

For complete documentation, see:

Troubleshooting

Agent doesn’t complete tasks

Solution: Increase max_iterations or improve system_prompt specificity

max_iterations: 20  # Increase from default 10

Tool errors

Solution: Verify tool is available and properly configured

nodetool agent --config agent.yaml --interactive
> /tools  # List available tools

Rate limiting

Solution: Use local models or add retry logic

model:
  provider: ollama
  id: llama3.2:3b  # Local model, no rate limits

Performance issues

Solution: Use faster models for planning agent

planning_agent:
  model:
    provider: openai
    id: gpt-4o-mini  # Fast and cost-effective

Contributing

To add new example configurations:

  1. Create a descriptive YAML file (e.g., data-analyst.yaml)
  2. Include comprehensive system_prompt with clear instructions
  3. Choose appropriate model and tools
  4. Test thoroughly with various prompts
  5. Update this README with the new example
  6. Submit a pull request

License

These examples are provided under the same license as NodeTool (AGPL-3.0).