Skip to content

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

FieldDescription
ModelDefault Claude model (Haiku, Sonnet, Opus)
OrchestratorWhether the agent can delegate tasks
SubagentsWhether the agent can spawn sub-agents
Default TaskInitial prompt when the agent is created
EffortDefault effort level (Low, Medium, High)

Configuring Templates

  1. In the sidebar, click on a role name to expand it
  2. Click "Configurar template"
  3. A dialog opens with the template fields
  4. 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:

  1. Looks up workspace.roleTemplates[role]
  2. If found, merges the template fields into the new agent session:
    • modelagent.model
    • isOrchestratoragent.isOrchestrator
    • canSpawnSubagentsagent.canSpawnSubagents
    • effortagent.effort
    • defaultTask → 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" }
  }
}

Released under the MIT License.