Templates
An AgentTemplate is a named blueprint for creating agents. Its configuration — system prompt, default model, adapter set with per-adapter config, harness git ref, tool-call secret — is copied onto every new agent at creation time. Template edits don’t retroactively change existing agents; each agent keeps its own snapshot. Think of a template like a Docker image: you author it once and deploy as many agent instances as you need.What’s in a Template?
| Field | Description |
|---|---|
name | Human-readable name (unique per organization) |
description | Optional short summary |
system_prompt | Default instructions stamped onto new agents |
default_model | Default LLM model for new agents (e.g., claude-sonnet-4-5) |
default_reasoning_effort | '' (model default) / minimal / low / medium / high / xhigh / max |
thinking_max_tokens | Max output tokens per LLM call (overrides the effort-based default on Claude) |
max_turns | Maximum iterations per run (default 50; 0 = unlimited) |
harness_git_ref | Branch / tag / SHA of bedrock-harness to run. Blank = latest main. |
agent_created_webhook_url | POSTed with agent + contact details when a new agent auto-spawns from this template |
tool_call_secret | Sent as X-Agent-Secret on external tool webhooks |
Creating a Template
LLM Provider Configuration
LLM provider keys live on the organization, not the template — every template in the org shares the sameopenai_api_key / anthropic_api_key:
OPENAI_API_KEY / ANTHROPIC_API_KEY environment variables. See Organizations for details.
System Prompt
The template’ssystem_prompt is copied onto each new agent created from the template. Agents can override it with their own system_prompt for specialized behavior.
Template edits never retroactively change agents. Update the template first, then create a new agent (or manually update an existing one).
Attaching Adapters
Adapters are attached to a template via AdapterConfig rows. Each row couples an adapter to the configuration needed to use it (phone numbers, API keys, etc.).config payload is validated against the adapter’s config_schema. Adapters with no config (Contacts, Projects, Documents, Notifications) can be attached by creating an AdapterConfig with an empty config.
See Adapters for per-adapter schemas.
Deploying Agents
Create agents against a template:- Copies
system_promptanddefault_modelonto itself - Adds every adapter referenced by the template’s
AdapterConfigrows to its ownadaptersset - Snapshots each
AdapterConfig.configinto a matchingAgentAdapterConfigrow - Runs adapter-specific seed hooks (for example, Documents seeds curated “skill” documents onto the new agent)
Tool-Call Secret
Thetool_call_secret is sent as the X-Agent-Secret header on every webhook tool call made by agents created from this template. Set it so your custom adapter handlers can verify requests came from Bedrock.
Harness Git Ref
Every agent run spawns an isolatedbedrock-harness subprocess pinned to the template’s harness_git_ref. Blank means latest main at dispatch time. Pin this when you want to freeze the runtime — for example, before a fleet-wide rollback:
Template → Agent Hierarchy
- Organization
- Template (blueprint)
- Agents (snapshots of the template — memory, state, adapter configs are per-agent)
- Template (blueprint)
API Summary
| Method | Endpoint | Description |
|---|---|---|
GET | /api/templates/ | List templates |
POST | /api/templates/ | Create template |
GET | /api/templates/{id}/ | Get template |
PUT / PATCH | /api/templates/{id}/ | Update template |
DELETE | /api/templates/{id}/ | Delete template |
Best Practices
One Template per Use Case
Create separate templates for each distinct agent archetype or environment.
Descriptive System Prompts
Write clear system prompts that define expected behavior.
Pin Harness on Rollback
Pin
harness_git_ref to a known-good tag when stabilizing.Configure Tool Secret
Set
tool_call_secret if using webhook-based tools.