Skip to content

Agent Configuration

Each agent is defined by a YAML file that specifies its identity, behavior, schedule, permissions, and integrations. This page documents the complete agent configuration schema.

name: my-coder
description: "Implements features from GitHub issues"
workspace: my-project
repo: myorg/my-project
identity:
name: "Code Bot"
role: "Software Engineer"
personality: "Methodical and thorough"
system_prompt: |
You are a senior software engineer. Write clean, tested code.
work_source:
type: github
labels:
ready: "ready"
in_progress: "in-progress"
schedules:
check-issues:
type: interval
interval: 5m
prompt: "Check for ready issues and work on the oldest one."
session:
max_turns: 50
timeout: 2h
model: claude-sonnet-4-20250514
permissions:
mode: acceptEdits
allowed_tools:
- Read
- Write
- Edit
- Bash
mcp_servers:
github:
command: npx
args: ["-y", "@modelcontextprotocol/server-github"]
env:
GITHUB_TOKEN: ${GITHUB_TOKEN}
model: claude-sonnet-4-20250514
max_turns: 100
permission_mode: acceptEdits
FieldTypeRequiredDescription
namestringYesUnique identifier for the agent
descriptionstringNoHuman-readable description
workspacestring | objectNoDirectory name or workspace config
repostringNoGitHub repository (e.g., owner/repo)
identityobjectNoAgent identity configuration
system_promptstringNoCustom system instructions for Claude
work_sourceobjectNoWhere the agent gets tasks
schedulesobjectNoMap of named schedule configurations
sessionobjectNoSession runtime settings
permissionsobjectNoPermission controls
mcp_serversobjectNoMCP server configurations
chatobjectNoChat integration settings
dockerobjectNoDocker execution settings
modelstringNoClaude model to use
max_turnsintegerNoMaximum conversation turns
permission_modestringNoQuick permission mode setting

The unique identifier for this agent. Used in CLI commands and logging.

name: bragdoc-coder

Human-readable description of what this agent does.

description: "Implements features and fixes bugs for the bragdoc project"

Where the agent operates. Can be a simple string (directory name) or a full configuration object.

Simple form:

workspace: my-project

Full form:

workspace:
root: /path/to/workspace
auto_clone: true
clone_depth: 1
default_branch: main
FieldTypeDefaultDescription
rootstringAbsolute path to workspace root
auto_clonebooleantrueAuto-clone repo if missing
clone_depthinteger1Git clone depth
default_branchstring"main"Default branch to use

GitHub repository in owner/repo format. Used for cloning and work source integration.

repo: edspencer/bragdoc-ai

Defines the agent’s persona for Claude interactions.

identity:
name: "Senior Developer"
role: "Backend Engineer"
personality: "Detail-oriented, writes comprehensive tests"
FieldTypeDescription
namestringDisplay name for the agent
rolestringJob title or function
personalitystringPersonality traits and working style

Custom instructions prepended to Claude’s system prompt.

system_prompt: |
You are a senior software engineer specializing in TypeScript.
Always write tests for new code.
Follow the existing code style.

Defines where the agent gets tasks to work on.

work_source:
type: github
labels:
ready: "ready-for-dev"
in_progress: "in-progress"
cleanup_in_progress: true
FieldTypeDescription
typestringWork source type. Currently: "github"
labelsobjectLabel configuration for GitHub issues
labels.readystringLabel indicating an issue is ready for work
labels.in_progressstringLabel to apply when work begins
cleanup_in_progressbooleanRemove in_progress label when complete

A map of named schedules that trigger agent execution. Each schedule has a unique key.

schedules:
morning-standup:
type: cron
expression: "0 9 * * 1-5"
prompt: "Review open PRs and summarize status."
issue-check:
type: interval
interval: 10m
prompt: "Check for ready issues and work on the oldest one."
work_source:
type: github
labels:
ready: "ready"
on-demand:
type: webhook
prompt: "Process the incoming webhook payload."
support-chat:
type: chat
prompt: "You are a helpful support agent."
TypeDescriptionKey Fields
intervalRun at fixed intervalsinterval (e.g., “5m”, “1h”)
cronRun on cron scheduleexpression (cron syntax)
webhookTriggered by HTTP webhook
chatTriggered by chat messages
FieldTypeDescription
typestringRequired. One of: interval, cron, webhook, chat
intervalstringInterval duration (e.g., “5m”, “1h”, ”30s”)
expressionstringCron expression (e.g., “0 9 * * 1-5”)
promptstringTask prompt for this schedule
work_sourceobjectOverride work source for this schedule

Runtime settings for agent sessions.

session:
max_turns: 50
timeout: 2h
model: claude-sonnet-4-20250514
FieldTypeDescription
max_turnsintegerMaximum conversation turns per session
timeoutstringSession timeout (e.g., “30m”, “2h”)
modelstringClaude model for this session

Control what the agent can do. See Permissions for full details.

permissions:
mode: acceptEdits
allowed_tools:
- Read
- Write
- Edit
- Bash
- Glob
- Grep
denied_tools:
- WebFetch
bash:
allowed_commands:
- "git *"
- "npm *"
- "pnpm *"
denied_patterns:
- "rm -rf *"
- "sudo *"
FieldTypeDescription
modestringPermission mode (see below)
allowed_toolsstring[]Tools the agent can use
denied_toolsstring[]Tools explicitly denied
bashobjectBash command restrictions
bash.allowed_commandsstring[]Allowed bash patterns
bash.denied_patternsstring[]Denied bash patterns
ModeDescription
defaultDefault Claude Code behavior
acceptEditsAuto-accept file edits (default)
bypassPermissionsSkip permission prompts
planPlan-only mode, no execution

Configure MCP (Model Context Protocol) servers. See MCP Servers for full details.

mcp_servers:
github:
command: npx
args: ["-y", "@modelcontextprotocol/server-github"]
env:
GITHUB_TOKEN: ${GITHUB_TOKEN}
filesystem:
command: npx
args: ["-y", "@modelcontextprotocol/server-filesystem", "/workspace"]
custom:
url: http://localhost:8080/mcp

Each MCP server is a named entry with these fields:

FieldTypeDescription
commandstringExecutable command
argsstring[]Command arguments
envobjectEnvironment variables
urlstringURL for HTTP-based MCP servers

Configure chat integrations for the agent.

chat:
discord:
channel_ids:
- "1234567890"
- "0987654321"
respond_to_mentions: true
FieldTypeDefaultDescription
channel_idsstring[]Discord channel IDs to monitor
respond_to_mentionsbooleantrueRespond when @mentioned

Run the agent in a Docker container.

docker:
enabled: true
base_image: node:20-slim
FieldTypeDefaultDescription
enabledbooleanfalseEnable Docker execution
base_imagestringDocker image to use

Override the Claude model for this agent.

model: claude-sonnet-4-20250514

Common models:

  • claude-sonnet-4-20250514 — Fast, capable (recommended)
  • claude-opus-4-20250514 — Most capable

Maximum number of conversation turns per session.

max_turns: 100

Shorthand for permissions.mode. Sets the permission mode directly.

permission_mode: acceptEdits

A development agent that processes GitHub issues:

name: project-coder
description: "Senior developer that implements features and fixes bugs"
workspace: my-project
repo: myorg/my-project
identity:
name: "Dev Bot"
role: "Senior Software Engineer"
personality: "Methodical, writes clean code with tests"
system_prompt: |
You are a senior software engineer working on this project.
Guidelines:
- Write TypeScript with strict types
- Include unit tests for new code
- Follow existing code patterns
- Create atomic commits with clear messages
work_source:
type: github
labels:
ready: "ready-for-dev"
in_progress: "in-progress"
cleanup_in_progress: true
schedules:
continuous:
type: interval
interval: 5m
prompt: |
Check for GitHub issues labeled "ready-for-dev".
If found, implement the oldest issue:
1. Create a feature branch
2. Implement the solution
3. Write tests
4. Create a PR
session:
max_turns: 100
timeout: 4h
model: claude-sonnet-4-20250514
permissions:
mode: acceptEdits
allowed_tools:
- Read
- Write
- Edit
- Bash
- Glob
- Grep
- Task
bash:
allowed_commands:
- "git *"
- "npm *"
- "pnpm *"
- "node *"
- "npx *"
denied_patterns:
- "rm -rf /"
- "sudo *"
mcp_servers:
github:
command: npx
args: ["-y", "@modelcontextprotocol/server-github"]
env:
GITHUB_TOKEN: ${GITHUB_TOKEN}
docker:
enabled: false

A content creation agent for marketing tasks:

name: content-marketer
description: "Creates blog posts, social content, and marketing copy"
identity:
name: "Marketing Assistant"
role: "Content Strategist"
personality: "Creative, engaging, brand-aware"
system_prompt: |
You are a content marketing specialist.
Your responsibilities:
- Write engaging blog posts
- Create social media content
- Maintain consistent brand voice
- Optimize content for SEO
work_source:
type: github
labels:
ready: "content-ready"
in_progress: "writing"
schedules:
content-check:
type: cron
expression: "0 8 * * 1-5"
prompt: |
Check for content requests labeled "content-ready".
For each request:
1. Research the topic
2. Create an outline
3. Write the content
4. Submit for review
social-daily:
type: cron
expression: "0 10 * * *"
prompt: |
Review recent blog posts and create social media
snippets for Twitter and LinkedIn.
session:
max_turns: 50
timeout: 2h
permissions:
mode: acceptEdits
allowed_tools:
- Read
- Write
- Edit
- Glob
- Grep
- WebFetch
- WebSearch
chat:
discord:
channel_ids:
- "marketing-channel-id"
respond_to_mentions: true

A customer support agent that handles inquiries:

name: support-agent
description: "Handles customer support inquiries via chat"
identity:
name: "Support Bot"
role: "Customer Support Specialist"
personality: "Friendly, patient, solution-oriented"
system_prompt: |
You are a customer support specialist.
Guidelines:
- Be helpful and empathetic
- Provide accurate information from the knowledge base
- Escalate complex issues to humans
- Never make up information
schedules:
support-chat:
type: chat
prompt: |
You are monitoring support channels.
Help users with their questions about our product.
If you cannot help, escalate to a human.
ticket-review:
type: cron
expression: "0 9 * * 1-5"
prompt: |
Review open support tickets from yesterday.
Summarize common issues and trends.
session:
max_turns: 200
timeout: 8h
model: claude-sonnet-4-20250514
permissions:
mode: default
allowed_tools:
- Read
- Glob
- Grep
- WebFetch
denied_tools:
- Write
- Edit
- Bash
mcp_servers:
knowledge-base:
command: node
args: ["./mcp-servers/knowledge-base.js"]
env:
KB_API_KEY: ${KB_API_KEY}
chat:
discord:
channel_ids:
- "support-general"
- "support-billing"
respond_to_mentions: true

Agents inherit default settings from the fleet configuration (herdctl.yaml). Agent-specific settings override fleet defaults.

herdctl.yaml
defaults:
model: claude-sonnet-4-20250514
permission_mode: acceptEdits
session:
timeout: 2h
agents/special-agent.yaml
name: special-agent
model: claude-opus-4-20250514 # Override default model
session:
timeout: 4h # Override default timeout

Validate agent configuration before running:

Terminal window
herdctl validate agents/my-agent.yaml