Import Agent Serialized

Import a serialized agent file and recreate the agent(s) in the system. Returns the IDs of all imported agents.

Headers

AuthorizationstringRequired

Header authentication of the form Bearer <token>

x-override-embedding-modelstring or nullOptional

Request

This endpoint expects a multipart form containing a file.
filefileRequired
append_copy_suffixbooleanOptionalDefaults to true

If set to True, appends “_copy” to the end of the agent name.

override_existing_toolsbooleanOptionalDefaults to true
If set to True, existing tools can get their source code overwritten by the uploaded tool definitions. Note that Letta core tools can never be updated externally.
override_embedding_handlestring or nullOptional
Override import with specific embedding handle.
project_idstring or nullOptional
The project ID to associate the uploaded agent with.
strip_messagesbooleanOptionalDefaults to false
If set to True, strips all messages from the agent before importing.
env_vars_jsonstring or nullOptional
Environment variables as a JSON string to pass to the agent for tool execution.

Response

Successful Response
agent_idslist of strings
List of IDs of the imported agents

Errors