whatisgithub

What is neural_mesh?

basednukem/neural_mesh — explained in plain English

Analysis updated 2026-05-18

0PythonAudience · developerComplexity · 4/5Setup · easy

In one sentence

A self-organizing memory system for AI agents that separates memory types, forgets outdated facts, and avoids returning stale information.

Mindmap

mindmap
  root((NEURAL_MESH))
    What it does
      Typed agent memory
      Resonance retrieval
      Forgets stale facts
    Tech stack
      Python
      SQLite
      fastembed
    Use cases
      Avoid stale agent memory
      Reduce context bloat
      Benchmark retrieval quality
    Audience
      AI agent developers
      Researchers

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Give an AI agent a memory system that avoids acting on outdated, superseded facts.

USE CASE 2

Separate an agent's facts, events, procedures, and future intentions into distinct memory types.

USE CASE 3

Reduce context window bloat by storing large tool output externally with lightweight pointers.

USE CASE 4

Benchmark memory retrieval quality against plain vector search on your own data.

What is it built with?

PythonSQLitefastembed

How does it compare?

basednukem/neural_mesh0xallam/my-recipe0xhassaan/nn-from-scratch
Stars00
LanguagePythonPythonPython
Last pushed2022-11-22
MaintenanceDormant
Setup difficultyeasymoderatemoderate
Complexity4/52/54/5
Audiencedevelopergeneraldeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 5min

Core demo needs no dependencies, real embeddings require an optional fastembed install.

So what is it?

NEURAL_MESH is a memory system built for AI agents, designed to replace the common approach of dumping everything an agent has learned into one flat, ever growing text file. The README argues that flat memory files cause real problems in production: they become too large for the context window, they mix different kinds of information together so that a one-time event and a stable fact get treated the same way, and outdated facts stick around alongside their updated versions, which can cause an agent to act on stale information. NEURAL_MESH addresses this by separating memory into five distinct types, including facts, one-time events, step-by-step procedures, sensory details, and future intentions, so a search for one kind does not get diluted by another. Instead of storing memories as a simple list, each piece of memory automatically links to related pieces, forming a graph rather than a flat file. When the agent asks a question, the system does not just return the single closest match, it spreads activation across linked memories and returns a related cluster, which the README calls resonance retrieval. Memories are also split into a short-term hot lane and a longer-term cold lane, with a sleep cycle that periodically strengthens useful memories and prunes weak or outdated ones. When a fact changes, the new version marks the old one as superseded, so future searches only surface the current, correct information instead of both old and new answers at once. For large tool outputs, the system stores the content externally and gives the agent a small pointer instead of the full text, keeping the context window from filling up with things like long log dumps. Installing it requires only cloning the repository and running a demo script using Python's standard library, with an optional add-on for real embeddings. The README includes benchmark comparisons against plain vector similarity search, the kind used by tools like Mem0, on the same underlying embeddings. The headline result claims that when facts get updated, plain vector search returned the outdated version most of the time, while NEURAL_MESH consistently returned the current, correct fact. On simpler recall tasks without conflicting information, both approaches performed similarly, which the README reports honestly as a tie rather than overstating the difference.

Copy-paste prompts

Prompt 1
Help me install NEURAL_MESH and run its demo using only Python's standard library.
Prompt 2
Explain how NEURAL_MESH's supersedes mechanism prevents an agent from returning outdated facts.
Prompt 3
Show me how resonance retrieval differs from plain cosine similarity search in NEURAL_MESH.
Prompt 4
Walk me through NEURAL_MESH's hot and cold lane sleep cycle and how pruning works.

Frequently asked questions

What is neural_mesh?

A self-organizing memory system for AI agents that separates memory types, forgets outdated facts, and avoids returning stale information.

What language is neural_mesh written in?

Mainly Python. The stack also includes Python, SQLite, fastembed.

How hard is neural_mesh to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is neural_mesh for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.