Skip to content
  • Auto
  • Light
  • Dark
DiscordForumGitHubSign up
View as Markdown
Copy Markdown

Open in Claude
Open in ChatGPT

Create agents from a template (Cloud-only)

post/v1/templates/{template_version}/agents

Creates an Agent or multiple Agents from a template

Path ParametersExpand Collapse
template_version: string
Body ParametersExpand Collapse
agent_name: optional string

The name of the agent, optional otherwise a random one will be assigned

identity_ids: optional array of string

The identity ids to assign to the agent

initial_message_sequence: optional array of object { content, role, batch_item_id, 4 more }

Set an initial sequence of messages, if not provided, the agent will start with the default message sequence, if an empty array is provided, the agent will start with no messages

content: string
role: "user" or "system" or "assistant"
Accepts one of the following:
"user"
"system"
"assistant"
batch_item_id: optional string
group_id: optional string
name: optional string
otid: optional string
sender_id: optional string
memory_variables: optional map[string]

The memory variables to assign to the agent

tags: optional array of string

The tags to assign to the agent

tool_variables: optional map[string]

The tool variables to assign to the agent

Create agents from a template (Cloud-only)
curl https://api.letta.com/v1/templates/$TEMPLATE_VERSION/agents \
    -H 'Content-Type: application/json' \
    -H "Authorization: Bearer $LETTA_API_KEY"
Returns Examples