How Memory Works
Kortix’s memory system operates in three phases:1
Extraction
AI analyzes conversations to identify memorable information
2
Storage
Memories are stored with embeddings for semantic search
3
Retrieval
Relevant memories are retrieved and injected into new conversations
Memory Types
The system categorizes memories into four types:Fact
Objective information about the user:- “Works at Acme Corp as a software engineer”
- “Has two children, ages 5 and 8”
- “Lives in San Francisco”
Preference
User likes, dislikes, and preferences:- “Prefers concise, technical explanations”
- “Likes Python over JavaScript”
- “Wants code examples with every explanation”
Context
Situational information for understanding requests:- “Working on a React migration project”
- “Learning machine learning fundamentals”
- “Building a startup in the healthcare space”
Conversation Summary
Key points from previous conversations:- “Discussed database optimization strategies on Jan 15”
- “Asked about Docker deployment best practices”
- “Requested help with API authentication flow”
Memory Extraction
Memories are extracted automatically after conversations using AI analysis:Extraction Criteria
The AI only extracts memories when:- Conversation has meaningful content (> 20 characters)
- Information is worth remembering
- User shared personal information or preferences
- Context could be useful in future conversations
Memory Retrieval
Memories are retrieved using semantic similarity search:Retrieval Limits by Tier
Different subscription tiers have different memory limits:Using the Memory API
List Memories
Get Memory Statistics
Create Memory Manually
Delete a Memory
Delete All Memories
Memory Settings
Global Memory Settings
Enable or disable memory at the account level:Update Memory Settings
Thread-Level Memory Control
Control memory on a per-conversation basis:Update Thread Memory Settings
Thread-level settings override global settings. If you disable memory for a specific thread, no memories will be extracted or retrieved for that conversation.
Memory in Agent Prompts
Retrieved memories are formatted and injected into agent prompts:Background Processing
Memory extraction runs asynchronously to avoid slowing down conversations:- Conversation completes
- Job queued for extraction
- Worker processes the conversation
- Memories stored with embeddings
- Cache invalidated for fresh retrieval
Best Practices
Review extracted memories
Review extracted memories
Periodically review auto-extracted memories to ensure accuracy. Delete or edit memories that are incorrect or outdated.
Use manual creation sparingly
Use manual creation sparingly
Let the AI extract memories automatically in most cases. Manual creation is best for critical facts or preferences you want to ensure are remembered.
Monitor memory count
Monitor memory count
Stay aware of your tier’s memory limits. Delete old or irrelevant memories to make room for new ones.
Disable for sensitive conversations
Disable for sensitive conversations
Use thread-level memory settings to disable memory extraction for conversations containing sensitive information.
Leverage memory types
Leverage memory types
Different memory types serve different purposes. Facts are objective, preferences guide behavior, context provides background, and summaries reference past interactions.
Privacy and Security
Data Storage
- Memories are stored encrypted at rest
- Each memory is tied to a specific account
- Users can delete all memories at any time
Access Control
- Only the account owner can view their memories
- Memories are never shared between accounts
- API access requires authentication
Retention
- Memories persist until manually deleted
- Deleting a thread does not delete associated memories
- Account deletion removes all memories
Troubleshooting
Memories Not Being Extracted
- Check settings: Verify memory is enabled globally and for the thread
- Check tier: Ensure your subscription tier supports memory
- Review conversation: Very short conversations may not generate memories
- Check logs: Look for extraction errors in server logs
Irrelevant Memories Retrieved
- Adjust threshold: Lower the similarity threshold for stricter matching
- Delete irrelevant memories: Remove memories that aren’t useful
- Improve queries: More specific queries retrieve more relevant memories
Memory Limit Reached
- Delete old memories: Remove outdated or less useful memories
- Upgrade tier: Higher tiers support more memories
- Be selective: Not every fact needs to be remembered