<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/i-built-self-evolving-claude-code-memory-w-karpathy-s-llm-knowledge-bases-zqyliiqdd" -->

---
title: I Built Self-Evolving Claude Code Memory w/ Karpathy's...
description: A developer builds a self-evolving memory system for Claude Code inspired by Andrej Karpathy's LLM knowledge base architecture. Using Claude Code hooks...
canonical: https://daily.dev/posts/i-built-self-evolving-claude-code-memory-w-karpathy-s-llm-knowledge-bases-zqyliiqdd
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: I Built Self-Evolving Claude Code Memory w/ Karpathy's LLM Knowledge Bases | daily.dev
og:description: A developer builds a self-evolving memory system for Claude Code inspired by Andrej Karpathy's LLM knowledge base architecture. Using Claude Code hooks...
og:url: https://daily.dev/posts/i-built-self-evolving-claude-code-memory-w-karpathy-s-llm-knowledge-bases-zqyliiqdd
og:image: https://api.daily.dev/og/posts/ZQyLiiqdd.png
og:image:alt: I Built Self-Evolving Claude Code Memory w/ Karpathy's LLM Knowledge Bases
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

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

**[YouTube](https://daily.dev/sources/youtube)** · 19 min read · 0 upvotes · 0 comments

## Summary

A developer builds a self-evolving memory system for Claude Code inspired by Andrej Karpathy's LLM knowledge base architecture. Using Claude Code hooks (session start, pre-compact, session end), the system automatically captures conversation logs, summarizes them via the Claude Agent SDK, and promotes them into a structured wiki with concepts, connections, and an index file — all stored in an Obsidian vault. Unlike Karpathy's external data ingestion approach, this system works with internal codebase conversations, creating a compounding knowledge loop where the agent gets progressively better answers over time without manual maintenance. No vector database or RAG is needed; the agent navigates markdown files using an auto-maintained index.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.youtube.com/watch?v=7huCP6RkcY4>

## Similar posts on daily.dev

- [How to Build a Claude Code-Powered Knowledge Base](https://daily.dev/posts/how-to-build-a-claude-code-powered-knowledge-base-upwgnk51p) · Towards Data Science · 1 upvotes · 0 comments
- [I gave Claude Code memory between sessions, and my setup started running itself](https://daily.dev/posts/i-gave-claude-code-memory-between-sessions-and-my-setup-started-running-itself-55iakitq2) · XDA Developers · 0 upvotes · 0 comments
- [Giving Claude Code A Persistent Memory](https://daily.dev/posts/giving-claude-code-a-persistent-memory-4eotkkosw) · Viget · 10 upvotes · 1 comments

---

Tags: [#ai-agents](https://daily.dev/tags/ai-agents), [#claude-code](https://daily.dev/tags/claude-code)

[View this post on daily.dev](https://daily.dev/posts/i-built-self-evolving-claude-code-memory-w-karpathy-s-llm-knowledge-bases-zqyliiqdd)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"I Built Self-Evolving Claude Code Memory w/ Karpathy's LLM Knowledge Bases","url":"https://daily.dev/posts/i-built-self-evolving-claude-code-memory-w-karpathy-s-llm-knowledge-bases-zqyliiqdd","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/i-built-self-evolving-claude-code-memory-w-karpathy-s-llm-knowledge-bases-zqyliiqdd"},"datePublished":"2026-04-10T05:34:03.852Z","dateModified":"2026-04-10T05:34:24.996Z","description":"A developer builds a self-evolving memory system for Claude Code inspired by Andrej Karpathy's LLM knowledge base architecture. Using Claude Code hooks...","image":"https://i.ytimg.com/vi/7huCP6RkcY4/sddefault.jpg","thumbnailUrl":"https://i.ytimg.com/vi/7huCP6RkcY4/sddefault.jpg","isAccessibleForFree":true,"articleSection":"YouTube","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"YouTube","logo":"https://media.daily.dev/image/upload/s--W5zMumpP--/f_auto/v1725350181/logos/youtube","url":"https://daily.dev/sources/youtube"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/i-built-self-evolving-claude-code-memory-w-karpathy-s-llm-knowledge-bases-zqyliiqdd","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"ai-agents,claude-code","timeRequired":"PT19M","video":{"@type":"VideoObject","name":"I Built Self-Evolving Claude Code Memory w/ Karpathy's LLM Knowledge Bases","description":"A developer builds a self-evolving memory system for Claude Code inspired by Andrej Karpathy's LLM knowledge base architecture. Using Claude Code hooks...","thumbnailUrl":"https://i.ytimg.com/vi/7huCP6RkcY4/sddefault.jpg","uploadDate":"2026-04-10T05:34:03.852Z","duration":"PT19M","url":"https://api.daily.dev/r/ZQyLiiqdd","embedUrl":"https://www.youtube.com/embed/7huCP6RkcY4"}}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"YouTube","item":"https://daily.dev/sources/youtube"},{"@type":"ListItem","position":3,"name":"I Built Self-Evolving Claude Code Memory w/ Karpathy's LLM Knowledge Bases"}]}
```

