Skip to main content
The Memory System allows Kortix agents to extract, store, and recall information from past conversations. This creates a personalized experience where agents remember user preferences, facts, and context across multiple sessions.

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

Response:

Get Memory Statistics

Response:

Create Memory Manually

Delete a Memory

Delete All Memories

Deleting all memories is permanent and cannot be undone. Use with caution.

Memory Settings

Global Memory Settings

Enable or disable memory at the account level:
Response:

Update Memory Settings

Thread-Level Memory Control

Control memory on a per-conversation basis:
Response:

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:
Example formatted memory:

Background Processing

Memory extraction runs asynchronously to avoid slowing down conversations:
  1. Conversation completes
  2. Job queued for extraction
  3. Worker processes the conversation
  4. Memories stored with embeddings
  5. Cache invalidated for fresh retrieval

Best Practices

Periodically review auto-extracted memories to ensure accuracy. Delete or edit memories that are incorrect or outdated.
Let the AI extract memories automatically in most cases. Manual creation is best for critical facts or preferences you want to ensure are remembered.
Stay aware of your tier’s memory limits. Delete old or irrelevant memories to make room for new ones.
Use thread-level memory settings to disable memory extraction for conversations containing sensitive information.
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

API Reference

Endpoints