agents

Import Agent

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

post/v1/agents/import

Request

  • Base URL
    https://app.letta.com
  • URL
    https://app.letta.com/v1/agents/import
  • Auth
    HTTP bearer

Headers

x-override-embedding-modelstring nullable

Request body multipart/form-data

filestring binary required
append_copy_suffixboolean

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

override_existing_toolsboolean

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 nullable

Override import with specific embedding handle.

project_idstring nullable

The project ID to associate the uploaded agent with.

strip_messagesboolean

If set to True, strips all messages from the agent before importing.

env_vars_jsonstring nullable

Environment variables as a JSON string to pass to the agent for tool execution.

Response

Successful Response

agent_idsstring[] required

List of IDs of the imported agents

Changes

No recorded changes to this operation across all 36 revisions of this API.