Import Agent
client.agents.importFile(AgentImportFileParams { file, append_copy_suffix, env_vars_json, 6 more } params, RequestOptionsoptions?): AgentImportFileResponse { agent_ids }
/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 Letta from '@letta-ai/letta-client';
const client = new Letta({
apiKey: 'My API Key',
});
const response = await client.agents.importFile({ file: fs.createReadStream('path/to/file') });
console.log(response.agent_ids);
{
"agent_ids": [
"string"
]
}Returns Examples
{
"agent_ids": [
"string"
]
}