Role Templates
Role templates define default settings for agents spawned with a specific role. When you configure a template for "dev", every new dev agent inherits those defaults.
What Can Be Configured
| Field | Description |
|---|---|
| Model | Default Claude model (Haiku, Sonnet, Opus) |
| Orchestrator | Whether the agent can delegate tasks |
| Subagents | Whether the agent can spawn sub-agents |
| Default Task | Initial prompt when the agent is created |
| Effort | Default effort level (Low, Medium, High) |
Configuring Templates
- In the sidebar, click on a role name to expand it
- Click "Configurar template"
- A dialog opens with the template fields
- Configure and click Salvar
A small dot indicator appears next to roles that have a template configured.
How Templates Are Applied
When a new agent is created (POST /api/workspaces/:id/agents), the backend:
- Looks up
workspace.roleTemplates[role] - If found, merges the template fields into the new agent session:
model→agent.modelisOrchestrator→agent.isOrchestratorcanSpawnSubagents→agent.canSpawnSubagentseffort→agent.effortdefaultTask→ used as the initial task if none provided
API
bash
# Get template
GET /api/workspaces/:id/role-template/:role
# Save template
PUT /api/workspaces/:id/role-template/:role
{
"model": "claude-haiku-4-5-20251001",
"isOrchestrator": true,
"canSpawnSubagents": false,
"defaultTask": "Read the project context and ask what to do",
"effort": "medium"
}Storage
Templates are stored per-workspace in workspaces.json:
json
{
"id": "abc123",
"name": "My Project",
"roleTemplates": {
"arquiteto": { "model": "claude-sonnet-4-6", "isOrchestrator": true },
"dev": { "model": "claude-haiku-4-5-20251001", "effort": "high" }
}
}