Skip to main content
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 Pierpont

What 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)
This seems like a lot, but it fills up fast. And once the conversation ends, it’s gone. The AI has no way to access previous conversations.

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
Hyperthyme takes a different approach: store everything, organize it well, and retrieve only what’s needed.

How Hyperthyme Works: The Big Picture

The middleware sits between the user and the AI. It:
  1. Logs every conversation as it happens
  2. Retrieves relevant past information when needed
  3. 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
What’s inside a Recall File?
File Breakdown: Naming Convention:
Examples:
  • 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
Example Structure:
Why it matters: When the user asks about “the memory system,” the Knowledge Graph instantly knows:
  • It’s part of the AI Brain project
  • It relates to Hyperthyme
  • The relevant Recall Files are from January 2025
This narrows the search space from potentially millions of files to just a handful. Technology options:
  • 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:
  1. Convert text into numerical vectors (embeddings)
  2. Store those vectors in a specialized database
  3. Search by finding vectors that are “similar” to a query
How it works in Hyperthyme: The summaries from Recall Files are embedded and stored in a vector database. When the user asks a question, the question is also embedded, and we find summaries that are semantically similar.
Why not just use keyword search? Keyword search finds exact matches. RAG finds semantic matches.
  • 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
Technology options:
  • 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”)
How they’re detected: The system looks for trigger patterns in conversations:
Defining Memory Structure:
Why separate Defining Memories? When someone asks “When did I decide to start this project?” they don’t want to search through 10,000 conversations. They want to hit the Defining Memory index and get an instant answer. Defining Memories are always “warm”—always in memory, always fast to access.

The Search Cascade

When the user asks something that requires memory, the system searches in layers:
This cascade is fast because each step narrows the search space:
  • 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
Warming Process: When the user starts discussing a topic, the system “warms” related memories:
This is predictive retrieval—if you’re asking about the AI Brain project, you’ll probably ask more AI Brain questions, so we prepare.

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:
Now any MCP-compatible AI can access Hyperthyme memory directly.

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 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:
  1. Recall Files — Complete conversation snapshots with summaries, keywords, transcripts, and artifacts
  2. Knowledge Graph — Relationship map between topics for fast navigation
  3. RAG Database — Semantic search over summaries
  4. Defining Memories — Index of major decisions and milestones
  5. Middleware — Model-agnostic layer that handles logging and retrieval
The system uses a search cascade (Graph → Keywords → RAG → Transcript) to efficiently find relevant memories, and a tiered storage system (Hot → Warm → Cold) to balance speed and cost. Start simple. Build the Recall File system first. Add intelligence layer by layer.
Neurigraph Hyperthyme Artificial Memory Framework
By Oxford Pierpont