Skip to content

agent.yaml Schema

Every agent type in the Bonsai catalog is defined by an agent.yaml file and a companion core/ directory. The agent.yaml declares the agent’s identity and default abilities.

FieldTypeRequiredDescription
namestringYesMachine identifier for the agent type. Lowercase, hyphens only (e.g., tech-lead, backend).
display_namestringNoHuman-readable name (e.g., Tech Lead Agent). If omitted, auto-derived from name.
descriptionstringYesOne-line description of the agent’s role.
defaultsDefaultsYesPre-selected abilities for this agent type.

The defaults object specifies which abilities are pre-selected when installing this agent type. Users can add or remove items during the interactive picker (except required items).

FieldTypeRequiredDescription
defaults.skills[]stringNoDefault skill names to pre-select
defaults.workflows[]stringNoDefault workflow names to pre-select
defaults.protocols[]stringNoDefault protocol names to pre-select
defaults.sensors[]stringNoDefault sensor names to pre-select
defaults.routines[]stringNoDefault routine names to pre-select

Each agent type has a core/ directory alongside its agent.yaml that contains identity and memory templates.

  • Directorycatalog/agents/tech-lead/
    • agent.yaml
    • Directorycore/
      • identity.md.tmpl (required — defines who the agent is)

Bonsai uses a layered system for core files:

  1. Shared core files in catalog/core/ provide defaults (memory, self-awareness)
  2. Agent-specific core files in catalog/agents/<name>/core/ can override any shared file by using the same filename

For example, if both catalog/core/memory.md.tmpl and catalog/agents/tech-lead/core/memory.md.tmpl exist, the Tech Lead gets the agent-specific version while other agents get the shared version.

FileRequiredDescription
identity.md.tmplYesDefines the agent’s identity, role, relationships, and mindset. Always agent-specific.
memory.md.tmplNoWorking memory template. Falls back to shared catalog/core/memory.md.tmpl if not provided.
self-awareness.mdNoContext monitoring and hard thresholds. Falls back to shared catalog/core/self-awareness.md if not provided.

Here is the actual agent.yaml for the Tech Lead agent:

name: tech-lead
display_name: Tech Lead Agent
description: >-
Architects the system, writes plans, reviews agent output —
never writes application code
defaults:
skills:
- planning-template
- issue-classification
- dispatch
- review-checklist
workflows:
- issue-to-implementation
- planning
- code-review
- session-logging
protocols:
- session-start
- security
- scope-boundaries
sensors:
- session-context
- scope-guard-files
- scope-guard-commands
- dispatch-guard
- subagent-stop-review

And here is a code agent example (Backend):

name: backend
display_name: Backend Agent
description: Executes backend plans — API, database, server-side logic
defaults:
skills:
- coding-standards
- testing
- database-conventions
workflows:
- plan-execution
- reporting
- session-logging
protocols:
- session-start
- security
- scope-boundaries
sensors:
- session-context
- scope-guard-files
NameDisplay NameDescription
tech-leadTech Lead AgentArchitects the system, writes plans, reviews agent output — never writes application code
backendBackend AgentExecutes backend plans — API, database, server-side logic
frontendFrontend AgentExecutes frontend plans — UI components, state management, styling
fullstackFull-Stack AgentImplements full-stack features end-to-end — UI, API routes, database, auth, tests
devopsDevOps AgentManages infrastructure-as-code, CI/CD pipelines, containers, and deployment automation
securitySecurity AgentAudits code for vulnerabilities, reviews auth patterns, scans dependencies, enforces security standards