Skip to main content
Facts are pieces of information that should outlive any single conversation thread — a user’s name, a preference, a long-lived project state. Unlike working context and transcripts, which are thread-scoped, facts persist across threads and sessions for the same agent + user pair.

Store a fact

Use sdk.memory.remember() to store a fact directly. No extractor runs — the content is indexed as-is with the type and retention you give it.
Pinned facts survive cleanup and decay. Use them for information that should never age out.

Search for facts

Retrieve stored facts with sdk.memory.items.search():
Search is semantic — it matches on meaning, not exact keywords. Results are ranked by relevance and confidence.

Manage individual items

How facts differ from turns

Facts are how an agent remembers who a user is and what they care about, even when they start a brand-new thread months later.