Import Agent
agents.import_file(AgentImportFileParams**kwargs) -> AgentImportFileResponse
POST/v1/agents/import
Import a serialized agent file and recreate the agent(s) in the system. Returns the IDs of all imported agents.
Parameters
Import Agent
import os
from letta_client import Letta
client = Letta(
api_key=os.environ.get("LETTA_API_KEY"), # This is the default and can be omitted
)
response = client.agents.import_file(
file=b"Example data",
)
print(response.agent_ids){
"agent_ids": [
"string"
]
}Returns Examples
{
"agent_ids": [
"string"
]
}
Skip to content