Create Agent
Create an agent.
Headers
The project slug to associate with the agent (cloud only).
The project slug to associate with the agent (cloud only).
Request body
The name of the agent.
The tools used by the agent.
The ids of the tools used by the agent.
The ids of the sources used by the agent.
The ids of the blocks used by the agent.
The tags associated with the agent.
The system prompt used by the agent.
Enum to represent the type of agent.
If true, attaches the Letta core tools (e.g. core_memory related functions).
If true, attaches the Letta multi-agent tools (e.g. sending a message to another agent).
If true, attaches the Letta base tool rules (e.g. deny all tools not explicitly allowed).
If true, automatically creates and attaches a default data source for this agent.
The description of the agent.
The metadata of the agent.
The LLM configuration handle used by the agent, specified in the format provider/model-name, as an alternative to specifying llm_config.
The embedding configuration handle used by the agent, specified in the format provider/model-name.
The context window limit used by the agent.
The embedding chunk size used by the agent.
The maximum number of tokens to generate, including reasoning step. If not set, the model will use its default value.
The maximum number of tokens to generate for reasoning step. If not set, the model will use its default value.
Whether to enable internal extended thinking step for a reasoner model.
Whether to enable reasoning for this agent.
Deprecated: please use the 'create agents from a template' endpoint instead.
Deprecated: No longer used
Deprecated: Project should now be passed via the X-Project header instead of in the request body. If using the sdk, this can be done via the new x_project field below.
Deprecated: use secrets field instead.
The environment variables for tool execution specific to this agent.
The variables that should be set for the agent.
The id of the project the agent belongs to.
The id of the template the agent belongs to.
The base template id of the agent.
The ids of the identities associated with this agent.
If set to True, the agent will not remember previous messages (though the agent will still retain state via core memory blocks and archival/recall memory). Not recommended unless you have an advanced use case.
If set to True, memory management will move to a background agent thread.
The timezone of the agent (IANA format).
Maximum number of files that can be open at once for this agent. Setting this too high may exceed the context window, which will break the agent.
The per-file view window character limit for this agent. Setting this too high may exceed the context window, which will break the agent.
If set to True, the agent will be hidden.
Response
Successful Response
The id of the user that made this object.
The id of the user that made this object.
The timestamp when the object was created.
The timestamp when the object was last updated.
The id of the agent. Assigned by the database.
The name of the agent.
The ids of the messages in the agent's in-context memory.
The system prompt used by the agent.
Enum to represent the type of agent.
The description of the agent.
The metadata of the agent.
The tags associated with the agent.
The id of the project the agent belongs to.
The id of the template the agent belongs to.
The base template id of the agent.
The id of the deployment.
The id of the entity within the template.
The ids of the identities associated with this agent.
If set to True, the agent will not remember previous messages (though the agent will still retain state via core memory blocks and archival/recall memory). Not recommended unless you have an advanced use case.
If set to True, memory management will move to a background agent thread.
The timestamp when the agent last completed a run.
The duration in milliseconds of the agent's last run.
The timezone of the agent (IANA format).
Maximum number of files that can be open at once for this agent. Setting this too high may exceed the context window, which will break the agent.
The per-file view window character limit for this agent. Setting this too high may exceed the context window, which will break the agent.
If set to True, the agent will be hidden.
Example response
{
"memory": {
"blocks": [
{
"id": "block-123e4567-e89b-12d3-a456-426614174000"
}
],
"file_blocks": [
{
"id": "block-123e4567-e89b-12d3-a456-426614174000"
}
]
},
"tools": [
{
"id": "tool-123e4567-e89b-12d3-a456-426614174000"
}
],
"sources": [
{
"id": "source-123e4567-e89b-12d3-a456-426614174000"
}
],
"tool_exec_environment_variables": [
{
"id": "agent-env-123e4567-e89b-12d3-a456-426614174000"
}
],
"secrets": [
{
"id": "agent-env-123e4567-e89b-12d3-a456-426614174000"
}
]
}