Import Agent
client.agents.importFile(AgentImportFileParams { file, append_copy_suffix, embedding, 9 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: process.env['LETTA_API_KEY'], // This is the default and can be omitted
});
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"
]
}