Import Agent
agents.import_file(AgentImportFileParams**kwargs) -> AgentImportFileResponse
/v1/agents/import
Import a serialized agent file and recreate the agent(s) in the system. Returns the IDs of all imported agents.
Parameters
Returns
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"raw file contents",
)
print(response.agent_ids)
{
"agent_ids": [
"string"
]
}
Returns Examples
{
"agent_ids": [
"string"
]
}