BundleDex / Guides / OKF for OpenCode

OKF for OpenCode — Using Knowledge Bundles with OpenCode

OpenCode is one of the fastest-growing open-source AI coding agents, and it pairs naturally with Open Knowledge Format (OKF) bundles. This guide shows you how to load OKF bundles into OpenCode, how its contributed-memory and persistent-memory features work, how OKF compares with OpenCode's native memory, and which bundles to start with.

Published August 18, 2026 ~10 min read 583 bundles indexed on BundleDex

What Is Open Knowledge Format (OKF)?

Open Knowledge Format (OKF) is an open standard for packaging knowledge so that AI agents can load it reliably. An OKF bundle is just a directory of markdown files with an index.md manifest, YAML frontmatter on every document, and cross-links between concept files. Because it uses plain files, a bundle is portable: the same directory can be consumed by Claude Code, Cursor, Codex, and OpenCode without conversion. If you are new to the format, read What Is an OKF Skill? first.

A well-formed bundle looks like this:

```
my-bundle/
├── index.md                # Bundle manifest (required)
├── concepts/               # Core domain knowledge
│   ├── architecture.md
│   └── patterns.md
├── guides/                 # How-to guides
└── references/             # Reference documentation
```

OKF was designed to be agent-agnostic. Instead of locking knowledge into a single vendor's proprietary skill format, OKF keeps it in version-controllable markdown that any agent can read. That portability is exactly what makes it a great fit for OpenCode, which prides itself on being open and model-agnostic. For the broader picture, see our OKF for Claude Code and OKF for Cursor guides.

Why OpenCode Users Need Knowledge Bundles

OpenCode is an open-source AI coding agent that runs on the command line and in your editor. It connects to the model of your choice, reads your repository, and can plan and write code with you. But a coding agent is only as good as the context it can see. By default, OpenCode is limited to what is in your current project plus whatever the model already knows. That leaves a gap: the conventions, domain expertise, and architectural decisions that live outside the repository.

Knowledge bundles fill that gap. Instead of re-typing your team's coding standards, API conventions, or domain reference material into every conversation, you load an OKF bundle once and OpenCode can reference it throughout the session. This gives you:

  • Consistent conventions — linting rules, commit style, branching strategy, and naming patterns that the agent follows every time
  • Domain expertise — specialized knowledge about your stack that the base model may not have memorized reliably
  • Project memory — architecture docs, decision records, and setup instructions that persist beyond a single prompt

Pro tip: The best OpenCode setups are layered. Load a conventions bundle, a domain bundle, and a project bundle at the same time. Because OKF bundles are plain directories, OpenCode can reference all three simultaneously and connect knowledge across them.

How Persistent Memory Works in OpenCode

OpenCode supports several ways to keep knowledge available across sessions. Two of the most relevant for OKF are contributed memory and persistent memory.

Contributed Memory

Contributed memory is knowledge that you provide to OpenCode ahead of time — files, directories, or notes that the agent loads when it starts. This is the natural home for an OKF bundle. You tell OpenCode which directories to treat as source material, and it reads them into context so they are available without being re-added each time.

Persistent Memory

Persistent memory is knowledge that OpenCode writes down during a session — decisions, learnings, and facts it captures so they survive into future sessions. Where contributed memory is the input side, persistent memory is the output side. An OKF bundle slots in on the input side: it is your curated, version-controlled knowledge that OpenCode loads, while persistent memory keeps growing as you work.

Because OpenCode is open source, you can also point it at a directory of bundle files directly. The important idea is that OKF gives you a clean, portable way to feed curated knowledge into OpenCode's memory system without relying on an opaque, proprietary store.

How to Load an OKF Bundle in OpenCode

Step 1: Find an OKF Bundle

Browse the BundleDex directory and look for bundles tagged opencode or bundles that mention OpenCode in their description. The curated list at the bottom of this guide is a great starting point. You can also use the BundleDex search API to filter by the opencode tag.

Step 2: Clone the Bundle

Clone the bundle's GitHub repository into a dedicated directory so all your bundles live in one place:

```
mkdir -p ~/okf-bundles
git clone https://github.com/psinetron/echoes-vault-opencode.git ~/okf-bundles/echoes-vault
git clone https://github.com/iwe-org/iwe.git ~/okf-bundles/iwe
```

Step 3: Load the Bundle in OpenCode

Start OpenCode with the bundle directory available, and you can reference its content during the session:

```
# OpenCode reads the bundle directory for context
opencode --load ~/okf-bundles/echoes-vault

# Or reference knowledge during a session
# "Read ~/okf-bundles/iwe/index.md and follow the conventions in it"
```

Step 4: Add the Bundle to Persistent Memory (Optional)

For bundles you use constantly, add them to OpenCode's startup configuration so they load automatically on every session. The exact path depends on your OpenCode setup, but the pattern is to register the bundle directory as contributed memory in your config file:

```
# Example: register a bundle in your OpenCode config
# memory:
#   contributed:
#     - ~/okf-bundles/iwe
#     - ~/okf-bundles/echoes-vault
```

Step 5: Use the Bundle

Once loaded, ask OpenCode to follow the bundle's conventions, answer questions from its reference material, or apply its patterns to the code you are writing. Because the bundle is in plain markdown, OpenCode can read it the same way it reads your repo — no proprietary import required.

OKF vs OpenCode's Native Memory

OpenCode has its own memory concepts, but OKF is complementary rather than competing. Here is how they line up:

Aspect OKF Bundles OpenCode Native Memory
Portability Works in OpenCode, Claude Code, Cursor, Codex OpenCode-specific
Format Plain markdown + YAML, Git versioned OpenCode-managed store
Control Fully yours, easy to inspect and diff Managed by OpenCode
Sharing Publish, clone, and reuse any bundle Tied to your local setup
Best for Curated, reusable knowledge Session learnings and quick notes

In practice you want both. Use OKF bundles for the knowledge you curate and share — conventions, domain reference, architecture — and OpenCode's persistent memory for the facts it picks up while working. An OKF bundle can even be loaded into contributed memory, effectively turning curated knowledge into part of OpenCode's native memory layer.

Best OKF Bundles for OpenCode

These bundles are tagged for OpenCode or mention it in their description, ranked by community adoption (GitHub stars):

Persistent memory plugin for OpenCode. Obsidian-style knowledge base that survives across sessions

okfopencode OKF

Living Docs — a AI agent skill that runs your project's documentation as a living system: constitution, ADRs, BDRs, PRDs, issues, research notes & Mermaid architecture diagrams under five no-drift governance invariants. OKF-formatted, stack-agnostic. Works with Claude Code, Cursor, Copilot, OpenCode & Pi.

okf OKF

OpenCode plugin: progressive disclosure + auto-unload for OKF (Open Knowledge Format) knowledge bundles. Inspired by DCP.

okfopencode
Nova ★ 1

A self-bootstrapping AI-maintained knowledge vault Obsidian + OpenCode + Zettelkasten

okfopencode

OKF v0.1 knowledge bundle generator — Claude skill + OpenCode integration

OKF
opencro ★ 1

Use IA grátis de forma avançada com governança profissional

okfopencode OKF

Data Engineering Knowledge Capture (DEKC) — OKF second brain for data platforms: standard schemas, lineage, streams/jobs, medallion, semantic layer, glossary. Extends PKC + OKF. Claude / Grok / Codex / OpenCode plugin.

okf OKF
llm-wiki ★ 0

Local-first agent memory for multi-tool workflows. Markdown vault, session capture, compile-to-notes — OpenCode, Claude Code, Codex, Cursor. No cloud lock-in.

okf OKF
memvault ★ 0

memvault — local knowledge engine for AI agents: capture Codex/Claude/Gemini sessions, hybrid semantic+keyword retrieval, one MCP server for every harness, interactive graph, OKF export.

okfopencode OKF

Second brain for system architecture information — reverse-engineer monorepos/multi-repos into standard OKF schemas (PKC + SAC). Plugins for Claude Code, Grok, Codex, OpenCode.

okf OKF

Browse all 583 bundles on BundleDex, or filter by the opencode tag to find more.

FAQ

What is OpenCode?

OpenCode is an open-source AI coding agent that runs on your command line and in your editor. It connects to the large language model of your choice, reads your codebase, and helps you plan, write, and refactor code. Because it is open source, OpenCode is highly extensible and can be configured to load structured knowledge such as OKF bundles.

Can OpenCode use OKF bundles?

Yes. OpenCode can load Open Knowledge Format (OKF) bundles by referencing the bundle directory from your terminal or through its contributed-memory and persistent-memory features. OKF is an open, format-agnostic standard, so any agent that can read markdown directories with an index.md manifest can consume a bundle. No modifications to the bundle are required.

How do I give OpenCode an OKF bundle?

Clone the bundle repository to your machine and either run OpenCode with the bundle directory as an argument or place it in a directory OpenCode reads on startup, such as the contributed-memory path. OpenCode will discover the bundle's index.md, load the YAML frontmatter and concept files, and surface the knowledge during your sessions.

Is OKF compatible with OpenCode?

Yes. OKF is an open standard built from plain markdown and YAML frontmatter, so it is fully compatible with OpenCode. Because OpenCode is open source, you can wire OKF bundles directly into its memory system, import them into skills, or simply reference them as documentation. The same bundle also works in Claude Code, Cursor, Codex, and other OKF-aware agents without conversion.