Zhiku 知库 knowledge base for agents

A knowledge base that agents can query

Files end.
Knowledge doesn't.

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

OKF v0.3 · Open Knowledge Format

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.

Example concept page (fictional)
---
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)

Required

type
One of 11 house types: Tutorial, Howto, Reference, Explanation, Decision, Note, MOC, Runbook, Index, Attested Computation, Source

Lifecycle

status
draft | stable | deprecated (default: stable)
superseded_by
Path to replacement concept when deprecated

Trust & Provenance

trust
Derived: unverified | machine-confirmed | human-reviewed (never stored directly)
generated
{ by: "actor", at: "ISO8601" } — actor: human: | team: | process: | producer/version
verified
List of { by, at } events — only human: yields human-reviewed

Organization

tags
String array
related
Concept id array for explicit relations

03

Attested Computation

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-stats

  • bundle.concept-count — total concepts
  • bundle.type-count — concepts by type
  • bundle.trust-count — concepts by trust tier
  • bundle.link-count — resolved links

daas (operator-configured)

Page 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.

Attestation flow (deterministic)
1

Page declares runtime + computation + inputs

2

Sanctioned runner executes, produces result

3

Canonical digest (SHA-256 of {computation, inputs, result})

4

Attester re-runs, recomputes digest, compares

5

Verdict: attested | failed | invalid | unavailable

04

Public Read-Only Publication

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.

Projection fields (provenance/ACL internals removed)
{
  "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

Five-minute quickstart

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.

MIT License

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