I Built Self-Evolving Claude Code Memory w/ Karpathy’s LLM Knowledge Bases

I Built Self-Evolving Claude Code Memory w/ Karpathy’s LLM Knowledge Bases

More

Descriptions:

Cole Medin walks through the design and implementation of a self-evolving memory system for Claude Code, directly inspired by a widely circulated post from Andrej Karpathy outlining his approach to building LLM-powered personal knowledge bases. Where Karpathy’s architecture focuses on ingesting and organizing external information — articles, papers, and research notes — Medin adapts the same compiler analogy to a different problem: giving a coding agent persistent, growing memory about its own codebase and past decisions.

The system captures Claude Code session logs automatically via hooks, then uses the Claude Agent SDK in the background to extract and structure that raw conversation data into cross-referenced knowledge articles stored in Obsidian. The resulting graph of linked markdown documents mirrors Karpathy’s compiled wiki stage, enabling the agent to traverse back-links and surface relevant past context when working on related problems. Over time, the agent accumulates institutional memory about architectural decisions, bug fixes, and project evolution — without requiring manual documentation.

The entire setup is distributed as a single prompt that one-shots the clone, configuration, and hook installation in Claude Code. Medin contrasts this approach with existing Claude memory solutions, arguing that strictly following Karpathy’s indexing and graph-traversal optimizations produces a simpler and more effective result for the internal-data use case. The video also covers the structural parallels between source code compilation and knowledge compilation, and discusses how the Obsidian graph view enables richer agent queries across connected concepts.


📺 Source: Cole Medin · Published April 06, 2026
🏷️ Format: Hands On Build

1 Item

Channels

2 Items

People