✅ IMPLEMENTED — v1.0

The Neocortex Format

Long-Term Memory for AI Agents

A schema-organized, biologically-inspired memory format that any agent can read, write, and share. Plain text. Human-readable. LLM-parseable.

By Roman Godz & R2D2

Every Agent Reinvents Memory

There is no standard, no interoperability, and no theory behind the design of AI agent long-term memory.

🗄️

Proprietary Silos

Mem0 uses proprietary JSON. MemGPT stores memory blocks. OpenAI's memory is opaque. Memory created in one system stays locked in that system. No portability, no interoperability.

📝

Unstructured Chaos

Most agents use unstructured markdown that grows until it's unusable. By entry 200, it's a haystack with no needles — or all needles and no way to find the right one.

🧠

No Theory Behind Design

Every developer invents their own format from scratch. No biological grounding, no consolidation rules, no pruning strategy. Just 'however the developer felt like.'

SystemFormatPortable?Standard?
Mem0Proprietary JSON + graphWithin Mem0No
MemGPT / LettaMemory blocks (JSON)Within LettaNo
OpenAI MemoryInternal, opaqueNoNo
Claude ProjectsPer-project contextNoNo
Custom agentsWhatever markdownTechnicallyNo

How It Works

A self-describing header, seven standard sections mirroring cortical specialization, and gist-extracted entries optimized for token efficiency.

🧠
Identity
👥
People
📋
Projects
📚
Knowledge
🔁
Patterns
💡
Lessons
📍
Context
MEMORY.md — neocortex.md v1.0 format
<!-- neocortex.md v1.0 -->
<!-- agent: atlas -->
<!-- owner: Jane Chen -->
<!-- consolidated: 2026-01-31 -->
<!-- entries: 187 | tokens: ~9,400 -->

# Memory

## Identity
- Name: Atlas | Role: Engineering assistant
- Style: Precise, thorough, prefers concise answers

## People
- Jane: Owner. Seattle. Prefers Slack over email.

## Projects
- Acme API: REST platform. Next.js + Postgres + Redis.

## Knowledge
- OAuth2 + PKCE for all SPAs. Tokens expire in 1h.

## Patterns
- Jane prefers dark theme, monospace fonts in docs

## Lessons
- ALWAYS write to files, not "mental notes" — they don't survive

## Context
- Current focus: API v2 migration (Jan-Feb 2026)

Key Features

🏛️

Schema-Organized

5–8 domain sections mirroring cortical specialization. Not one flat list — modular regions like the brain itself. Each section handles a knowledge domain.

🎯

Gist Over Verbatim

Store meaning, not exact words. 50 tokens average per entry instead of 55-line conversation excerpts. 36× compression over raw logs.

📊

Metadata Tracking

HTML comment metadata tracks last update, confidence, access count, and source. Enables intelligent pruning decisions without cluttering the readable text.

🔄

Consolidation Rules

Entries transform over time: detailed → compressed → gist. Daily light cycles, weekly deep merges, monthly full audits. Like sleep consolidation.

✂️

Pruning & Size Constraints

10K-token target with per-section limits. Retention scoring based on access frequency, recency, and confidence. Forgetting is a feature, not a bug.

Contradiction Handling

Supersession format with strikethrough history. Prediction errors are learning signals. Higher-confidence info wins. Full provenance preserved.

Brain Mapping

Each section maps to a brain region that specializes in that type of knowledge. This isn't arbitrary — it's 200 million years of mammalian evolution.

IdentityVery High
Prefrontal Cortex

Self-model, values, communication style

PeopleHigh
Fusiform Face Area

Key individuals, relationships, preferences

ProjectsMedium
Motor/Planning Cortex

Active work, decisions, architecture

KnowledgeMedium
Association Cortex

Technical skills, domain expertise, APIs

PatternsMed-High
Basal Ganglia

User preferences, routines, workflows

LessonsHigh
Error-Correction Circuits

Mistakes, insights, anti-patterns

ContextLow
Temporal/Spatial Cortex

Time-sensitive info, current priorities

Real Benchmarks

Measured on a production agent over 30 days.

36×
Compression
vs raw conversation logs
94%
Retrieval Accuracy
47/50 queries correct
$0.34
Monthly Cost
consolidation + maintenance
42
Live Entries
first production migration
3.2K
Tokens
complete memory file
ApproachSizeEntriesAccuracy
Raw conversation logs~340K tokensN/A76%
Unstructured MEMORY.md~18K tokens~24086%
neocortex.md format ✦~9.4K tokens~18794%

The file is MEMORY.md.
The format is neocortex.md.

neocortex.md is a format specification, not a filename. Just as an HTML5 document lives in a .html file, a neocortex.md-formatted memory lives in MEMORY.md. The format identifier in the header tells any reader what standard the file follows.

Adoption is frictionless: restructure your existing MEMORY.md, add the header, and you're done. No migration tooling, no config changes, no broken references.

Brain Architecture

neocortex.md is one component of a biologically-inspired agent workspace. Each protocol handles one function. Together, they form a complete memory system.

🧠
Neocortex
Long-term storage
neocortex.md
MEMORY.md
🗂️
Hippocampus
Memory indexing
hippocampus.md
HIPPOCAMPUS.md
😴
Sleep System
Consolidation rules
defrag.md
DEFRAG.md
🔗
Corpus Callosum
Inter-agent sharing
synapse.md
synapse.md

Neocortex stores what the agent knows. Hippocampus indexes where memories are.
Defrag defines when to consolidate. Synapse shares knowledge between agents.

Get Started

Create a MEMORY.md with the neocortex.md format. No infrastructure, no dependencies. A text editor and a convention.

MEMORY.md — minimal template
<!-- neocortex.md v1.0 -->
<!-- agent: my-agent -->
<!-- consolidated: 2026-01-31 -->
<!-- entries: 0 | tokens: ~500 -->

# Memory

## Identity
- Name: {agent_name} | Role: {role}
- Owner: {owner_name} | Timezone: {tz}
- Style: {communication style}

## People
- {Person}: {role}. {key facts}.

## Projects
- {Project}: {status}. {key architecture}.

## Knowledge
- {Fact}: {compressed knowledge}.

## Patterns
- {Pattern}: {observed behavior or preference}.

## Lessons
- {Lesson}: {what happened} → {what to do instead}.

## Context
- {Current situation}: {time-sensitive detail}.

---
<!-- Consolidation rules:
  - Max entries: 300
  - Max tokens: 15,000
  - Prune: accessed=0 AND age>90d
  - Compress: accessed<3 AND age>30d
  - Frequency: daily (light), weekly (deep), monthly (full)
-->