Inspiration

Most AI assistants are great at answering questions, but they often treat every conversation as if it starts from zero. We wanted to explore a different idea:

What if an AI could decide what is actually worth remembering?

The inspiration for NeuroMemory came from the way human memory works. We don't consciously preserve every sentence we hear. Some information stays active for a while, some experiences become long-term memories, some are abstracted into general knowledge, and some eventually fade into the background.

We wanted to experiment with bringing a similar concept into an AI system.

NeuroMemory is our attempt to build an autonomous cognitive memory layer where information can move through different memory stages based on its relevance, repetition, and significance.


What it does

NeuroMemory is an AI assistant with a multi-stage cognitive memory architecture.

Instead of simply attaching an entire conversation history to every request, NeuroMemory organizes information into different memory layers:

  • 🧠 Working Memory — stores recent conversation turns and active context.
  • ⚡ Episodic Memory — preserves meaningful interaction events and experiences.
  • 💎 Semantic Memory — extracts recurring or important information into more reusable knowledge.
  • 🗄️ Archived Vault — moves low-significance or older information into cold storage.

The system also uses a significance score to determine which memories deserve promotion.

A simplified version of the scoring model is:

$$ S = B + 0.5R + 0.3T + 0.2M $$

where:

  • $B$ = base importance of the event
  • $R$ = repetition or struggle signal
  • $T$ = topic recurrence
  • $M$ = explicit "remember this" signal

Memories can then be promoted when they repeatedly appear or reach a sufficient significance threshold.

The application provides a visual interface where we can inspect the memory layers, chat with the assistant, and observe how information moves through the cognitive memory pipeline.


How we built it

We built NeuroMemory as a full-stack web application using Next.js and a PostgreSQL-compatible CockroachDB database.

The main architecture consists of several components:

1. Conversation Layer

The user interacts with NeuroMemory through a chat interface.

Each interaction is recorded as a structured turn containing information such as the session, user message, assistant response, timestamp, and memory classification.

2. Working Memory

New conversation turns initially enter Working Memory.

This acts as the AI's active context buffer, containing the most recent interactions needed to maintain a coherent conversation.

3. Memory Evaluation

When information enters the system, NeuroMemory evaluates its potential importance using signals such as repetition, topic recurrence, event type, and explicit requests to remember something.

This produces a significance score that can be used by the memory promotion system.

4. Episodic Memory

Important interaction events can be represented as episodic memories.

These represent experiences rather than just isolated facts — for example, an important conversation, a repeated topic, or a meaningful interaction pattern.

We also designed the architecture to support vector-based similarity search so that relevant past experiences can be retrieved using semantic similarity rather than only exact keyword matching.

5. Semantic Memory

When information becomes sufficiently reinforced or significant, it can be promoted into Semantic Memory.

The goal of this layer is to transform repeated experiences into more reusable concepts.

For example, instead of remembering every individual conversation about a topic, the system can eventually maintain a consolidated concept representing what has been learned from those interactions.

6. Cold Storage

Not every memory should remain in active storage forever.

Older or low-significance memories can eventually be moved into an archival layer, represented by an S3-based cold-storage concept in the architecture.

This gives NeuroMemory a complete lifecycle:

Interaction → Working Memory → Episodic Memory → Semantic Memory → Archive

7. AI Layer

We connected the memory system to a generative AI model so that retrieved memories can be included as contextual information when generating responses.

The result is an assistant that can respond using both the current conversation and information retrieved from its memory system.

8. Visualization

We also built a dashboard-style interface to make the architecture observable.

Instead of hiding the memory system behind an API, the application exposes:

  • Live Chat
  • Working Memory
  • Reflection/Episodic Memory
  • Semantic Memory
  • Sleep Cycle
  • Timeline & Debugging
  • Memory progression and promotion information

This makes it possible to actually see how the cognitive memory architecture behaves.


Challenges we ran into

The biggest challenge was making the memory system work as an actual pipeline rather than simply storing chat history.

We had to think about several questions:

What should the AI remember?

If everything is stored equally, the memory quickly becomes noisy and inefficient. We therefore needed significance and promotion rules.

When should a memory be promoted?

A single statement shouldn't necessarily become permanent knowledge. We experimented with signals such as repetition, topic recurrence, and explicit memory requests.

How should memories be retrieved?

Exact text matching isn't enough for meaningful conversational recall. This led us toward vector embeddings and similarity-based retrieval.

How do we keep the architecture observable?

Memory systems can become difficult to debug because information moves between multiple layers. We therefore built visualization and timeline components to make the internal state easier to inspect.

We also encountered real deployment issues while connecting Prisma, CockroachDB, environment variables, and Vercel. Debugging production database configuration was an important part of getting the system running reliably.


Accomplishments that we're proud of

We're proud that NeuroMemory is more than a chatbot with a larger context window.

We built an interactive prototype that demonstrates the idea of memory as a lifecycle.

Some things we're particularly proud of:

  • 🧠 A multi-stage cognitive memory architecture
  • 🔄 Automatic memory progression concepts
  • 📊 A visual memory timeline and debugging interface
  • 🔎 Vector-based semantic retrieval
  • 💾 Persistent memory using CockroachDB
  • ☁️ Cloud deployment through Vercel
  • 🤖 Integration with a generative AI model
  • 🗄️ A designed cold-storage/archival layer
  • 💬 A conversational interface that can actually demonstrate memory recall

Most importantly, we can interact with the system and watch it use information from previous interactions instead of treating every message as completely isolated.


What we learned

Building NeuroMemory taught us that adding "memory" to an AI isn't simply a matter of saving conversations in a database.

The difficult part is deciding:

what deserves to be remembered, when it should be remembered, how it should be represented, and when it should be forgotten or archived.

We learned about database design, Prisma, CockroachDB, vector embeddings, semantic retrieval, AI prompting, Next.js API routes, deployment, and production debugging.

We also learned an important architectural lesson:

A useful memory system needs both storage and intelligence.

A database can store everything, but a cognitive memory system needs mechanisms for deciding what information is actually valuable.


What's next for NeuroMemory

NeuroMemory is currently a working prototype, but there is a lot more we want to explore.

Our next steps include:

  • Improving automatic memory promotion
  • Making episodic and semantic memory retrieval more reliable
  • Adding stronger vector-based ranking
  • Experimenting with memory decay and reinforcement
  • Improving the sleep-cycle consolidation process
  • Adding more intelligent conflict resolution when memories disagree
  • Expanding the archival system with real cloud object storage
  • Adding better memory inspection and debugging tools
  • Evaluating the system with longer-running conversations and multiple sessions

Ultimately, we want NeuroMemory to become more than an AI that simply remembers conversations.

We want to explore an AI that can gradually learn what is worth remembering.

Built With

Share this project:

Updates

Submission history