Skip to content

4.3. Squad Templates

Squad templates are reusable blueprints for a team of agents. A template captures each agent's name, role, system prompt, tool configuration, and model preferences so you can spin up a fully configured squad in one step.

There are two kinds of templates:

  • Built-in templates ship with the app, are read-only, and are localized.
  • User templates are created by saving an existing squad, or by importing a JSON file. They support delete, export, and import.

Using templates

Open the Squad page and click New Squad to open the template gallery. Built-in templates appear first, followed by your own templates. Click a card to preview its agents, then choose Use This Template (jump to review) or Customize (jump to agent configuration).

Saving a squad as a template

You can capture any existing squad as a user template:

  • From the Squad list, use the Save as template action on a squad card.
  • From a squad's detail page, use the Save as template button in the header.

Provide a name (required), an optional description, and an optional icon. The saved template preserves the full per-agent fidelity — the complete tool configuration (enabled/disabled tools, per-tool permission overrides, custom tool settings) and the complete model preferences (preferred model, minimum context window, tool-calling / vision requirements). Applying the template later restores the wizard exactly as the source squad was configured.

Managing user templates

In the template gallery, each user-template card shows inline actions:

  • Export downloads the template as a JSON file.
  • Delete removes the template after a confirmation. Built-in templates cannot be deleted.

Use the Import template button beside the category tabs to import a template from a JSON file. Drag and drop a .json file, or click to browse. The payload is validated locally before it is sent; an invalid file shows an inline error. Imported templates are always stored as user templates, and an ID that collides with a built-in is regenerated automatically.

The template JSON schema

Templates serialize to JSON with camelCase field names. The shape is shared by the Rust backend (src-tauri/src/squad/templates.rs) and the TypeScript frontend (src/types/squad/templates.ts).

{
  "schemaVersion": 1,
  "id": "user-…",
  "name": "Full-Stack Dev Team",
  "description": "A complete development team…",
  "icon": "🛠️",
  "category": "development",
  "isBuiltin": false,
  "suggestedModels": [],
  "i18nKey": {
    "name": "squad.templates.builtin.fullstackDevTeam.name",
    "description": "squad.templates.builtin.fullstackDevTeam.description"
  },
  "agents": [
    {
      "name": "Planner",
      "role": "Planner",
      "systemPrompt": "You are a technical project planner…",
      "tools": ["read_file", "write_file"],
      "toolConfig": {
        "enabledTools": ["read_file", "write_file"],
        "disabledTools": [],
        "toolPermissionOverrides": {},
        "customToolConfigs": {}
      },
      "modelPreferences": {
        "requiresToolCalling": true,
        "requiresVision": false
      },
      "memoryEnabled": true,
      "icon": "📋",
      "i18nKey": {
        "name": "squad.templates.builtin.fullstackDevTeam.agents.planner.name",
        "role": "squad.templates.builtin.fullstackDevTeam.agents.planner.role",
        "systemPrompt": "squad.templates.builtin.fullstackDevTeam.agents.planner.systemPrompt"
      }
    }
  ]
}

Field reference

Field Type Notes
schemaVersion number Schema version. Defaults to 1 for templates that predate the field. Future breaking changes bump this value and add a migration.
id string Unique identifier. Built-ins use builtin-…; user templates use user-….
name string Display name (English fallback when an i18nKey is set).
description string Short description.
icon string Emoji or icon identifier.
category string One of development, content, research, review, custom.
isBuiltin boolean true for bundled built-ins (non-deletable). Always forced to false on import.
suggestedModels string[] Informational only.
i18nKey object? Optional per-field translation keys (name, description).
agents array Agent definitions (below).

Each agent:

Field Type Notes
name string Agent display name.
role string Role label. Canonical English roles (Planner, Developer, Reviewer, Writer) map to known role types; anything else becomes a custom role.
systemPrompt string System prompt.
tools string[] Legacy convenience list of enabled tool names. Mirrors toolConfig.enabledTools when the latter is present.
toolConfig object? Full tool configuration. Takes precedence over tools when present.
modelPreferences object? Full model preferences.
memoryEnabled boolean Whether memory is enabled for the agent.
icon string Emoji or icon identifier.
i18nKey object? Optional per-field translation keys (name, role, systemPrompt).

Older templates that only carry tools (and omit toolConfig / modelPreferences / schemaVersion / i18nKey) still load — the missing fields default safely.

Internationalization of built-in templates

Built-in templates declare an i18nKey for each localizable field. At display time the frontend resolves these keys through react-i18next. If a key is missing in the active locale, the bundled English string carried alongside it is used as the fallback. Switching the app language updates built-in template names, roles, descriptions, and prompts in the gallery, preview, and wizard.

Translation strings live under squad.templates.builtin.* in each locale file (src/locales/<locale>/translation.json).

Adding a new built-in template

Built-in templates are data, not code. They live as JSON seed files under resources/squad-templates/builtin/*.json and are embedded into the binary at compile time, then read by TemplateStorage::list() at startup. Adding a new built-in template requires no Rust changes:

  1. Create a new resources/squad-templates/builtin/<your-template>.json file following the schema above. Set isBuiltin: true, give it a unique builtin-… id, and a schemaVersion.
  2. (Optional but recommended) Add an i18nKey to each localizable field and add the matching translation keys under squad.templates.builtin.* to every locale file. Provide at least English; other locales fall back to English when a key is missing.
  3. Rebuild the app. The new template appears in the gallery automatically.

Because the files are also bundled as Tauri resources, this lays the groundwork for distributing additional templates through the agent catalog without recompiling.