Required
type- One of 11 house types: Tutorial, Howto, Reference, Explanation, Decision, Note, MOC, Runbook, Index, Attested Computation, Source
A knowledge base that agents can query
Zhiku (知库) turns Markdown files with OKF v0.3 frontmatter into a queryable knowledge base: full-text search (FTS5), link graph, supersede tracking, attested computation, and public read-only publication. Run it as a standalone service or embed it in your platform — single process, zero external dependencies, built-in SQLite + FTS5.
Production stance: single process, zero external dependencies, built-in SQLite + FTS5. Any lane failing degrades gracefully — no 5xx, no broken session.
Free forever: self-hosting is free, with no metering surface and no paywall; model costs for optional attestation are borne by the operator.
01
Markdown with YAML frontmatter is the single source of truth. The format is deliberately minimal — type is the only required field; trust, lifecycle, provenance, and links are optional families that round-trip without loss.
---
type: Decision
title: "Deploy target selection"
description: "Record of the production deploy target decision"
status: stable
trust: human-reviewed
superseded_by: null
tags: [deploy, infrastructure]
generated:
by: "human:alice"
at: "2026-11-15T09:00:00Z"
verified:
- by: "human:bob"
at: "2026-11-15T10:30:00Z"
---
## Background
We need a stable deploy target for the demo environment.
## Options
- node-a: legacy, limited capacity
- node-b: new, 4× capacity, same region
## Conclusion
node-b is the new deploy target. All demo traffic routes to node-b.
[Migration plan](/runbooks/migration-node-b)
[Capacity report](/references/capacity-node-b)
typestatusdraft | stable | deprecated (default: stable)superseded_bytrustunverified | machine-confirmed | human-reviewed (never stored directly)generatedverifiedtagsrelated02
Three complementary retrieval modes; link graph and auto-generated map are derived from the same bundle.
Unicode61 for general queries; trigram automatically selected for CJK ≥ 3 chars. LIKE escape hatch when both FTS indexes return empty. No external search service — pure SQLite.
Every [id](/path) Markdown link is a graph edge. resolveLink normalizes relative/absolute paths. Backlinks are indexed at write time; one-hop expansion over links/backlinks/related at read time.
index.md is reserved and generated — never hand-edited. Sorted by id, grouped by space then type, byte-identical for identical bundles. knowledge map CLI or API regenerates it.
03
Closed registry: a concept page selects a registered computation and supplies typed inputs; it cannot provide SQL, shell, URLs, or JavaScript. The attester re-runs the sanctioned computation and compares a canonical digest — deterministic, no LLM.
bundle.concept-count — total conceptsbundle.type-count — concepts by typebundle.trust-count — concepts by trust tierbundle.link-count — resolved linksPage declares computation: daas.<indicator> with typed parameters. Base URL + token come from operator env (KNOWLEDGE_DAAS_URL, KNOWLEDGE_DAAS_TOKEN, KNOWLEDGE_DAAS_ALLOWLIST). Absent config → runtime_unavailable, never falls back to page prose.
Page declares runtime + computation + inputs
Sanctioned runner executes, produces result
Canonical digest (SHA-256 of {computation, inputs, result})
Attester re-runs, recomputes digest, compares
Verdict: attested | failed | invalid | unavailable
04
An explicit, separate artifact: publishing for the public writes a stripped JSON projection into KNOWLEDGE_PUBLIC_DIR. The gateway reads this directory directly — anonymous requests never need a cell. Disabled when KNOWLEDGE_PUBLIC_DIR is unset.
{
"id": "decisions/deploy-target",
"type": "Decision",
"title": "Deploy target selection",
"description": "Record of the production deploy target decision",
"status": "stable",
"body": "## Background\n\nWe need a stable deploy target...\n\n## Conclusion\n\nnode-b is the new deploy target..."
}
Projection never exposes: rel, generated, verified, superseded_by, audience, visibility, sources.
05
Install the npm package, start the server, write a concept, search it — no external dependencies.
01
Install from npm (Node ≥ 22.5)
npm i -g @finddatatechnology/fd-knowledge
# or from source:
git clone https://github.com/FindDataTechnology/fd-knowledge && cd fd-knowledge
npm ci
02
Start the server (built-in SQLite + FTS5)
knowledge serve --port 3000 &
# or: npx @finddatatechnology/fd-knowledge serve
curl http://127.0.0.1:3000/api/knowledge/health
03
Create a concept
curl -X POST http://127.0.0.1:3000/api/knowledge/pages \
-H "Content-Type: application/json" \
-d '{"type":"Note","title":"First concept","body":"Hello Zhiku"}'
04
Search it
curl "http://127.0.0.1:3000/api/knowledge/search?q=Zhiku"
# → returns the concept with snippet
Agents connect through the read-only MCP face: knowledge mcp (stdio) exposes search, page reads, and feed-scoped reads.
use it · change it · deploy it · sell it — MIT. The licence posture for multi-agent collaboration: one licence, one success, take it and use it freely.
Zhiku itself is free forever: self-hosting is free, with no metering surface and no paywall; model costs for optional attestation are borne by the operator.
fd-knowledge · FindData Technology · 2026