Geode
Why GeodeHow it worksPricingDocsField notes Spin up my vault
← Field notes

What Is a Personal Knowledge Graph? a Developer's Guide

Meta description: A developer's guide to the personal knowledge graph: durable AI context, secure tool use, git-backed storage, and practical architecture trade-offs.

You're probably living this already. Claude Code knows one slice of your workflow, Cursor knows another, ChatGPT remembers a few conventions, and none of them hold the same context for long. Change assistants and you start over, rebuilding prompts, reconnecting tools, and re-explaining the same clients, projects, and operating rules.

A personal knowledge graph is the pattern that fixes that. In practice, it's a durable context layer that sits below any one assistant. It stores your knowledge in an open, inspectable format, exposes it through a standard interface, and lets assistants query the same source of truth instead of carrying their own drifting copies.

Most articles stop at note-taking or retrieval. The part that matters in production is architecture. If you want context to last, tools to stay portable, and secrets to stay out of the model, you need a clean separation between planning, execution, and credential handling.

Your AI Context Should Be a Durable Asset

Switching assistants shouldn't feel like a memory wipe. But that's how most AI workflows behave today. The assistant changes, the model changes, the integration surface changes, and your accumulated context turns into scattered prompts, hidden memory, and one-off setup.

That's why I think of a personal knowledge graph as infrastructure, not productivity software.

A good personal knowledge graph gives you one durable layer for facts, conventions, SOPs, relationships, and callable capabilities. The front-end assistant becomes replaceable. Claude Code, Cursor, ChatGPT, or a local model can all plug into the same context instead of owning it. If you want the broader framing, the idea maps closely to an AI context layer rather than another note-taking app.

What durability means in practice

Durability isn't just “your files exist on disk.” It means:

  • Your context survives tool churn: when you switch assistants, you don't re-teach the system from scratch.
  • Your knowledge compounds: each useful interaction can improve the graph instead of vanishing into chat history.
  • Your tools stay attached to the same source of truth: workflows don't get duplicated per client or assistant.
  • Your data remains legible: a human can inspect it, diff it, and repair it without reverse-engineering a vendor database.

Practical rule: If your assistant's memory can't be inspected outside that product, it isn't a durable asset. It's cached convenience.

The core shift is simple. Stop treating context as a feature of the assistant. Treat it as a system you own.

Why per-assistant memory breaks down

Built-in memory features are useful for lightweight preference storage. They're weak as a long-term operating layer. They usually don't model relationships well, they don't travel cleanly across tools, and they mix high-value context with the behavior of one product.

That creates familiar failure modes:

Approach Works for Breaks on
Assistant-native memory Personal preferences, short habits Portability, auditability, shared workflows
Long prompts and project files Local task context Drift, duplication, hard-to-maintain updates
Personal knowledge graph Durable context and reusable workflows Requires deliberate architecture and governance

A personal knowledge graph is harder to set up than a saved prompt. It's also the first pattern I've seen that still makes sense after the next assistant arrives.

Defining the Personal Knowledge Graph

A personal knowledge graph is not just a folder of notes with backlinks. It's not just RAG over markdown. And it's not the same thing as the “memory” toggle inside a single assistant.

For AI workflows, a personal knowledge graph is a structured, tool-agnostic context system that stores knowledge as linked entities and operational context, then makes that graph available to an assistant through a stable interface.

A diagram illustrating how personal knowledge graphs integrate features from note-taking apps, traditional databases, and the semantic web.

What it is not

Tools like Obsidian and Logseq are excellent for human-authored knowledge work. They give you linked notes, graph views, and flexible writing environments. Many developers already use them as the front end for research or project memory.

But a personal knowledge graph for AI adds three things those tools don't define by themselves:

  • A machine-usable structure: not only markdown, but conventions, frontmatter, stable identities, and explicit links.
  • An interaction protocol: a standard way for assistants to query, update, and discover capabilities.
  • An agentic layer: a specialist planner that can reason over the graph and decide how new information should be filed or how a task should be approached.

That last part matters. A graph without an operational layer is still valuable, but it behaves more like a library than a working context system.

How it differs from assistant memory

Assistant memory is usually proprietary and product-scoped. You tell one assistant that a client prefers weekly summaries, and that fact lives inside that product's memory store. Maybe it influences future responses. Maybe it doesn't. Either way, it's hard to inspect, export, or apply consistently elsewhere.

A personal knowledge graph works differently.

System Storage model Ownership Scope
Assistant memory Closed product store Vendor-controlled One assistant
Vector store Embeddings plus chunks Operator-controlled Retrieval-oriented
Personal knowledge graph Linked, inspectable knowledge in open files User-controlled Shared across assistants and workflows

The graph part matters

People often hear “knowledge graph” and assume a heavyweight semantic web stack. You don't need that to get real value. In this context, the graph is the network of relationships between concepts such as people, projects, clients, runbooks, tools, and decisions.

The useful properties are practical:

  • a project links to the client, repository, environments, and meeting notes
  • an SOP links to required tools and approval rules
  • a person record links to current work, recurring requests, and previous decisions
  • a tool capability links to the action it can perform and the secret reference it requires

A personal knowledge graph becomes useful when the links reflect how work actually happens, not when the ontology looks elegant on a whiteboard.

The active ingredient

The strongest version of the pattern uses an agent in the middle. Not a general autonomous agent that roams your environment, but a narrow planner that reads the graph and produces either an answer or a plan.

That's the distinction most high-level PKM writing misses. The durable value doesn't come from markdown alone. It comes from structured knowledge plus a constrained agent plus a standard interface.

If one of those parts is missing, you usually end up with either a nice note system or a brittle AI integration, but not a durable context layer.

Anatomy of an Agent-Centric Knowledge Graph

The architecture gets easier to reason about if you split it into four parts: the vault, the vault agent, the caller, and the kernel.

The vault is the durable store. In this pattern, it's a git-backed knowledge base using OKF (Open Knowledge Format), which means plain markdown files with structure, links, and conventions that make them usable by both humans and machines. Git gives you history, diffs, rollback, and a sane operational model for automated edits.

Here's the visual shape of the system:

A diagram illustrating the architecture of an agent-centric personal knowledge graph including ingestion, processing, and interaction layers.

The four roles

The vault agent is the planner. It reads the vault, interprets requests, synthesizes answers, and proposes structured actions. It does not execute external actions. It does not receive raw credentials.

The caller is the assistant front end. That could be Claude Code, Cursor, ChatGPT, or another MCP client. The caller sends requests and, when needed, executes the planned action through a controlled invocation path.

The kernel is the server-side control plane. It exposes a single MCP endpoint. MCP means Model Context Protocol, an open protocol that lets assistants discover and use tools consistently. The kernel handles tool dispatch, stateful access to the vault, artifacts, and secret injection at runtime.

The secret broker is separate from the model-facing context. It stores credentials outside the vault and outside the prompt path.

The planning boundary

This is the line that keeps the system sane.

Boundary to keep: the vault agent can decide what should happen next, but it must never be the component that performs the external action.

That sounds strict because it is. Once planning and execution blur together, you get a system that's harder to secure, harder to audit, and harder to reason about when something goes wrong.

A request flow typically looks like this:

  1. The caller sends a natural-language request through the MCP endpoint.
  2. The vault agent reads the graph and returns either a synthesized answer or a plan.
  3. If the plan requires a tool, the caller issues invoke.
  4. The kernel resolves the integration, injects credentials server-side, runs the action, and returns the result.
  5. If the result should be persisted, the caller can ask the vault to remember it.

A practical mental model

The kitchen analogy is useful here once, because the role split is otherwise easy to muddy.

The vault agent is the kitchen operator. It knows the recipes and which tools a recipe needs. The assistant is the cook following the plan. The kernel is the pass and locked storeroom, controlling what gets handed over and when. The recipe can mention “use the payment API” without exposing the API key or letting the planner roam freely.

Later in the flow, the execution path looks like this:

Why git-backed markdown still wins

I'm opinionated here. Plain markdown in git is still the best default substrate for this kind of system.

Not because it's trendy or nostalgic. Because it gives you properties operational teams need:

  • Inspectability: you can open files without vendor software.
  • Diffability: automated edits are reviewable.
  • Recoverability: a bad run can be reverted cleanly.
  • Portability: the knowledge survives the product.

There are trade-offs. You won't get the rigid guarantees of a fully normalized database schema, and you do need conventions for file layout, linking, and mutation. But for AI context, the combination of human readability and machine processability is unusually strong.

Where people go wrong

The common implementation mistakes are predictable:

  • Overbuilding ontology first: teams spend weeks naming entity types and never reach useful workflows.
  • Letting the agent write anywhere: without boundaries, the vault accumulates noisy, low-trust edits.
  • Storing secrets near the graph: convenient early on, dangerous later.
  • Treating the assistant as the system of record: the graph becomes secondary and drift starts immediately.

The durable pattern is narrower. Keep the vault legible. Keep the planner constrained. Keep execution explicit. Keep secrets out of model context.

Querying and Growing Your Knowledge Base

Once the architecture is in place, the day-to-day interface can stay small. That's one of the better design choices in this space. You don't need a huge tool surface if the underlying graph is structured well.

The core verbs are usually query, remember, and list_capabilities. If you're using MCP, those are exposed through the server and called by the assistant. The details of the transport vary by client, but the shape should stay stable.

For a more detailed conceptual walkthrough of the first two verbs, the query and remember concepts doc is a useful companion.

query for synthesis, not raw retrieval

Use query when you want the system to read the graph and return a synthesized answer grounded in the vault.

{
  "tool": "query",
  "arguments": {
    "input": "What are the standing requirements for onboarding a new client in the analytics workflow?"
  }
}

A good response doesn't just dump matching files. It pulls together the onboarding SOP, any linked client conventions, required tools, and unresolved gaps. That's the advantage of a graph over plain retrieval. The system can traverse relationships and answer in terms of the workflow, not just keyword overlap.

This works well for questions like:

  • Operational recall: “What's our deploy checklist for this service?”
  • Decision history: “Why did we stop using that webhook path?”
  • Context stitching: “What do I need to know before replying to this client?”

remember as the compounding loop

remember is where the knowledge base stops being static.

{
  "tool": "remember",
  "arguments": {
    "input": "The client wants monthly reports delivered as markdown first, then exported to PDF after approval."
  }
}

A useful implementation doesn't just append that sentence to a scratchpad. The agent should interpret it, decide where it belongs, cross-link it to the relevant client or workflow, avoid obvious duplication, and persist it as a structured update.

Working rule: if adding knowledge requires manual filing every time, people stop doing it. The system has to absorb small facts with low friction.

That's the compounding behavior you want. Each interaction enriches future context. The vault becomes a place where operational details settle into durable structure instead of disappearing into transcripts.

list_capabilities for runtime discovery

list_capabilities tells the caller what the current vault and integration layer can do.

{
  "tool": "list_capabilities",
  "arguments": {}
}

That matters more than it seems. Hard-coded tool menus drift. A dynamic capability listing, derived from the actual vault state and installed integrations, lets the assistant adapt to the environment it's connected to.

A typical capability list might include:

  • queryable knowledge domains
  • named integration actions
  • reusable SOP-backed workflows
  • artifact generation paths

What works and what doesn't

A few implementation patterns hold up well:

Pattern Why it works
Small, stable verbs Easier for assistants to use consistently
Agent-assisted filing Lowers maintenance burden
Dynamic capability discovery Reduces drift between docs and runtime
Human-readable stored output Keeps the vault trustworthy

What doesn't hold up is turning remember into an unreviewed dump of every chat. High-value context is selective. If you persist everything, the graph gets noisy fast and your future queries get worse, not better.

Integrating Tools with Secure Invocation

A personal knowledge graph becomes operational when it can connect plans to real actions. That's where invoke comes in.

The security model matters more than the syntax. If the model can see raw secrets, pass them around in prompts, or directly execute arbitrary external actions, the design is already off track. The safer pattern is strict separation: the planner describes the action, the caller requests execution, and the kernel performs it with server-side credential injection.

A five-step flowchart illustrating the secure invocation process for integrating tools within a personal knowledge graph system.

How invoke should work

An integration is usually defined by a manifest stored with the vault. The manifest declares actions, expected inputs, and references to secrets. The secret values themselves are stored elsewhere, in a broker or secured runtime store.

A simplified call from the assistant might look like this:

{
  "tool": "invoke",
  "arguments": {
    "capability": "billing.create_invoice",
    "input": {
      "customer_id": "cust_123",
      "description": "Monthly analytics retainer"
    }
  }
}

At runtime, the flow should look like this:

  1. The vault agent proposes the action.
  2. The caller decides to execute and sends invoke.
  3. The kernel validates the capability and policy.
  4. The kernel fetches the referenced credential from the secret broker.
  5. The kernel injects the credential server-side and executes the HTTP action.
  6. The caller receives only the result.

The critical point is simple: the vault agent never holds the secret, and the model never needs the secret in its prompt context.

Why caller-only execution is the safer default

This boundary solves several real problems.

  • Auditability: you can log which assistant asked for which action.
  • Policy enforcement: the kernel can reject disallowed invocations before any external call is made.
  • Prompt hygiene: secrets don't leak into transcripts, tool arguments, or later summarization.
  • Operational clarity: failures happen in a known execution layer, not inside fuzzy agent behavior.

Don't let a planning agent become an action agent by accident. Most security trouble in agent systems starts with convenience.

What's practical today

The straightforward starting point is HTTP connections. They fit the model well because the invocation boundary is clean and the execution contract is explicit. A manifest can define named actions for a CRM, ticketing system, billing API, or internal service. The assistant only needs the action name and safe inputs.

A minimal manifest shape might look like this:

name: billing
type: http
actions:
  - name: create_invoice
    method: POST
    path: /invoices
    auth:
      secret_ref: billing_api_token

That pattern scales better than letting each assistant invent its own one-off tool wrapper. The manifest becomes part of the durable operating context. The secret stays outside it.

The trade-offs

There is a cost to this separation.

Choice Benefit Cost
Server-side secret injection Secrets stay out of model context More kernel complexity
Caller-only invoke Clear execution boundary Slightly longer control path
Manifest-defined actions Reusable, portable integrations Less ad hoc flexibility
Policy checks before execution Safer defaults More setup work

I'd take those trade-offs every time for production systems. Fast prototypes often collapse planning, tool use, and secret handling into one blob because it feels simpler. That simplicity disappears the moment you need review, audit, or containment.

Achieving Data Sovereignty and Privacy

If your personal knowledge graph matters, you should be able to read it without the product that created it. That rules out a surprising number of AI memory systems.

The durable approach is plain files in a versioned repository. Markdown with structure, links, and frontmatter is boring in the best way. You can inspect it in a terminal, edit it in Obsidian, diff it in git, and move it between systems without asking a vendor for export support.

A hand touching a glowing digital shield graphic representing security for a personal knowledge graph concept.

Why open formats matter

Closed memory stores are convenient until they aren't. You can't easily review how the system derived a preference, repair a broken record, or carry your operating context into a different toolchain. With open files, those operations are ordinary maintenance.

That's the strategic value of an OKF-style vault and an open protocol like MCP (Model Context Protocol). The vault stays tool-agnostic. The interface stays standard. Your context doesn't have to be rebuilt every time the assistant market shifts.

For teams evaluating self-hosted patterns, the case for a self-hosted knowledge base architecture is less about ideology and more about control boundaries.

Privacy is an architectural property

Privacy doesn't come from a policy page. It comes from the path data takes through the system.

A strong setup keeps these layers separate:

  • Knowledge at rest: stored in your repository, readable and auditable.
  • Model execution: local or cloud, depending on your risk posture.
  • Secrets: held outside the vault and never typed into chat.
  • Tool execution: mediated by a kernel or control layer, not by direct model access.

That separation is what enables stricter deployment options. If you want local model execution through Ollama, the pattern supports it. If you want to keep both the context and model operations inside your own environment, the architecture allows for that too.

Open files give you portability. Separation of duties gives you privacy. You need both.

Frequently Asked Questions

How is a personal knowledge graph different from a vector database or RAG pipeline

A vector database helps retrieve similar chunks. RAG helps feed those chunks into a model at answer time. Both are useful, but they're retrieval patterns.

A personal knowledge graph is broader. It stores linked operational context, preserves explicit relationships, and supports planning over that structure. You can use retrieval inside a personal knowledge graph, but the graph isn't reducible to embeddings and chunk search.

Can I use this with my team

The core pattern works for teams, but availability depends on the implementation. In many current systems, the open-source, self-hostable kernel is oriented around a single vault and a single MCP endpoint for one operator's context layer. Features like shared vaults, roles, audit logs, and SSO are best treated as active development areas unless a product explicitly documents them as live.

What is OKF

OKF, or Open Knowledge Format, is a structured way to store knowledge in plain markdown with conventions that make it workable for both humans and agents. The point isn't academic purity. The point is durable, inspectable context.

What is MCP

MCP, or Model Context Protocol, is an open protocol for exposing tools and context to assistants in a standard way. If you want assistants to be interchangeable consumers of the same context layer, open protocol support matters. You can read the Model Context Protocol documentation and the Open Knowledge Format documentation for the standard details.

Do I need a fully autonomous agent for this

No. In fact, I'd avoid that framing. The strongest pattern is a specialist context layer with a planning agent in the middle, plus a separate execution path for tools. That narrower design is easier to secure, debug, and trust.


If you want to try this pattern in a real system, start by self-hosting the open-source kernel from Geode, connect your assistant to a vault, and read the docs before you wire in external tools.