The Letta Agent SDK is the SDK for stateful agents. Each agent has its own identity and long-term memory, and keeps both across conversations, models, and the computers it runs on.
https://docs.letta.com/agent-sdk β HEALTH ? 90 / Healthy
The Letta Agent SDK is the SDK for stateful agents. Each agent has its own identity and long-term memory, and keeps both across conversations, models, and the computers it runs on.
https://docs.letta.com/agent-sdk β// readme
The SDK for stateful agents: create an agent once, then resume it from anywhere. Each agent has its own identity and long-term memory, and keeps both across conversations, models, and the computers it runs on.
Read the documentation for guides and the full API reference.
npm install @letta-ai/letta-agent-sdk
import { LettaAgentClient } from "@letta-ai/letta-agent-sdk";
const client = new LettaAgentClient({ backend: "cloud" });
// Create the agent once...
const agentId = await client.createAgent({
systemPrompt: "You are Nora, a research analyst who tracks our competitors.",
memfs: true,
});
// ...then resume it, from anywhere, for as long as it lives.
await using session = client.resumeSession(agentId);
await session.send("What changed since last week?");
for await (const message of session.stream()) {
if (message.type === "assistant") process.stdout.write(message.content);
}
Local and remote management clients can use await using client = new LettaAgentClient(...), or call await client.close() explicitly. Clientβ¦