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

Self Hosted Knowledge Base

Most advice about a self hosted knowledge base starts with pages, permissions, and search. That's useful, but it's pointed at humans reading a wiki. It misses the harder problem: your AI stack changes faster than your documentation stack, and every new assistant asks you to rebuild context from scratch.

A better design treats the self hosted knowledge base as a durable context layer beneath Claude Code, Cursor, ChatGPT, Ollama, and whatever comes next. The assistant becomes a caller. The knowledge stays put. The tools stay put. The memory compounds instead of resetting every time you switch front ends.

That matters because the churn is real. The shift from Claude Code to Hermes-class agents and other monthly tool changes forces teams to re-teach workflows and rebuild context, and 73% of developers report losing context when switching agents in a 2025 AI Workflow Survey by GitHub, as summarized in this discussion of long-term memory for AI workflows. Traditional knowledge base guides don't address that portability problem at all.

Stop Rebuilding Your AI Context from Zero

The common assumption is that AI context is disposable. You try a new assistant, paste in the same project background, reconnect the same APIs, restate the same customer conventions, and accept that friction as normal.

I don't think it is.

If your team relies on AI for delivery, support, operations, or internal automation, context is infrastructure. It deserves the same treatment as source code and runbooks. That means version control, explicit structure, recoverability, and a stable interface that isn't tied to one vendor's memory feature.

What a self hosted knowledge base should do for AI

For AI workloads, a self hosted knowledge base shouldn't just answer search queries. It should provide:

  • Portable memory: The same context should work across different assistants without copy-paste migration.
  • Structured operating knowledge: SOPs, client playbooks, internal conventions, and tool manifests should live in one place.
  • A safe execution boundary: Planning belongs near the model. Secret-backed action execution doesn't.
  • Long-term compounding: New learnings should enrich the vault instead of disappearing into one tool's private chat history.

Traditional wikis preserve documents. A durable AI context layer preserves working knowledge.

This is the architectural shift that matters. You're not building a prettier internal wiki. You're building a system where assistants are interchangeable clients and the knowledge vault is the constant.

What doesn't work

A few patterns break down quickly:

  • Per-assistant memory silos: Each tool remembers different fragments, then drifts.
  • Closed memory stores: Export is weak, diffs are poor, and migration gets ugly.
  • Secrets in prompts: Fast in demos, unsafe in production.
  • Context stored only in conversations: Once the chat is gone, the knowledge is gone too.

A self hosted knowledge base for AI should outlive any one model. If it can't, you're still renting memory from the interface.

Self-Hosted vs SaaS A Control and Compliance Trade-off

Self-hosting isn't automatically better. It's better when the thing you're storing matters enough that ownership, isolation, and recovery policy can't be delegated cleanly to a vendor.

For a normal help center, SaaS may be fine. For internal AI context that includes SOPs, client playbooks, HR material, and operational metadata, the trade-off changes. The system isn't just storing text. It's holding the instructions and references that shape model behavior.

A comparison chart highlighting the key differences between self-hosted and SaaS knowledge base platforms.

Where self-hosting earns its complexity

Organizations usually choose self-hosted knowledge bases when they need strict data control. Full infrastructure ownership includes encryption keys, access logs, and backup strategy, which is important for meeting frameworks like GDPR or HIPAA and for keeping sensitive documentation outside third-party cloud environments, as outlined in this review of self-hosted knowledge base software for data compliance.

For AI systems, that same control has another benefit. You own the entire context lifecycle. You decide retention, access boundaries, backups, and restore behavior. You're not adapting your operating model to a vendor's defaults.

Comparison table

Criterion Self-Hosted (e.g., Geode) SaaS (e.g., Vendor-hosted KB)
Data ownership You own the infrastructure and the full data lifecycle Vendor manages the infrastructure layer
Encryption control You control key handling and server-side security design Encryption exists, but key management and implementation are vendor-defined
Access logs Logs can be captured and retained under your policies Logging depth and retention are constrained by the provider
Backup strategy Recovery points and retention can match your internal requirements Backup and retention policies are usually standardized
Compliance fit Better for teams that need direct control over regulated data handling Depends on vendor certifications and shared-responsibility boundaries
Customization High. You can shape storage, auth, and execution boundaries Usually limited to what the product exposes
Operational burden Your team handles deployment, patching, backups, and monitoring Vendor handles hosting and platform operations
Switching cost Lower if your content is stored in open formats and standard interfaces Can be higher if memory and integrations live in proprietary systems

What SaaS still does well

SaaS wins on speed. A vendor-hosted tool removes a lot of setup work and usually ships with analytics, polished onboarding, and fewer operational tasks.

That's not trivial. If your team doesn't have platform capacity, a self hosted knowledge base can become shelfware or a maintenance trap.

Decision rule: Self-host when context ownership is strategic. Use SaaS when fast deployment matters more than long-term control.

The mistake is treating this as a generic software procurement decision. For AI workflows, your stored context isn't passive content. It's an operating asset. If you expect to change assistants over time, owning that asset usually matters more than getting started quickly.

The Architecture of a Modern AI Knowledge Vault

A modern self hosted knowledge base for AI needs three layers: a vault, a reasoning layer, and a secure execution path. If any one of those is missing, the system either becomes a static wiki or an unsafe automation box.

Start with the mental model first.

A diagram illustrating the three-layer architecture of a modern AI Knowledge Vault system.

The clearest external framing for this idea is an AI context layer architecture. The important part isn't the label. It's the separation of concerns.

The vault layer

The vault should be plain text, versioned, and inspectable. A git-backed store of markdown files in OKF (Open Knowledge Format) gives you that. OKF means a structured, open representation for knowledge files, usually markdown plus frontmatter and linkable metadata.

That choice solves several practical problems at once:

  • Human readability: Anyone on the team can inspect files without special tooling.
  • Diffability: Changes are obvious in git.
  • Exportability: You're not trapped in a proprietary memory store.
  • Rollback: A bad write can be reverted cleanly.
  • Automation friendliness: Scripts, linters, and CI can operate directly on the vault.

A wiki database can still be useful for human-facing docs. But if the goal is assistant portability, plain markdown in git is the safer base layer.

The vault agent layer

Once the vault exists, you need a specialist that can reason over it. That's the vault agent. It isn't a chatbot and it isn't a general autonomous agent. Its job is narrower: interpret a request, inspect the vault, and return either an answer or a plan.

A few terms matter here:

  • MCP (Model Context Protocol): An open protocol that lets assistants connect to tools and context providers through a standard interface.
  • query: Read-oriented retrieval and synthesis over the vault.
  • remember: A write path for turning new learnings into organized vault updates.
  • list_capabilities: A current inventory of what the vault exposes.
  • invoke: The caller's action request for an external capability.
  • caller or assistant: The front end, such as Claude Code, Cursor, or ChatGPT, that talks to the vault through the MCP endpoint.

The planning boundary is the important part. The vault agent plans but never executes external actions. It can say, "Use this recipe, then call this capability with these fields." It cannot call the tool itself.

Keep the reasoning layer narrow. The more jobs you give it, the harder it is to secure and debug.

Here's the useful sequence:

  1. The assistant sends a natural-language request to the MCP endpoint.
  2. The vault agent reads the relevant OKF files.
  3. It returns an answer or a step-by-step plan.
  4. If a tool action is needed, the assistant chooses to call invoke.

Later in the flow, that action goes through a separate execution boundary. The planner doesn't cross it.

A short demo helps make that concrete:

The secure execution layer

The third layer is where most ad hoc systems go wrong. They let the model hold credentials or they blur planning and execution into one opaque loop.

A better pattern is simple. Keep secrets outside the vault. Keep execution outside the planner. Let the assistant act as the caller, and let a kernel handle the tool invocation path.

That gives you a durable architecture:

Layer Primary job Should it see secrets Should it mutate external systems
Vault Store structured knowledge and manifests No No
Vault agent Plan, reason, answer, organize memory No No
Execution kernel Resolve capability, inject credentials, run action Yes, server-side only Yes
Assistant Present request, receive plan, choose to invoke No credential values Only through the execution layer

That boundary is what makes an AI-ready self hosted knowledge base usable in production rather than just impressive in a demo.

Designing for Security and Compliance

The security rule that matters most is simple: secrets out of the model.

A lot of self-hosted knowledge base guidance stops at HTTPS, SSO, and maybe role-based access. Those controls matter, but they don't solve the core AI risk. The dangerous moment is when a model can read or emit credentials through its context, logs, or tool traces.

The planning and execution split

A secure architecture separates the planner from the executor.

The vault agent can inspect recipes, policies, and manifests. It can decide that an external action is required. It can propose the exact fields the caller should send. But it must never execute the action and it must never hold the secret.

The assistant executes through invoke. Then the kernel resolves the integration, retrieves the needed credential from a server-side broker, injects it at run time, and returns only the result.

That split does two things well:

  • It limits exposure: The credential never enters the prompt or chat transcript.
  • It improves auditability: You can reason about who asked for an action and which system executed it.

What regulated teams should treat as non-negotiable

Insecure secret handling is a major failure mode in AI automation. It is cited as a failure point in 68% of cases in the referenced enterprise security material provided for regulated AI operations. The practical implication is clear: storing secrets encrypted at rest outside the vault, then injecting them server-side through a kernel-level broker, shouldn't be optional for production systems.

If a credential can appear in the model context, the design is already wrong.

A safe pattern usually includes:

  • Encrypted-at-rest secret storage: The vault contains references, not secret values.
  • Server-side credential injection: The execution layer adds credentials only at run time.
  • Caller-only actions: The assistant requests the action. The vault agent doesn't perform it.
  • Scoped capabilities: Integrations expose named actions rather than broad raw access.
  • Write-only secret management: Operators can set, rotate, or delete secrets without revealing them back through the UI.

Security benefits of a specialist context layer

A general autonomous agent tends to accumulate too much authority. It reasons, acts, stores memory, and often carries credentials. That may be convenient, but it creates a messy trust boundary.

A specialist context layer is easier to defend. Its planner works on open knowledge files. Its execution path is explicit. Its secret broker is isolated from model context. That maps better to how security teams think about privileged systems.

For compliance-heavy environments, architecture matters more than interface polish. If your self hosted knowledge base is going to sit beneath real workflows, the model should never be the place where credentials live.

Integration and Operational Best Practices

The hard part of a self hosted knowledge base isn't getting it running once. It's keeping it useful, recoverable, and boring to operate.

That means choosing a storage model your team can maintain, keeping every change auditable, and exposing integrations in a way that assistants can use safely without inheriting raw system access.

A developer working on code at a laptop with abstract digital connections and server icons.

Pick the simplest architecture your team can run

Open-source self-hosted knowledge base tools vary a lot in maintenance burden. Database-driven systems such as BookStack and Wiki.js usually bring more patching and backup complexity, while flat-file systems reduce overhead but often need more assembly around auth and search, as summarized in this comparison of open-source knowledge base software architectures.

That trade-off matters more than feature count.

  • Database-backed tools: Good when you want polished editing, richer built-ins, and familiar wiki behavior. Expect more operational work around backups and upgrades.
  • Flat-file tools: Better when you prioritize portability, simpler restore logic, and direct git workflows.
  • Hybrid approach: Keep the AI vault in markdown and git, then mirror selected docs into a human-friendly wiki if non-technical teams need it.

Treat capabilities as code

Raw integrations are messy. A direct HTTP endpoint, a local CLI, or a repo script isn't a reusable team capability until you've wrapped it in a declarative manifest.

A good manifest should define:

Part Why it matters
Action name Gives assistants a stable function identity
Input schema Constrains what the caller can send
Secret references Points to credentials without embedding them
Execution policy Defines what action is allowed to do
Human description Explains when the capability should be used

Many teams accidentally build a pile of bespoke glue. One assistant gets a local script. Another gets a copied API setup. A third has a half-working version in a notebook. Capabilities-as-code stop that drift.

Practical rule: If an integration can't be declared, reviewed, and versioned, it probably shouldn't be in the vault.

Operational habits that pay off later

A self hosted knowledge base ages well when the team keeps the operating model tight.

  • Use git for every write: The vault should always have a clear change history and an easy rollback path.
  • Test restores, not just backups: Backup jobs without restore validation create false confidence.
  • Match deployment method to team capacity: Docker, Kubernetes, and VMs are all viable. The right choice is the one your team can patch and recover confidently.
  • Track full hosting scope: Compute, database, storage, backups, CDN, and monitoring all belong in the estimate.
  • Prefer stable over clever: A simpler system that stays boring for years is usually the better platform choice.

Some teams also need more infrastructure when AI features are enabled. In one documented self-hosted deployment model, production AI features require 16 CPU cores, 64 GB memory, and 60 GB disk, while Kubernetes deployment requires at least 3 nodes with 4 vCPUs and 16 GB memory per node, according to documented deployment requirements for self-hosted AI platform features. That doesn't mean every knowledge vault needs that footprint. It does mean AI features can shift infrastructure planning quickly.

Flat-file tools such as DokuWiki, Typemill, and similar author-friendly systems can also be a good fit when you want lower overhead and secure internal docs without a heavier Node.js or PostgreSQL stack, as described in this overview of author-friendly self-hosted knowledge base tools.

Putting It Into Practice with Geode

The cleanest way to understand the pattern is to walk a request through the system.

A developer in Cursor or Claude Code asks, "How do I rotate a client's reporting workflow and update the related runbook?" The assistant sends that request to a single MCP endpoint. From there, the vault is responsible for context. The assistant is responsible for acting as the caller.

Screenshot from https://www.geodemcp.com

What is live today

The current live footprint is specific, which is how it should be.

Available today:

  • The open-source self-hostable kernel
  • A single MCP endpoint
  • query, remember, and list_capabilities
  • A git-backed OKF vault
  • A secret broker and caller-only invoke for HTTP connections
  • Artifacts
  • The dashboard
  • Bring-your-own-model support for local and cloud models

Still in active development:

  • The repo, CLI, and OAuth integrations installer
  • Team features such as shared vaults, roles, audit logs, and SSO
  • Hardened container-level credential isolation
  • Private Managed deployments

That's the right way to present a system like this. If a capability isn't live, it shouldn't be implied.

A typical request flow

Here's the practical sequence.

  1. The assistant sends a request to the MCP endpoint.
  2. The vault agent runs query over the markdown vault and linked recipes.
  3. The agent returns a plan. It may say which runbook applies, what steps are needed, and which named capability the assistant should use.
  4. The assistant calls invoke if an external action is required.
  5. The kernel resolves the capability and injects credentials server-side at run time.
  6. The result comes back to the assistant, without exposing the credential to the model.
  7. The assistant or operator uses remember to persist the new learning back into the vault.

A simplified tool flow looks like this:

{
  "tool": "query",
  "input": {
    "request": "Find the SOP for rotating the reporting workflow for Client Delta and identify any required external actions."
  }
}

The returned plan might tell the assistant to call a capability. The action still doesn't happen until the caller explicitly invokes it.

{
  "tool": "invoke",
  "input": {
    "capability": "reporting_workflow.rotate",
    "arguments": {
      "client": "Client Delta",
      "change_window": "next scheduled run"
    }
  }
}

The important boundary stays intact the whole time. The vault agent planned the task. The caller executed the action. The kernel handled the secret.

Why remember matters

Teams often underrate the write path.

remember is what turns a useful answer into an improving system. A small note like "Client Delta wants report exports archived under the finance naming convention" shouldn't stay trapped in one assistant conversation. The vault should distill it, file it in the right place, deduplicate if needed, and commit the change.

That is how the context compounds. The next assistant doesn't need the old chat. It reads the vault.

For teams comparing patterns, this is close to what a dedicated MCP memory server should accomplish. Memory should be tool-agnostic, inspectable, and operationally boring.

The operator view matters too

A system like this also needs a human control plane.

The dashboard acts as an operator console for reviewing capabilities, managing secret references, inspecting artifacts, and checking what the vault currently exposes. That's a practical difference from hidden memory systems. Operators can see and manage the substrate instead of hoping the assistant's internal memory still reflects reality.

The result isn't a chatbot with bolted-on memory. It's a specialist context layer that sits beneath interchangeable assistants and keeps the useful parts of your workflow under your control.

Frequently Asked Questions

Is a self hosted knowledge base always the right answer

No. The biggest barrier is operational complexity. With open-source self-hosted tools, the team owns hosting, HTTPS, patching, backups, and the cost of compute, database, and storage. That's the central trade-off called out in this review of open-source self-hosted knowledge base adoption barriers.

If your team can't maintain it, SaaS may be the better choice.

Do I need a local model to use this pattern

No. A good architecture supports both local and cloud models. The key issue isn't where the model runs. It's whether the model can see secrets and whether the context is stored in an open, portable layer you control.

How hard is migration from a normal wiki

That depends on how clean your current docs are. If the wiki already uses markdown exports or structured pages, migration is mostly an information architecture problem. The larger challenge is usually converting human-oriented prose into reusable recipes, tool manifests, and short concept files that assistants can reason over reliably.

Should the vault replace our existing wiki

Usually not all at once.

A practical approach is to keep the AI-facing vault focused on operating knowledge, recipes, conventions, and capabilities. If your company already uses BookStack or Wiki.js for broad internal documentation, keep that in place and move the AI-critical layer into markdown and git first.

What deployment model is usually easiest

The easiest model often proves to be the one already familiar for patching, backing up, and restoring. Docker is often a straightforward starting point. Kubernetes makes sense when the rest of your platform already runs there. A VM can still be the right answer if your team wants fewer moving parts.

What should I store in the vault first

Start with the knowledge that causes the most repeated prompting:

  • Client conventions: Naming rules, invoicing quirks, review requirements
  • Runbooks: Repeatable operational procedures with decision points
  • Capabilities: Declarative descriptions of safe tool actions
  • Team standards: Coding conventions, release rules, escalation paths
  • Reference links: Repos, APIs, and docs that assistants need to reason correctly

What's the biggest design mistake

Letting the assistant's chat history become your system of record.

That feels efficient at first, but it creates fragmented memory, weak auditability, and painful migrations. A self hosted knowledge base only pays off when the vault is the source of truth and assistants remain interchangeable callers.


If you're building a durable context layer instead of another assistant-specific memory silo, the next step is simple: explore Geode, read the docs, and connect one assistant to a vault you control.