Build Your Own Personal AI Knowledge Base


A personal knowledge base is files with content, organized into folders, tagged, or linked using [[wikilinks]]. A good knowledge base should be in the format that both you and an AI can read. Depending on your needs, you can choose to set it up locally using markdown format (as it is easier to read than PDFs) or in the cloud using a database like Notion or inside InfraNodus graphs.

Organizations usually land on Notion or a custom repository, because they need database queries and collaborative editing. Individuals rarely need either, and end up with Obsidian or plain notes in folders. Interestingly, local setup is more versatile if you want to use the AI, because you can choose the models, the harness, and customize the agents that are going to query your data. The setup below is the second kind; most of it applies to the first.

What follows is the setup we recommend for an AI personal knowledge base, in the order it makes sense to build it: the files, the folder structure, version control, a viewer, and the connection to an LLM. Then the part most guides skip — why a folder tree is not enough structure for a model to reason over, and what to add so it is. This is the storage layer of an AI knowledge base; the other two are covered separately.

1. Get InfraNodus MCP 2. Install the InfraNodus Skill
3. VSCode/ Cursor Graph View Plugin 3. Obsidian Graph View
A personal AI knowledge base of markdown files in Cursor AI with an InfraNodus knowledge graph of its topics
A knowledge base of plain markdown files in Cursor AI, with InfraNodus graph view extension visualizing the topics that formed inside it.

 

What Files and Formats to Use for a Knowledge Base?


Keep PDFs as your raw material when the source matters — papers, reports, scans. But convert anything you want the model to work with often into Markdown. It preserves headings, lists, and links while staying plain text, which makes it far faster for an LLM to read and far easier for you to diff, search, and version.

Markdown is also the format the linking convention runs on. [[wikilinks]] between files let you state a relation directly — this note is about that concept — which adds a network layer of coherence on top of the folder hierarchy. That distinction matters later.

For example, you can have a folder with raw sources (e.g. PDFs in the /raw or /research folder with subfolders identifying different research areas or projects). You can then convert the PDFs into markdown files (using AI-generated PDF to markdown conversion script) and use one of the Claude skills from InfraNodus to create knowledge graph for a specific folder or an LLM wiki layer on top, so it is easier for the model to query this data later.


 

What's the Best Folder Structure for a Knowledge Base?


The main risk here is over-design. A structure with too many levels adds cognitive load at exactly the wrong moment — when you have something to file and have to decide where it belongs. Every second spent on that decision is a reason not to save the thing at all.

Two conventions keep it workable. Add a general Incoming folder, plus an incoming folder inside each category, so anything can be saved in one move. Then sort the incoming folders on a regular schedule and keep them close to empty. The structure emerges from what you actually collect rather than from a taxonomy you guessed at the start.

Keep one vault with everything in it. A single base is where cross-domain connections become visible, and those are the ones worth having. Split into sub-bases only when the domains you work with are genuinely unrelated and the noise starts to outweigh the connections.

knowledge-base/ incoming/ unsorted — cleared on a schedule projects/ incoming/ project-a/ sources/ PDFs and papers kept as they are notes/ your own writing, in markdown infranodus/ ontology files describing the structure

 

Track Changes in a Knowledge Base with Version Control


Running the folder under Git is optional but cheap, and it changes what you can do with the base. You keep local control of how it evolved, you can revert to any previous state, and you can fork it — which is genuinely useful when you want to restructure aggressively or let an AI rewrite a section without risking the original. A private GitHub repository doubles as backup.

It also gives you a record of how your thinking changed, which is a different thing from a record of what you currently think.

To set it up, install Git on your local machine and then use it from Terminal or your IDE of choice (Cursor, VSCode), or Obsidian (via the Terminal plugin).


 

Navigate and Edit a Knowledge Base with a Viewer


You need something to navigate and edit the files with. Four that work, depending on where you want the data to live.

Obsidian — local, reads markdown, and renders [[wikilinks]] as a navigable graph. The most common choice for a personal knowledge base, and the one most graph tooling targets; an Obsidian vault and a personal knowledge base are the same folder.

Cursor or VSCode — an IDE rather than a note app, but it reads markdown and PDFs, handles code and data files properly, and is highly extensible. If your base contains repositories or datasets alongside notes, this is the better fit: Obsidian shows only markdown, formats code poorly, and its AI capabilities are limited. You can add the InfraNodus graph view, run Claude Code in the terminal beside it, and have Cursor's own agent working in parallel.

Notion — cloud, collaborative, with database queries. The usual choice for organizations. You give up local control in exchange for shared editing.

InfraNodus — cloud, with the graph analysis and AI built in, if you would rather not assemble the parts yourself.

In InfraNodus, you can see your knowledge base as a graph of topical clusters or concepts and their relations
In InfraNodus, you can see your knowledge base as a graph of topical clusters or concepts and their relations.

 

Connecting an LLM


If the base is in InfraNodus or Notion, use the built-in AI to query specific documents. If it is a local folder, use Claude Code or OpenAI's Codex — via the terminal or the desktop app.

Both vendors also offer a general co-work chat mode you can point at a folder. Use the code tools instead. They handle multi-file work properly and, more importantly, they support tool use — which is what lets the model call out to graph analysis, search, or anything else you connect later. Starting there costs nothing and avoids a migration.

The minimum viable setup

Source files and notes in a folder structure, a viewer to navigate them, and an LLM pointed at the folder. Git for backup and observability if you want it. Everything after this is about giving the model more structure to reason over.

Tools: Obsidian or Cursor for a local base, Notion or InfraNodus for a cloud one; optionally Git with a private GitHub repository for backup; Claude Code or InfraNodus for querying.

First step: put your source material and notes into one folder and organize them roughly. Do not get precise about the structure yet.


 

Observability: Add a Knowledge Graph to Your Knowledge Base


At this point the knowldege base works. You can find things, and the model can answer questions about them. The limit shows up when you ask for something that isn't already written down somewhere.

A folder tree is a hierarchy: each file has one place, and its relation to everything outside its branch is unrecorded. An AI reading it retrieves the chunks most similar to your query and answers from those (this is referred to as RAG or Retrieval-Augmented Generation). That is fine for lookup and poor for anything requiring several hops across the material — which is where most non-obvious connections live.

[[wikilinks]] are the first correction: they let you curate by hand how notes and ideas relate, one link at a time, adding a rhizomatic layer of coherence that cuts across the branches of the tree. A knowledge graph is the second: the concepts and relations across the whole base are extracted into a network, and network science reads its shape — which concepts hold the material together, which topics have formed, and which pairs of topics are not connected to each other. That last measure is the one you cannot get any other way, because it describes something that isn't in any single file.

Navigating a personal knowledge base as a graph of concepts and backlinks instead of a folder hierarchy
The same knowledge base read as a network rather than a tree.

There are two established ways to add this layer — an LLM wiki, where the model writes interlinked pages summarizing your sources, and a knowledge graph, where the relations are extracted into a traversable network. They combine. The comparison is in RAG vs. LLM wiki vs. knowledge graph, and the assembled workflow in the AI second brain.


 

Keeping It Yours


Everything above is plain files in open formats. Markdown, PDFs, a Git repository, wikilinks — nothing that requires a specific vendor to remain readable, and nothing that has to be exported to be moved. The tools that add the semantic layer are open source, and the ontology files they generate are markdown too.

This is worth being deliberate about. A personal knowledge base is a long-lived object — the value compounds over years — and the failure mode is not losing the files but losing the ability to read them outside the app you built them in. Personal knowledge management tools come and go; markdown in a Git repository does not.


 

Tools



 

FAQ

How do I create a knowledge base for AI?

Put your sources and notes in a folder structure, convert what you can to markdown, and point an AI agent like Claude Code at the folder. That is a working knowledge base. To get past summarization, add a semantic layer — an LLM wiki or a knowledge graph — that describes the concepts and their relations, and make it available to the model as a tool.

Do I need to know how to code?

No. The setup is folders, markdown files, and a viewer. The only command-line step is optional — running Claude Code in a terminal rather than a desktop app, which is worth doing because it supports tool use.

Is there an open source AI knowledge base?

The knowledge base itself is open by construction: markdown files, PDFs, and a Git repository you own. The InfraNodus skills that build the semantic layer are open source, and the ontology files they write are plain markdown you can read and edit.

One knowledge base or several?

One, unless the domains are genuinely unrelated. A single base is where cross-domain connections become visible, and those are usually the valuable ones. Split only when the noise between areas starts to outweigh the connections between them.

Markdown or PDF?

Both. Keep PDFs when the original source matters, and convert to markdown anything the model will read often — it preserves formatting, stays plain text, and is much faster to process.

What does InfraNodus add to a knowledge base?

The structural layer. It represents the base as a knowledge graph and applies network analysis to show which concepts are most influential, which topics have formed, and which pairs of topics are not connected to each other — the content gaps. The model then uses that structure to answer, instead of retrieving the nearest paragraph.


 

Build Your Knowledge Base


Connect your files to a knowledge graph that shows you the topics inside them, the concepts that hold them together, and the gaps between them:


Sign Up     Log In