Skip to content
Back to projects
AI Research · 2026 ·Creator · In progress

CORTEX

A biologically-inspired AI cognitive architecture that wraps local LLMs in a prediction-error loop — giving an agent hierarchical memory, a self-trained world model, curiosity-driven exploration, and an emotional state that tunes its own behavior.

C

Overview

CORTEX is my attempt to build an AI agent that works a little more like a brain and a little less like a chatbot. Instead of treating a language model as the whole mind, it treats the LLM as one component inside a larger cognitive loop built around prediction error — the idea that intelligence is largely about predicting what comes next and learning from the surprise when you’re wrong.

What’s inside

  • Four-tier memory — a reactive in-memory cache, a short-lived working memory, an episodic store (SQLite), and a semantic knowledge graph — unified behind a single interface.
  • A self-trained world model — a GRU network that continuously learns to predict the next semantic embedding. Familiar inputs are served from memory; genuinely novel ones bypass the cache and hit the LLM.
  • Curiosity & emotion — a five-dimensional emotional state dynamically modulates the model’s temperature, and a “dream” mode lets the agent surface its own questions when idle.

Status

Active research and easily my most ambitious personal project — there’s an accompanying architecture whitepaper. It runs entirely on local models (Ollama), so the whole loop stays private and offline.

Built with Python PyTorch Ollama FastAPI ChromaDB NetworkX
Next project Game Studio