Template agent definitions for Claude Code: coordinator, architect, quality-gate, and worker roles with team composition files.
Project description
cervellaswarm-agent-templates
Template agent definitions for Claude Code multi-agent teams. Scaffold a coordinator, architect, quality gate, and specialized workers in under 10 minutes.
pip install cervellaswarm-agent-templates
cervella-agent init-team standard --name my-project
Built by the CervellaSwarm team. Battle-tested with 17 AI agents across hundreds of real development sessions.
Why Templates?
Claude Code custom agents use Markdown files with YAML frontmatter. But designing effective agent definitions from scratch means figuring out roles, tool permissions, output formats, and team composition by trial and error.
This package gives you battle-tested templates for 4 core agent roles, a shared DNA system for team-wide behavior, and a team.yaml composition format no other framework offers:
cervella-agent init-team standard --name my-project -o .claude/agents/
Created 9 files in .claude/agents/:
_shared_dna.md <-- Shared behavior for ALL agents
team.yaml <-- Declarative team composition
lead.md <-- Coordinator (Opus)
planner.md <-- Architect (Opus)
reviewer.md <-- Quality Gate (Opus)
backend.md <-- Backend Worker (Sonnet)
frontend.md <-- Frontend Worker (Sonnet)
tester.md <-- Tester Worker (Sonnet)
researcher.md <-- Researcher Worker (Sonnet)
Agent Roles
| Role | Model | Purpose | Can Write Code? |
|---|---|---|---|
| Coordinator | Opus | Routes tasks, delegates to specialists, consolidates results | No (delegates) |
| Architect | Opus | Plans complex changes, produces structured plans for workers | No (read-only) |
| Quality Gate | Opus | Reviews output, enforces standards, approves or rejects | Yes (fixes) |
| Worker | Sonnet | Implements changes in a specific domain (backend, frontend, etc.) | Yes |
Workers come in 7 specialties: backend, frontend, tester, researcher, devops, docs, generic.
Quick Start
1. Create a single agent
# Create a coordinator
cervella-agent init coordinator --name my-lead
# Create a backend worker
cervella-agent init worker --name my-backend --specialty backend
# Create an architect
cervella-agent init architect --name my-planner
2. Create a full team
# Minimal team (3 agents: coordinator + worker + quality gate)
cervella-agent init-team minimal --name my-project -o .claude/agents/
# Standard team (7 agents: + architect, 4 workers)
cervella-agent init-team standard --name my-project -o .claude/agents/
# Full team (17 agents: all specialist roles)
cervella-agent init-team full --name my-project -o .claude/agents/
3. Validate your agents
# Check agent files for errors
cervella-agent validate .claude/agents/*.md
4. Customize
Edit the generated .md files to match your project. The YAML frontmatter controls capabilities; the Markdown body is the system prompt.
The team.yaml Format
No other multi-agent framework has declarative team composition. CervellaSwarm introduces team.yaml:
name: my-project
version: 1.0.0
description: Standard 7-agent team with architect and multiple workers
agents:
- name: lead
type: coordinator
role: lead
- name: planner
type: architect
role: planner
- name: reviewer
type: quality-gate
role: validator
- name: backend
type: worker
specialty: backend
role: worker
- name: frontend
type: worker
specialty: frontend
role: worker
entry_point: lead
process: hierarchical
This file serves as the single source of truth for your team structure.
Frontmatter Reference
Every agent file uses YAML frontmatter to declare its identity and capabilities:
---
# IDENTITY
name: my-agent # Required. Unique agent identifier
version: 1.0.0 # Semver. Track agent definition changes
updated: 2026-02-18 # Last modified date
description: > # Required. What this agent does
One-line summary shown in agent listings.
role: Worker # Human-readable role label
# CAPABILITIES
model: sonnet # Required. opus | sonnet | haiku
tools: Read, Edit, Bash # Required. Comma-separated tool allowlist
disallowedTools: Write # Explicit tool denylist
permissionMode: default # default | plan | bypassPermissions | acceptEdits
maxTurns: 30 # Max API round-trips before stopping
# KNOWLEDGE
shared_dna: _shared_dna.md # Shared behavior file (loaded automatically)
# MEMORY
memory: user # Persistent memory: user | project | local
---
See docs/FRONTMATTER_REFERENCE.md for the complete field reference.
Shared DNA
The _shared_dna.md file defines behavior shared by ALL agents in your team. Instead of duplicating rules across every agent file, reference them once:
> **Shared DNA:** See `_shared_dna.md` for team-wide rules.
The template includes:
- Autonomous decision rules (when to proceed vs. ask vs. stop)
- Structured output format
- Context efficiency guidelines
- Tool usage patterns
Customize it for your team's conventions, coding standards, and communication style.
Comparison with Other Frameworks
| Feature | CervellaSwarm | CrewAI | AutoGen | LangGraph |
|---|---|---|---|---|
| Config format | Markdown + YAML | YAML + Python | Pure Python | Pure Python |
| Agent versioning | semver per agent | No | No | No |
| Shared behavior | _shared_dna.md |
None | Python inheritance | None |
| Team composition file | team.yaml |
None | None | None |
| Beginner-friendly | High (edit Markdown) | Medium | Low | Very Low |
| Non-dev editable | Yes (it's Markdown) | Partial | No | No |
| Tool permissions | Declarative allowlist | Python only | Python only | Python only |
Honest note: CrewAI has excellent DX with its role/goal/backstory model. AutoGen is more powerful for complex orchestration patterns. LangGraph offers maximum flexibility for custom state machines. CervellaSwarm's strength is readability, versioning, and team composition -- your agent definitions live in version-controlled Markdown that anyone on the team can read and edit.
CLI Reference
cervella-agent init <type> Create a single agent
--name, -n NAME Agent name (default: type name)
--team, -t TEAM Team name (default: my-team)
--specialty, -s SPEC Worker specialty (default: generic)
--output, -o DIR Output directory (default: current)
cervella-agent init-team <preset> Create a complete team
--name, -n NAME Team name (default: my-team)
--output, -o DIR Output directory (default: current)
cervella-agent list List available templates and specialties
cervella-agent validate <files> Validate agent definition files
cervella-agent --version Show version
Examples
The examples/ directory contains complete team setups:
examples/
minimal-team/ # 3 agents: coordinator + backend + quality gate
standard-team/ # 7 agents: + architect, frontend, tester, researcher
full-team/ # 17 agents: all specialist roles
Each example includes a team.yaml and all agent .md files, ready to copy into your project.
Python API
from cervellaswarm_agent_templates import create_agent, create_team, validate_agent
# Create a single agent
path = create_agent("coordinator", name="my-lead", team_name="my-project")
# Create a full team
files = create_team("standard", output_dir=".claude/agents/", team_name="my-project")
# Validate an agent file
result = validate_agent(".claude/agents/my-lead.md")
print(result.valid) # True
print(result.issues) # []
Requirements
- Python 3.10+
- pyyaml >= 6.0
License
Apache-2.0. See LICENSE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cervellaswarm_agent_templates-0.1.0.tar.gz.
File metadata
- Download URL: cervellaswarm_agent_templates-0.1.0.tar.gz
- Upload date:
- Size: 39.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
28b7c96df9e869de0158a0e3fa7625ffc2fcb2b4c709626d7c5ac2e0259b3352
|
|
| MD5 |
4780af979d5fdccd0a2d1992e0476173
|
|
| BLAKE2b-256 |
743c89ae762e70c0bc7f92786b568e1ee2c00e74c05669f73e322a3608556690
|
Provenance
The following attestation bundles were made for cervellaswarm_agent_templates-0.1.0.tar.gz:
Publisher:
publish-agent-templates.yml on rafapra3008/cervellaswarm-internal
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cervellaswarm_agent_templates-0.1.0.tar.gz -
Subject digest:
28b7c96df9e869de0158a0e3fa7625ffc2fcb2b4c709626d7c5ac2e0259b3352 - Sigstore transparency entry: 989402113
- Sigstore integration time:
-
Permalink:
rafapra3008/cervellaswarm-internal@748e07119d50af2e35a393ecd40a2ab9e327c95a -
Branch / Tag:
refs/tags/agent-templates-v0.1.0 - Owner: https://github.com/rafapra3008
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-agent-templates.yml@748e07119d50af2e35a393ecd40a2ab9e327c95a -
Trigger Event:
push
-
Statement type:
File details
Details for the file cervellaswarm_agent_templates-0.1.0-py3-none-any.whl.
File metadata
- Download URL: cervellaswarm_agent_templates-0.1.0-py3-none-any.whl
- Upload date:
- Size: 24.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f33139d28a442a40d41895e0757b8bdc7708f2a6f184928ec682a8bbfeb52fab
|
|
| MD5 |
986f4cf376656c994295fd6aae5aaa76
|
|
| BLAKE2b-256 |
bb04a957f43195482d21ef2607031773d50b28d6521df06cac6daaf67824bff7
|
Provenance
The following attestation bundles were made for cervellaswarm_agent_templates-0.1.0-py3-none-any.whl:
Publisher:
publish-agent-templates.yml on rafapra3008/cervellaswarm-internal
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cervellaswarm_agent_templates-0.1.0-py3-none-any.whl -
Subject digest:
f33139d28a442a40d41895e0757b8bdc7708f2a6f184928ec682a8bbfeb52fab - Sigstore transparency entry: 989402176
- Sigstore integration time:
-
Permalink:
rafapra3008/cervellaswarm-internal@748e07119d50af2e35a393ecd40a2ab9e327c95a -
Branch / Tag:
refs/tags/agent-templates-v0.1.0 - Owner: https://github.com/rafapra3008
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-agent-templates.yml@748e07119d50af2e35a393ecd40a2ab9e327c95a -
Trigger Event:
push
-
Statement type: