Skip to main content

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?

The template also owns a set of AdapterConfig rows (one per enabled adapter) that define tool integrations.

Creating a Template

Response:

LLM Provider Configuration

LLM provider keys live on the organization, not the template — every template in the org shares the same openai_api_key / anthropic_api_key:
If unset, Bedrock falls back to the OPENAI_API_KEY / ANTHROPIC_API_KEY environment variables. See Organizations for details.

System Prompt

The template’s system_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.).
The 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:
On creation, the agent:
  1. Copies system_prompt and default_model onto itself
  2. Adds every adapter referenced by the template’s AdapterConfig rows to its own adapters set
  3. Snapshots each AdapterConfig.config into a matching AgentAdapterConfig row
  4. Runs adapter-specific seed hooks (for example, Documents seeds curated “skill” documents onto the new agent)
From then on, the agent is self-contained — template edits don’t modify it.

Tool-Call Secret

The tool_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.
See Custom Adapters for how to verify the secret on your side.

Harness Git Ref

Every agent run spawns an isolated bedrock-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)

API Summary

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.