What are Memories?
Memories are discrete pieces of information extracted from user conversations. They complement traits by storing:- Specific facts that don’t fit trait schemas
- Events and experiences mentioned
- Contextual information for future conversations
Memory Structure
Memory Types
Fact
Concrete information: “Works at Acme Corp as a senior engineer”
Preference
Likes and dislikes: “Prefers dark mode IDEs”
Event
Things that happened: “Started a new project last week”
Context
Situational info: “Currently debugging a production issue”
Importance Scoring
Memories are scored by likely future relevance:| Score | Description | Examples |
|---|---|---|
| 0.8+ | Core identity/role | Job title, primary tech stack |
| 0.6-0.8 | Ongoing projects | Current goals, active work |
| 0.4-0.6 | Preferences | Tool preferences, working style |
| < 0.4 | Ephemeral context | Today’s specific task |
Memory Decay
Over time, memories become less relevant. ThedecayFactor (starting at 1.0) decreases:
- Unused memories decay faster
- Accessed memories are “refreshed”
- Low importance memories decay faster
Memory Retrieval
When building context for a request, GetProfile retrieves memories based on:- Recency: More recent memories score higher
- Importance: Higher importance memories are prioritized
- Relevance: (Future) Semantic similarity to the current query
- Access patterns: Frequently accessed memories are boosted
Example: Memory Extraction
Given this conversation:Deduplication
GetProfile automatically handles duplicate memories:- Identical content is merged
- Similar memories may be consolidated
- Source messages are aggregated