Memories are the core primitive in Crosmos. They allow AI agents to store, retrieve, and manage contextual information across sessions. Memories are the source-of-truth for the agents.Documentation Index
Fetch the complete documentation index at: https://docs.crosmos.dev/llms.txt
Use this file to discover all available pages before exploring further.
Why contextual memories, not atomic facts
Most memory systems treat knowledge as a bag of disconnected atomic facts: tiny sentences stripped of context, relationships, and temporal grounding. This approach breaks down fast. Consider a conversation where a user says:“I switched from my old accounting firm in Chicago to a startup in Austin back in March. The pay cut was rough but I’m way happier here.”An atomic fact extractor might produce:
User worked at an accounting firmUser lived in ChicagoUser moved to AustinUser changed jobs in MarchUser took a pay cutUser is happier at new job
The problem with over-splitting
The problem with over-splitting
Atomic facts create noise. A single conversation about a dinner outing might generate 10+ fragments: the restaurant name, the food ordered, who was there, the location, the price, the rating. Each fragment competes for retrieval budget, diluting the signal. The retriever has to reassemble the story from scattered pieces, and it usually can’t.
The Crosmos approach
Crosmos stores memories as enriched facts with entity-relationship context. Each memory preserves enough context to be useful on its own, while the knowledge graph captures how everything connects.What each memory carries
| Property | Description |
|---|---|
| Content | The fact written in natural language, detailed enough to answer a question without needing other memories |
| Entity relationships | Structured ERE (Entity-Relation-Entity) triples connecting the memory to the knowledge graph |
| Temporal grounding | When the event happened (event_time) and when it was learned (recorded_at) |
| Importance score | A scored signal for prioritization (0.3 = minor, 0.6 = moderate, 0.9 = identity-defining) |
| Confidence | How certain the extraction is |
Memory types
| Type | Description | Example |
|---|---|---|
| Episode | A specific event or transition with temporal context | ”User left Google to join Anthropic in May 2025” |
| Semantic | An ongoing state, identity, or durable fact | ”User works at Anthropic as a research engineer” |
| Viewpoint | A preference, feeling, opinion, or subjective judgment | ”User prefers Neovim over VS Code for modal editing speed” |
State changes produce multiple types. When a user describes a transition, Crosmos extracts both the event and the resulting state.
- “I left Google last May to join Anthropic” → episode (the transition) + semantic (current employer)
- “I switched from VS Code to Neovim” → episode (the switch) + viewpoint (the preference)
Extraction principles
Self-contained
Each memory answers a question on its own. No memory requires another memory to make sense.
Not over-split
Related facts stay together. “User works at Stripe on payments” is one memory, not two.
Not over-merged
Different topics get separate memories. Work, preferences, pets, and location plans are distinct.
Entity-preserving
Specific names (brands, stores, venues, people) are kept verbatim, never generalized away.
Retrieval
Memories are retrieved using a hybrid approach combining four signals:- Semantic search: vector similarity via HNSW index
- Keyword search: full-text matching with relevance scoring
- Graph traversal: BFS through entity relationships, seeded by multiple strategies
- Temporal search: activated when a query contains time references, ranks memories by proximity to the extracted date window
Soft delete
Memories can be “forgotten” via soft delete. The memory and its connected edges are hidden from retrieval but preserved in the database. This allows:- User-controlled memory management
- Reversible deletion (memories can be un-forgotten)
- Complete audit trail of what was known and when