Skip to main content

Reference: Agent Design Patterns

Use this page when selecting a pattern for a new agent or reviewing an existing configuration.


Pattern Decision Flowchart

Use these questions in order when choosing a design pattern.

START: What should the agent do with its findings?

├─ Report findings only — never take action
│ └─ Does it trace a causal chain, or give a single recommendation?
│ ├─ Single recommendation → ADVISOR
│ └─ Causal chain (root cause analysis) → INVESTIGATOR

├─ Prepare an action plan and execute on approval
│ └─ Does it enforce policy, or propose changes?
│ ├─ Enforce policy, block violations → GUARDIAN
│ └─ Propose changes, execute on approval → PROPOSAL

└─ Unsure what it should do?
└─ Start with ADVISOR at L1. Add autonomy after you have operational evidence.

Quick test: If you cannot answer "what does this agent do when it finds a problem?" in one sentence, start with the Advisor pattern and read-only tools. Build complexity after you understand the domain.


Autonomy Level Selection

After selecting a pattern, choose the starting autonomy level.

What is your confidence in the agent's accuracy in this domain?

├─ No track record yet → L1 (Assistive)
│ └─ Start here regardless of target level

├─ 30+ days of verified correct diagnoses → L2 (Advisory)
│ └─ Team has reviewed and signed off

├─ 90+ days at L2, change management reviewed → L3 (Proposal)
│ └─ Rollback procedure documented

└─ 180+ days at L3, SRE confidence vote, incident plan → L4 (Semi-autonomous)
└─ Regulated environments: also need security/compliance sign-off

Rule of thumb: When in doubt, start one level lower. The cost of starting at L1 instead of L2 is a few weeks of observation time. The cost of starting at L3 before the agent is ready is a production incident.


Hermes Configuration Examples

These are minimal configuration snippets illustrating how each pattern is expressed in Hermes config files. They are starting points, not complete configurations.

Advisor Pattern — Hermes Config

# config.yaml
autonomy_level: L1

toolsets:
terminal:
enabled: true
allowed_commands:
- "aws ec2 describe-*"
- "aws cloudwatch get-metric-*"
- "kubectl get *"
- "kubectl describe *"
- "psql -c SELECT*"
blocked_commands:
- "*" # block everything not explicitly allowed

approval:
required: false # advisor never reaches approval — read-only only

output:
format: recommendation
route: slack-channel
# SOUL.md (excerpt)
You are an operations advisor. You observe, analyze, and recommend.
You NEVER execute commands that modify state.
Every response ends with: RECOMMENDATION: [specific action for the operator]

Investigator Pattern — Hermes Config

# config.yaml
autonomy_level: L1

toolsets:
terminal:
enabled: true
allowed_commands:
- "aws logs filter-log-events*"
- "aws cloudwatch get-metric-statistics*"
- "kubectl logs *"
- "kubectl describe *"
- "kubectl get events *"
web:
enabled: true
allowed_domains:
- docs.aws.amazon.com
- kubernetes.io/docs

approval:
required: false # investigation is read-only

output:
format: investigation_report
sections:
- symptoms_observed
- data_retrieved
- causal_chain
- root_cause
- recommended_next_steps

The multi-step reasoning in the investigator pattern comes from the SKILL.md, not from the config. The config enables the retrieval tools; the skill specifies what to retrieve and in what sequence.


Proposal Pattern — Hermes Config

# config.yaml
autonomy_level: L3

toolsets:
terminal:
enabled: true
allowed_commands:
- "aws rds describe-*" # read: diagnosis
- "aws rds modify-db-parameter*" # write: behind approval gate
- "kubectl get *" # read: diagnosis
- "kubectl set *" # write: behind approval gate
blocked_commands:
- "aws rds delete-*"
- "kubectl delete *"
- "DROP *"

approval:
required: true
gate: before_write # approval required before any write command executes
template: |
PROPOSED ACTION: {action_summary}
COMMANDS TO RUN:
{command_list}
EXPECTED OUTCOME: {outcome}
ROLLBACK PROCEDURE: {rollback}
APPROVE? [yes/no]

The gate: before_write setting means the agent can run read commands freely but must call the approval tool before any write command. The approval template determines what the operator sees.


Guardian Pattern — Hermes Config

# config.yaml
autonomy_level: L1

toolsets:
# Guardian has no execution tools
review:
enabled: true # reviews proposed actions from other agents

policy:
blocked_commands:
- "aws iam *" # IAM changes always blocked
- "aws rds delete-*" # Database deletion always blocked
- "kubectl delete namespace*" # Namespace deletion always blocked
- "terraform destroy*" # Destruction always blocked
allowed_resource_patterns:
- "arn:aws:rds:us-east-1:*:db:dev-*" # only dev-prefixed DBs
- "arn:aws:rds:us-east-1:*:db:staging-*"
escalation_targets:
- security-team@example.com # blocked actions route here for human review

audit:
log_all_decisions: true
log_format: structured_json
retention_days: 90

The guardian is deployed alongside a proposal agent. When the proposal agent generates an execution plan, the guardian reviews it before any commands run.


Quick Reference Table

PatternAutonomy RangeTypical ToolsApproval RequiredKey Config
AdvisorL1 onlyRead-only terminalNoallowed_commands: describe/get/select
InvestigatorL1 or L2Read-only terminal + webNoMulti-step skill with retrieval loop
ProposalL2-L4Read + write (gated)Yes — before writeapproval: required: true, gate: before_write
GuardianL1 onlyReview tool onlyN/A (guardian never executes)blocked_commands, policy, audit

Common Misconfigurations

MistakeSymptomCorrect Approach
Advisor with write toolsAgent recommends an action and then executes it without being askedRemove write tools; advisor output must be read-only
Investigator without skill termination conditionsInvestigation loops forever or returns "inconclusive"Add terminal conditions to SKILL.md decision tree
Proposal without readable approval templateOperators approve blindly without reviewing the planWrite approval_template as human-readable text, not raw JSON
Guardian with no blocked commandsFalse safety — guardian deployed but enforcing nothingDefine explicit blocked patterns before deploying guardian
Promoting before track recordAgent at L3 before 90-day L2 evidenceEnforce the promotion criteria; track record is not optional

Back to: Concepts — The Four Patterns and Autonomy Spectrum