Skip to content

API Reference parrot.knowledge.wiki

github-actions[bot] edited this page Dec 2, 2026 · 3 revisions

parrot.knowledge.wiki

View source

parrot.knowledge.wiki — LLM Wiki: Persistent Knowledge Base (FEAT-260).

Implements Karpathy's 3-layer LLM Wiki architecture, optimised for machine retrieval (tools and LLMs) rather than human-readable storage:

  • Raw Sources — :class:SourceCollectionManager tracks ingested documents with SHA-1 hash + mtime staleness detection (persisted in the wiki's SQLite plane).
  • Wiki Pages — structured by PageIndex at ingest time, then served from :class:WikiStore — a single-file SQLite retrieval plane (FTS5/BM25 + optional embedding cosine + typed edges) — with token-budgeted context packing (:func:pack_results) and progressive disclosure.
  • Schema — open-string categories/relations in the machine plane; OKF ontology extensions retained at the export boundary.

Public API::

from parrot.knowledge.wiki import (
    LLMWikiToolkit,
    WikiConfig,
    WikiPageCategory,
    SourceManifestEntry,
    WikiSearchResult,
    WikiLintReport,
    SourceCollectionManager,
    WikiBookkeeper,
    WikiCombinedSearch,
    WikiIngestOrchestrator,
    IngestReport,
    WikiStore,
    WikiPageRecord,
    PackedContext,
    pack_results,
)

Exports are resolved lazily (PEP 562) so lightweight consumers — the wikitoolkit CLI and the Claude Code integration hook — can import the retrieval plane (store/search/context/export) without pulling in the agent framework behind :class:LLMWikiToolkit.

Submodules

Architecture

Clients

Bots & Agents

Memory

Knowledge

Tools & Toolkits

Flows

Experts

Skills

Stores & Loaders

MCP & A2A

Server & APIs

Integrations

Outputs & A2UI

Prompts

Security

Operations

Migration

SDD Tooling

LLM Wiki

Deployment

Decisions

API Reference

Clone this wiki locally