Onboard an AI agent to a knowledge base with okf prime
Onboard an AI agent to a knowledge base
Section titled “Onboard an AI agent to a knowledge base”An agent starts with the map of your catalogue and the pages that matter, in two calls.
Search terms covered: onboard AI agent to knowledge base, okf prime, Claude Code context, MCP knowledge base. Output below comes from okf 0.2.5 against a copy of the golden test catalogue; <catalogue> replaces the real path.
Set it up
Section titled “Set it up”Install okf, then connect your agents. See Installation for the install paths.
okf install # preview: prints a plan, changes nothingokf install --apply # installs skill, MCP server entry, completionRestart the agent afterwards. The MCP server runs the okf binary; OKF_BIN overrides which one. See Agent onboarding.
Work through it
Section titled “Work through it”1. Give the agent the map. okf prime prints the usage guide, the command directory and the catalogue state with the bundle TOC. An agent runs it once at session start.
## This catalogue
root: <catalogue>bundles: 4 · concepts: 24fts index: absent — `find` degrades to a substring scan; run `build-index`semantic index: absent — `find` runs its lexical arm onlytag vocabulary: closed — 11 tags in TAGS.md; check a new one with `tags --validate`, adopt it with `tags --register`ctx bundles: 3 — cooking · legacy · onboarding — `ctx show <slug>` lists oneroot docs: SPEC.md · TYPES.md · PROPERTIES.md · TAGS.md
## Bundles[exit 0]2. Hand over one topic. okf ctx lists the context bundles. okf ctx <slug> prints that topic’s pages in reading order, with a token estimate.
ctx onboarding — Read this first on day one
required — read in this order: 1. <catalogue>/handbook/getting-started.md [Guide] Getting started ~158 tok First steps: accounts, tools, and where to find things 2. <catalogue>/handbook/glossary.md [Concept] Glossary ~62 tok Terms used here: "bundle" and "concept" 3. <catalogue>/handbook/ops/deploy.md [Runbook] Deploy ~150 tok How to deploy: build, ship, verifyreference — query when needed: - <catalogue>/handbook/security.md [Gadget] Security basics ~55 tok why: Background on passwords
4 entries (3 required, 1 reference), ~370 tokens for the required set[exit 0]3. Let the agent look things up. Through MCP it calls the tools okf_find and okf_read. In a shell it runs okf find and okf read. A section read returns only that section:
## Steps
Mix, rise, bake. Related: [pasta](pasta.md).What you get
Section titled “What you get”An agent that finds a concept with ranked search and reads one section of it, with no blind grep over files. Curate more topics with Context bundles.
Limits
Section titled “Limits”- The
primestate text, liketags --register, namesbuild_tagvec.py, which a Go install lacks [erpf]. Ignore it, or runokf build-tagvec --produce. See Known limitations.