Bonsai agents are Claude Code agents equipped with a structured instruction layer — identity, memory, protocols, skills, workflows, and sensors. Think of each agent as a new hire who arrives with full onboarding materials:
What a new hire needs
Bonsai equivalent
Role description
Identity — job title, mindset, relationships
Company handbook
Protocols — security policy, scope boundaries
Playbooks
Workflows — how to plan, review, report
Domain training
Skills — coding standards, API patterns
Automated guardrails
Sensors — catch mistakes in real time
Maintenance duties
Routines — periodic audits on a schedule
When an agent starts a session, it reads its identity, checks its memory, follows its startup protocol, and gets context injected by sensors — all before you ask it anything.
Architects, plans, reviews — never writes application code.
The orchestrator. It reads requirements, writes implementation plans, dispatches work to code agents via worktrees, and reviews their output. Every project starts with a Tech Lead.
A generalist code agent that handles the full stack. Carries the broadest set of default skills — coding standards, testing, design, databases, API design, and auth patterns.
Manages infrastructure. Comes with IaC and container standards, plus the iac-safety-guard sensor that blocks dangerous commands like terraform destroy.
Audits code for security issues. Equipped with auth patterns, review checklists, and the security-audit workflow. The api-security-check sensor auto-detects common vulnerabilities in code changes.
The simplest setup. One Tech Lead, one Full-Stack agent:
You
└── Tech Lead (station/)
└── Full-Stack (fullstack/)
The Tech Lead plans features and reviews work. The Full-Stack agent implements everything. Good for small-to-medium projects where you don’t need domain specialization.
Each agent has domain-specific skills and conventions. The Tech Lead coordinates across both — planning features that span frontend and backend, reviewing each agent’s output, maintaining shared standards.
Maximum specialization with infrastructure and security coverage:
You
└── Tech Lead (station/)
├── Backend (backend/)
├── Frontend (frontend/)
├── DevOps (devops/)
└── Security (security/)
The DevOps agent adds iac-safety-guard (blocks dangerous infrastructure commands) and infrastructure routines. The Security agent adds api-security-check (detects vulnerabilities in code), scope-guard-commands (blocks execution), and the security-audit workflow.
Tech Lead: Always installed during bonsai init. It lives in the station directory alongside scaffolding.
Code agents: Added with bonsai add. Each gets its own workspace directory (e.g., backend/, frontend/). The interactive picker lets you select agent type and customize abilities.
Each agent gets:
A CLAUDE.md navigation file with cross-linked references
An agent/ directory with Core (identity, memory), Protocols, Workflows, Skills, and Sensors
Hook entries in .claude/settings.json for all installed sensors
A config entry in .bonsai.yaml tracking all installed components