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)

templates.agents.create(strtemplate_version, AgentCreateParams**kwargs)
post/v1/templates/{template_version}/agents

Creates an Agent or multiple Agents from a template

ParametersExpand Collapse
template_version: str
agent_name: Optional[str]

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

identity_ids: Optional[SequenceNotStr[str]]

The identity ids to assign to the agent

initial_message_sequence: Optional[Iterable[InitialMessageSequence]]

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: str
role: Literal["user", "system", "assistant"]
Accepts one of the following:
"user"
"system"
"assistant"
batch_item_id: Optional[str]
group_id: Optional[str]
name: Optional[str]
otid: Optional[str]
sender_id: Optional[str]
memory_variables: Optional[Dict[str, str]]

The memory variables to assign to the agent

tags: Optional[SequenceNotStr[str]]

The tags to assign to the agent

tool_variables: Optional[Dict[str, str]]

The tool variables to assign to the agent

Create agents from a template (Cloud-only)
from letta_client import Letta

client = Letta(
    api_key="My API Key",
)
client.templates.agents.create(
    template_version="template_version",
)
Returns Examples