Back to Videos

Building a Second Brain for AI Agents with the Open Knowledge Format (OKF)

YouTube

This video introduces the Open Knowledge Format (OKF), a universal standard designed to structure information so that AI agents and second brains can effectively process and reason over it. Developed as an evolution of Andrej Karpathy's LLM Wiki concept, OKF provides a vendor neutral and human friendly framework for representing metadata, context, and curated content. The creator, Cole Medin, demonstrates the power of this format by showcasing a comprehensive knowledge base he built for his entire YouTube channel, consisting of over two hundred videos. This implementation allows AI coding agents like Claude Code to answer complex questions about his content with high precision and direct citations to specific video timestamps. The video dives deep into the technical architecture of an OKF bundle, which relies on a simple yet effective file system structure. Key components include an index for navigation, a schema for defining rules, and dedicated directories for raw transcripts, source mappings, core concepts, and entities like tools or organizations. Medin explains the critical process of canonicalization, where an LLM is used to synthesize information from multiple sources, merge duplicate topics, and create consolidated documents that serve as a source of truth for the agent. This approach moves beyond traditional vector based RAG by providing a structured, interconnected graph of knowledge that is much easier for advanced models to navigate. Finally, the video provides practical tools for viewers to build their own knowledge bases from any YouTube channel. Medin shares specific scripts and skills that automate the extraction of transcripts and the subsequent synthesis into the OKF format. By using various APIs such as yt-dlp or the Superdata API, developers can transform massive amounts of video data into a portable and searchable markdown repository. This workflow empowers users to create their own custom research assistants or organizational wikis that are fully optimized for the next generation of agentic AI systems.

Visual Summary

Infographic visualizing Building a Second Brain for AI Agents with the Open Knowledge Format (OKF)

The Open Knowledge Format (OKF): Building a Second Brain for AI Agents

This video covers the Open Knowledge Format (OKF), which is a vendor neutral specification for representing knowledge in a structured, markdown based way that AI agents can easily navigate and reason over. The format serves as a critical standard for the agent to knowledge base interface, allowing developers to create portable, human readable repositories of information that act as a high performance second brain for modern language models. By using OKF, you can transform massive datasets, such as an entire YouTube channel catalog, into a densely cross linked knowledge graph that provides precise answers and citations.

Key Takeaways

  • OKF is an open, human and agent friendly format for representing metadata, context, and curated content.
  • It acts as the standard for agent to knowledge base communication, similar to how MCP works for tools.
  • The structure is entirely markdown based, making it portable, version controllable via Git, and easy to read without specialized software.
  • A core part of the process is canonicalization, which involves merging duplicate ideas from different sources into single, authoritative concept files.
  • Tools and scripts are available to automate the creation of these knowledge bases from sources like YouTube channels using transcripts and LLM synthesis.

Understanding the Open Knowledge Format (OKF)

The Open Knowledge Format, or OKF, represents a significant step forward in how we prepare data for AI consumption. While traditional Retrieval Augmented Generation (RAG) often relies on chunking text and using vector similarity, OKF focuses on structure and relationship. It is built on the principles of the LLM Wiki, an idea popularized by Andrej Karpathy, which suggests that AI agents perform better when they have access to a well organized, interconnected web of information. OKF provides the formal specification for this idea, ensuring that different agents can consume the same knowledge bundle without needing custom integration code.

At its heart, OKF is designed to be low overhead. It requires no complex database, no specific runtime, and no proprietary software. It is essentially a directory of markdown files with YAML frontmatter. This simplicity is its greatest strength, as it allows the knowledge to be indexed by search engines, hosted on GitHub, and easily edited by humans. For an AI agent, this structure provides a clear map of the available information, allowing it to move from a high level index to specific concept pages and finally to raw source material with extreme efficiency.

The Architecture of an OKF Bundle

A valid OKF knowledge base follows a specific file structure that helps the agent understand the scope and depth of the information provided. The entry point is usually the index.md file, which acts as the table of contents. This file includes themes and high level categories that guide the agent to the right section of the knowledge base. Alongside the index is a schema.md file, which defines the different types of pages, frontmatter requirements, and linking rules that the bundle follows.

Inside the bundle, information is categorized into several key folders. The concepts folder contains pages for individual ideas, techniques, or mental models, while the entities folder stores information about people, tools, organizations, and projects. To ensure transparency, the raw folder contains the original source material, such as timestamped transcripts, and the sources folder contains summaries of individual videos or documents. This multi layered approach allows the agent to provide a high level summary while always having the ability to drill down into the raw data for verification and citation.

The Canonicalization Pipeline

One of the most important concepts discussed in the video is the process of canonicalization. When dealing with a large dataset, such as hundreds of YouTube videos, the same idea often appears multiple times under slightly different names. For example, a creator might refer to a specific workflow as the PIV Loop in one video and the Plan Implement Validate process in another. If these were kept as separate entries, the AI agent would have a fragmented understanding of the topic.

Canonicalization uses an LLM to look at all extracted concepts and entities from the raw transcripts and merge them into single, consolidated files. This step ensures that the knowledge base remains dense and actionable rather than bloated with redundant information. The result is a synthesis of knowledge where every concept file represents the best, most comprehensive explanation of that idea, complete with links back to every original source where it was mentioned. This synthesis is what allows an agent to provide expert level answers that reflect the entirety of a creator's work.

Practical Applications

Viewers can apply the lessons from this video to a wide range of personal and professional projects. Developers can use the provided scripts to build custom AI assistants for their favorite educational YouTube channels, allowing them to query years of content in seconds. This is particularly useful for learning complex technical subjects where information is spread across many different videos.

Beyond video, the OKF format is an excellent choice for organizing internal company documentation or personal research notes. By structuring information into concepts and entities with clear relationships, you create a dataset that is significantly more useful for AI reasoning than a simple folder of PDFs or Word documents. As agentic AI becomes more common, having your data in an agent ready format like OKF will be a major competitive advantage for both individuals and organizations.

Frequently Asked Questions

What is the main difference between OKF and traditional RAG?

Traditional RAG usually involves breaking documents into random chunks and using vector math to find related snippets at query time. OKF is a proactive approach where the data is pre structured into a meaningful graph of concepts and entities. This allows the agent to understand the context and relationships between ideas much better than simple keyword or vector matching, leading to more accurate and cited answers.

Do I need a special database to use the Open Knowledge Format?

No, you do not need a database. OKF is designed to be a local, file based system consisting of standard markdown files and folders. This makes it incredibly portable and allows it to be versioned with Git. While you can index these files into a search system for faster retrieval, the format itself is independent of any specific database technology.

How does an AI agent know how to read an OKF bundle?

An agent is typically given a specific prompt or skill that explains the OKF structure. By pointing the agent to the index.md and schema.md files, it can learn how to navigate the folders and understand the relationship between concepts and raw sources. Because the format is standardized, once an agent is taught how to handle OKF, it can work with any knowledge base built to that specification.

Diagram

Loading diagram...

Timestamps

00:00
Introduction to OKFExplaining the Open Knowledge Format as a new standard for AI knowledge bases.
01:14
Demo with Claude CodeShowcasing how an AI agent uses the OKF knowledge base to answer complex questions.
03:26
Internal Structure of OKFDeep dive into the folder and file architecture of a knowledge bundle.
04:54
Graph VisualizationViewing the knowledge base as an interconnected graph within Obsidian.
07:37
The Build PipelineStep by step explanation of the process to turn videos into structured knowledge.
11:58
Building Your Own SkillsOverview of tools and scripts to replicate this for any YouTube channel.

Target Audience

Developers, AI researchers, and knowledge management enthusiasts who want to build structured, AI-consumable datasets from unstructured sources like video or text.

Use Cases

  • -Building a searchable AI assistant for a large YouTube video catalog
  • -Creating an interconnected technical documentation wiki for enterprise AI agents
  • -Structuring personal research notes into a portable format for agentic reasoning
  • -Automating the synthesis of many hours of meeting recordings into a structured knowledge graph
  • -Developing a vendor-neutral second brain that works across different AI models and frameworks

Key Topics

The Open Knowledge Format (OKF) SpecificationArchitecture of AI-Ready Knowledge BasesAutomated Content Synthesis and CanonicalizationIntegrating Second Brains with AI Coding Agents