Normalized for Mintlify from
knowledge-base/neurigraph-memory-architecture/hyperthyme-memory-framework/hyperthyme-junior-dev-guide.mdx.Neurigraph Hyperthyme Artificial Memory Framework
Junior Developer Guide
By Oxford PierpontWhat Is Hyperthyme?
Hyperthyme is a memory system for AI. Right now, when you chat with an AI like ChatGPT or Claude, it forgets everything once the conversation ends. Hyperthyme solves this by creating a persistent memory layer that stores, organizes, and retrieves past conversations so the AI can “remember” what you’ve discussed—even months or years later. Think of it like this: the AI is the brain, and Hyperthyme is the long-term memory that the brain can access whenever it needs to recall something. The name comes from “hyperthymesia”—a rare condition where people remember every single day of their lives in perfect detail. We’re building that capability for AI.The Problem We’re Solving
Context Windows
Every AI model has a “context window”—the amount of text it can see at once. For example:- GPT-4 can see about 128,000 tokens (~100,000 words)
- Claude can see about 200,000 tokens (~150,000 words)
Current Solutions Are Incomplete
Some companies offer basic memory features, but they typically:- Only store summaries (losing important details)
- Compress information (losing exact wording, code, files)
- Don’t scale to thousands of conversations
- Don’t organize information intelligently
How Hyperthyme Works: The Big Picture
- Logs every conversation as it happens
- Retrieves relevant past information when needed
- Injects that information into the AI’s context so it can “remember”
Core Components
1. Recall Files
The foundation of the system. A Recall File is a folder that contains a snapshot of a conversation segment. When is a Recall File created? Every ~50,000 tokens (roughly 35,000-40,000 words), the system creates a new Recall File. This threshold is chosen because:- It’s small enough to fit in most AI context windows when retrieved
- It’s large enough that you don’t create thousands of tiny files
- It represents roughly 1-3 substantial conversations
Naming Convention:
funnelchat-stripe-integration-2025-01-03/ai-brain-memory-architecture-2025-01-11/marketing-strategy-q1-planning-2025-01-08/
2. Knowledge Graph
The Knowledge Graph is a database that stores relationships between topics. Think of it as a map of everything the user has discussed. What it stores:- Nodes: Topics, projects, concepts, people, entities
- Edges: Relationships between nodes
- It’s part of the AI Brain project
- It relates to Hyperthyme
- The relevant Recall Files are from January 2025
- Neo4j (most popular graph database)
- Amazon Neptune
- PostgreSQL with graph extensions
- Lightweight: NetworkX (Python library) for prototyping
3. RAG Database (Vector Store)
RAG stands for “Retrieval-Augmented Generation.” It’s a technique where you:- Convert text into numerical vectors (embeddings)
- Store those vectors in a specialized database
- Search by finding vectors that are “similar” to a query
- Keyword search for “payment processing” won’t find a document that only mentions “Stripe integration”
- RAG understands that “payment processing” and “Stripe integration” are related concepts
- Pinecone (managed, easy to start)
- Weaviate (open source)
- Chroma (lightweight, good for prototyping)
- pgvector (PostgreSQL extension)
- Qdrant (open source, performant)
4. Defining Memories
Not all memories are equal. Some conversations are routine; others are significant. Defining Memories are flagged moments that represent:- Decisions (“I’ve decided to focus on the AI marketplace”)
- Milestones (“We launched the beta today”)
- Life events (“I’m starting a new job”)
- Turning points (“This changes everything”)
The Search Cascade
When the user asks something that requires memory, the system searches in layers:- Knowledge Graph: Millions of files → Thousands (scoped to project)
- Keywords: Thousands → Hundreds (exact matches)
- RAG: Hundreds → Tens (semantic relevance)
- Transcript: Load only what’s needed
Storage States: Hot, Warm, Cold
Not all memories need to be instantly accessible. Hyperthyme uses a tiered storage system:Hot (Active)
- Current conversation
- Currently loaded Recall Files
- Uncompressed, in working memory
Warm (Recent)
- Accessed in the last 7 days
- Same project/node as current conversation
- Uncompressed, ready to read
Cold (Long-term)
- Not accessed in 7+ days
- Artifacts are compressed (zipped)
- Keywords and summaries still indexed
- Takes slightly longer to retrieve
Making It Model-Agnostic
Hyperthyme works with any AI model. Here’s how:The Middleware Pattern
Hyperthyme doesn’t modify the AI. It wraps around it:Swapping Models
Because the middleware handles memory separately, you can swap AI models without losing memory:MCP (Model Context Protocol)
MCP is an emerging standard that lets AI models call external tools. Hyperthyme can be exposed as an MCP server:Database Schema (Simplified)
Here’s a starting point for the database design:recall_files
knowledge_graph_nodes
knowledge_graph_edges
recall_file_nodes (junction table)
defining_memories
summary_embeddings
Technology Stack Recommendations
For Prototyping (MVP)
For Production
Getting Started: Your First Task
If you’re building this, here’s what to tackle first:Week 1: Basic Recall File Creation
Week 2: Basic Search
Week 3: RAG Integration
Week 4: Knowledge Graph
Common Pitfalls to Avoid
1. Storing Too Much in Memory
Don’t try to keep all transcripts in RAM. Use the hot/warm/cold system. Only load what’s needed.2. Ignoring Token Limits
When injecting memories into prompts, count tokens. Don’t overflow the AI’s context window.3. Not Handling Multiple Users
Always scope queries by user_id. Never let one user’s memories leak to another.4. Synchronous Everything
Recall File creation, embedding generation, and cold storage compression should be async/background jobs. Don’t block the user.5. No Backup Strategy
Memories are valuable. Implement backups from day one.Summary
Hyperthyme is a memory layer for AI consisting of:- Recall Files — Complete conversation snapshots with summaries, keywords, transcripts, and artifacts
- Knowledge Graph — Relationship map between topics for fast navigation
- RAG Database — Semantic search over summaries
- Defining Memories — Index of major decisions and milestones
- Middleware — Model-agnostic layer that handles logging and retrieval
Neurigraph Hyperthyme Artificial Memory Framework
By Oxford Pierpont