Overview
Tabby’s memory system is what makes it truly intelligent. Instead of starting from scratch every conversation, it remembers your preferences, coding style, past interactions, and context to provide increasingly personalized assistance. The memory layer is powered by Mem0 with a hybrid storage architecture:Mem0
Intelligent memory extraction and retrieval
Supabase
Vector embeddings for semantic search
Neo4j
Knowledge graph for relationships (optional)
What is Mem0?
Mem0 is an intelligent memory layer for AI applications that automatically:- Extracts facts from conversations (“User prefers dark mode”)
- Stores embeddings for semantic search
- Retrieves relevant memories based on context
- Updates existing memories instead of duplicating
- Tracks memory history and changes over time
Think of Mem0 as giving your AI a long-term memory system, similar to how humans remember context from past conversations.
Memory Lifecycle
Architecture Components
1. Memory Backend (FastAPI)
The memory service runs as a separate FastAPI server on port 8000:Language Compatibility
Language Compatibility
Mem0 is a Python library. The FastAPI service acts as a bridge to the JavaScript/TypeScript frontend.
Scalability
Scalability
Memory operations can be resource-intensive. Running as a separate service allows independent scaling.
Isolation
Isolation
Crashes in the memory service don’t affect the main Electron app.
2. Supabase Vector Store
Supabase stores vector embeddings of memories for semantic search. Database Schema:- Speed: Sub-millisecond queries even with 100k+ memories
- Accuracy: 95%+ recall compared to exact search
- Scalability: Handles millions of vectors efficiently
3. Neo4j Knowledge Graph (Optional)
Neo4j creates a visual knowledge graph showing relationships between memories. Graph Schema:Memory Types
Tabby classifies memories into 5 types using LLM-based classification:LONG_TERM
Permanent facts and preferencesExamples:
- “User prefers dark mode”
- “My name is John”
- “I like pizza”
- “I’m a software engineer”
SHORT_TERM
Temporary states and current activitiesExamples:
- “Currently working on auth feature”
- “Right now debugging a bug”
- “Need to finish this today”
- “In a meeting”
EPISODIC
Past events with time contextExamples:
- “Yesterday I had a meeting”
- “Last week I deployed v2”
- “Met John at conference”
- “Fixed the bug on Monday”
SEMANTIC
General knowledge and factsExamples:
- “Python uses indentation”
- “Capital of France is Paris”
- “React is a JS library”
- “HTTP 404 means Not Found”
PROCEDURAL
How-to knowledge and processesExamples:
- “To deploy, run npm build”
- “First boil water, then add pasta”
- “Steps to create PR: commit, push, open PR”
Classification System
LLM-Based Classifier:API Endpoints
The Memory API exposes RESTful endpoints:Add Memory
Search Memories
Get All Memories
Add Image Memory
Update Memory
Delete Memory
Memory History
Integration with Tabby
Automatic Context Capture
Tabby automatically captures context and stores it as memories: 1. Periodic Screenshots (Interview Mode):Memory Retrieval in AI Context
Enhancing AI Responses with Memories:Brain Panel UI
The Brain Panel (Ctrl+Shift+B) provides a visual interface for memory management:

- Memory List
- Knowledge Graph
- Image Uploads
- Statistics
- View all memories by type (LONG_TERM, SHORT_TERM, etc.)
- Search and filter memories
- Edit or delete individual memories
- See memory scores and relevance
Performance Optimization
Memory Search Caching
Batching Memory Additions
Privacy & Data Control
User Data Isolation:- Every memory tagged with
user_id - Queries filtered by
user_id(no cross-user leakage) - Users can delete all their memories via UI
Advanced Features
Memory Deduplication
Mem0 automatically deduplicates similar memories:Memory Versioning
Every memory update is tracked:Cross-Session Context
Memories persist across:- App restarts
- Different windows (Action Menu, Brain Panel, etc.)
- Different features (Chat, Interview Copilot, Suggestions)
Troubleshooting
Memory API not starting
Memory API not starting
Check:
- Python 3.12+ installed
uv syncran successfully.envfile hasSUPABASE_CONNECTION_STRING- Supabase is running (
npx supabase status)
Memories not being retrieved
Memories not being retrieved
Check:
- User ID is consistent across requests
- Vector embeddings are being generated (check Supabase)
- HNSW index is created on
embeddingcolumn
Neo4j not showing relationships
Neo4j not showing relationships
Check:
- Neo4j credentials in
.envare correct - Neo4j instance is running and accessible
- Graph store is enabled in Mem0 config
Next Steps
System Architecture
See how memory fits into the overall system
Technology Stack
Learn about Mem0 and other technologies used