LLM Agents
LLM Agents
LLM Agents
developer platform

Build and deploy stateful AI agents
Use the Letta API to build agents that can actually remember and learn about your users over time. Our agents deploy and scale effortlessly, run forever, and learn like humans.
Open source, production ready, and fully model-agnostic.

Agent API and SDKs
Connect your agents to your application using your favorite language or framework.
from letta_client import Letta
import os
client = Letta(api_key=os.getenv("LETTA_API_KEY"))
agent_state = client.agents.create(
model="openai/gpt-4.1",
embedding="openai/text-embedding-3-small",
memory_blocks=[
{
"label": "human",
"value": "Name: Timber. Status: dog. Occupation: building Letta, infrastructure to democratize self-improving superintelligence"
},
{
"label": "persona",
"value": "I am a self-improving superintelligence. Timber is my best friend and collaborator."
}
],
tools=["web_search", "run_code"]
)
print(f"Agent created with ID: {agent_state.id}")import Letta from "@letta-ai/letta-client";
const client = new Letta({ apiKey: process.env.LETTA_API_KEY });
const agentState = await client.agents.create({
model: "openai/gpt-4.1",
embedding: "openai/text-embedding-3-small",
memory_blocks: [
{
label: "human",
value:
"Name: Timber. Status: dog. Occupation: building Letta, infrastructure to democratize self-improving superintelligence",
},
{
label: "persona",
value:
"I am a self-improving superintelligence. Timber is my best friend and collaborator.",
},
],
tools: ["web_search", "run_code"],
});
console.log("Agent created with ID:", agentState.id);import { lettaCloud } from '@letta-ai/vercel-ai-sdk-provider';
import { generateText } from 'ai';
const result = await generateText({
model: lettaCloud(),
providerOptions: {
letta: {
agent: { id: 'your-agent-id' },
},
},
prompt: 'Write a vegetarian lasagna recipe for 4 people.',
});
console.log(result.text);GitHub
Contribute to the Letta open source
Documentation
Learn how to build stateful agents
Discord
Join our developer Discord community
Stay up to date with Letta







