February 23, 2025

Core Memory and Archival Memory SDK APIs Renamed to Blocks and Passages

This is a breaking SDK change and is not backwards compatible.

Given the confusion around our advanced functionality for managing memory, we’ve renamed the Core Memory SDK API to blocks and the Archival Memory SDK API to passages so that our API naming reflects the unit of memory stored. This change only affects our SDK, and does not affect Letta’s Rest API.

Before

1from letta_client import CreateBlock, Letta
2client = Letta(
3 token="YOUR_API_KEY",
4)
5agent = client.agents.create(
6 model="gpt-4o-mini",
7 embedding="openai/text-embedding-ada-002"
8 memory_blocks=[
9 CreateBlock(
10 "label": "human",
11 "value": "name: Caren"
12 ),
13 ],
14)
15blocks = client.agents.core_memory.list_blocks(agent_id=agent.id)
16client.agents.core_memory.detach_block(agent_id=agent.id, block_id=blocks[0].id)

After

1from letta_client import CreateBlock, Letta
2client = Letta(
3 token="YOUR_API_KEY",
4)
5agent = client.agents.create(
6 model="gpt-4o-mini",
7 embedding="openai/text-embedding-ada-002"
8 memory_blocks=[
9 CreateBlock(
10 "label": "human",
11 "value": "name: Caren"
12 ),
13 ],
14)
15blocks = client.agents.blocks.list(agent_id=agent.id)
16client.agents.blocks.detach(agent_id=agent.id, block_id=blocks[0].id)