The idea: searchable documents with sources

A wiki lets mini-a find a small amount of relevant evidence instead of placing every document in every prompt. Hydration imports sources. Retrieval finds evidence. A dream is an optional maintenance pass; it is not required for every question.

Create a disposable folder containing a few Markdown documents. From the Mini-A package or checkout, preview ingestion:

mini-a wikihydrate=true wikiroot=./demo-wiki source=./docs dryrun=true

Review the reported source files, then create the wiki:

mini-a wikihydrate=true wikiroot=./demo-wiki source=./docs
mini-a wikiquery=true wikiroot=./demo-wiki goal="What do these documents say about installation?"

Hydration writes a local wiki and compacts its serving index; stop other readers and writers of that wiki first. Query mode opens it read-only. Model-backed import or answers require your configured model; deterministic normalization does not require a model for every source.

Expect an answer grounded in the imported documents. If retrieval finds nothing, inspect the source paths and published index before changing models. Follow wiki maintenance for graphs, reorganization, federation, and recovery. Utility-specific flags are listed in Wiki utilities.

Wiki Knowledge Base

For long-lived, cross-session knowledge that multiple agents or users should share, mini-a supports a persistent Markdown wiki following the LLM Wiki pattern. Agents read from and write to structured pages stored on the filesystem, S3, or Elasticsearch/OpenSearch — knowledge survives restarts and is readable by any agent pointing at the same root.

# Read-only wiki on the filesystem
mini-a usewiki=true wikiroot=/shared/wiki goal="..."

# Read-write wiki on the filesystem
mini-a usewiki=true wikiaccess=rw wikiroot=/shared/wiki goal="..."

# Read-only wiki packaged as a portable archive
mini-a usewiki=true wikiroot=/shared/reference.okt goal="..."

# Read-write wiki on Elasticsearch/OpenSearch
mini-a usewiki=true wikiaccess=rw wikibackend=es \
  wikiurl=http://localhost:9200 goal="..."

Quickstart: hydrate, sleep and query a wiki

The fastest way to get a searchable wiki from a folder of documents takes three commands: hydrate (create or update the wiki from your sources), sleep (an optional dream pass that reorganizes it) and query (ask it questions). Each command handles its own setup, so you don’t need to know any usewiki or wikiaccess flags.

1. Hydrate

mini-a wikihydrate=true ingests a folder, git repository or page URL into a local wiki, then compacts its search index.

2. Sleep (dream)

mini-a wikidream=true merges duplicates, fixes links, rebuilds indexes and refreshes the graph. It zips a backup before changing anything.

3. Query

mini-a wikiquery=true opens the wiki read-only, in the terminal, in a browser, or for a single question.

Before you start

  1. Set a model. Run export OAF_MODEL="(type: openai, model: gpt-5, key: '...')", or pass model=... or mode=<preset> to any command below. You can skip the model during hydration with ingestmode=raw. Sleeping and querying always need one.
  2. Choose two paths. source is the folder you want to learn from (Markdown, text, HTML, Office, RTF, PDF and images are supported). wikiroot is where the wiki will live. Hydrate creates wikiroot if it doesn’t exist.
  3. Stop other users of the wiki. Close other readers and writers before you hydrate or dream. Both operations finish by compacting the serving index offline.

Every command has two spellings, and both take the same arguments: the installed mini-a command (or opack exec mini-a), and the job file itself (ojob utils/<job>.yaml). You can also write --wiki-hydrate, --wiki-dream and --wiki-query in place of the key=true forms.

Step 1 — Hydrate

Preview first, then ingest for real:

# 1a. See what would be ingested; writes nothing
mini-a wikihydrate=true wikiroot=./mywiki source=./docs dryrun=true

# 1b. Create/update the wiki
mini-a wikihydrate=true wikiroot=./mywiki source=./docs

# Same thing, using the job directly
ojob utils/wikiHydrate.yaml wikiroot=./mywiki source=./docs
Option What it does
dryrun=true Report planned writes without changing anything
prune=true Remove previously ingested pages whose source file no longer exists
ingestinclude= / ingestexclude= Comma-separated path fragments that limit which files are read
ingestmode=raw Copy sources without model distillation (no model calls during ingestion)
semantic=true Add LLM-extracted semantic relationships to the wiki graph (slower; optional)
dream=true Chain a wiki dream (step 2) right after ingestion, before compaction
compact=false Leave the serving index uncompacted

Re-running hydrate is incremental: it skips unchanged sources, and manually edited pages show up as conflicts instead of being overwritten.

Step 2 — Sleep (dream)

In mini-a the “sleep pass” is called a dream. When run against a wiki, it tidies the content: it merges near-duplicates, repairs broken links, regenerates index.md pages and refreshes the graph. This step is optional, but it helps once a wiki has grown or when it is built from many sources.

# 2a. Preview the reorganization; model-free and changes nothing
mini-a wikidream=true wikiroot=./mywiki dreamwikimode=plan

# 2b. Reorganize for real (default mode: reorg)
mini-a wikidream=true wikiroot=./mywiki

# Optional: group related pages under topic sections
ojob utils/wikiDream.yaml wikiroot=./mywiki organize=topics
  • Backup and undo. Before a mutating mode (reorg, apply, repair, auto) runs, the whole wiki is zipped to ./mywiki.predream-<timestamp>.zip. If the backup fails, the dream doesn’t start. To undo, delete the wiki folder and unzip the backup in its place. backup=false skips the backup.
  • Other modes. dreamwikimode also accepts auto, apply, repair, reindex, graph and indexes. dreammaxsteps (default 40) caps model steps, and instructions="..." adds guidance to the reorganization.
  • Not the memory dream. wikidream=true reorganizes a wiki. The top-level mini-a dream=true runs the agent-memory Dreams (Sleep Pass).

Step 3 — Query

# Interactive terminal console
mini-a wikiquery=true wikiroot=./mywiki

# Browser UI at http://localhost:8888
mini-a wikiquery=true wikiroot=./mywiki onport=8888

# One answer, then exit
mini-a wikiquery=true wikiroot=./mywiki goal="How do we deploy?"

# Job form
ojob utils/wikiQuery.yaml wikiroot=./mywiki web=true onport=8888

The query command opens the wiki read-only with the new wiki mode preset: wiki search and graph tools are on, and shell, file writes and delegation are off. Pass mode=poweruser for the full toolset, or mode=none to skip presets. Retrieval settings match those used by hydrate and dream, so queries run against the published index. Query never creates a wiki and refuses to open an empty one.

Useful console commands once it’s open:

/wiki context            what the wiki holds and how it is searched
/wiki search caching     find pages
/wiki read guides/x.md   read one page
/graph ...               explore relationships between pages

Keep it fresh

  • Sources changed: re-run step 1, adding prune=true to drop removed files.
  • Wiki is getting messy: run step 2 with dreamwikimode=plan, review the proposal, then run it for real.
  • Several wikis: pass wikimounts=... to wikiquery. See Configuration → Wiki Knowledge Base.

Troubleshooting

Symptom Fix
Wiki directory not found ... Hydrate it first Dream and query need an existing wiki; run step 1 first
Query warns “No published search index” The wiki has pages but no serving index; hydrate or dream it again
Query fails with “wiki has no pages” wikiroot points at an empty folder; check the path
Answers miss pages you know exist Check /wiki context. Readers must use the same wikilexical (OAF_MINI_A_WIKI_LEXICAL) as the publisher
Model errors Set OAF_MODEL or pass model= / mode=

For job internals and option precedence, see Advanced → Wiki lifecycle jobs.

The agent uses the wiki action to interact with the knowledge base:

{ "action": "wiki", "params": { "op": "search", "query": "authentication decision" } }

Supported operations:

Operation Description
context Compact overview: page count, sections, mounts, recent log — start here
list List all pages (optional prefix filter; add withMeta=true for title+description)
read Read a specific page
search Full-text search across all pages and mounts
retrieve Bounded, cited evidence packet (ranked excerpts, line ranges, budgets) instead of whole pages
lint Validate wiki health (broken links, orphans, stale pages, near-duplicates)
write Write or update a page (requires wikiaccess=rw)
mounts List active read-only mounts
attach Mount a read-only wiki (name, backend, root)
detach Unmount a previously attached wiki

When a brand-new wiki is opened with wikiaccess=rw, Mini-A auto-bootstraps three starter pages: AGENTS.md (ingestion workflow and contribution rules), index.md (entrypoint and table of contents), and log.md (append-only journal of every write, delete, and move). AGENTS.md and log.md are protected and cannot be deleted.

Start each session with /wiki context for a compact overview, then search before reading any page.

The filesystem backend also accepts local .zip and .okt archives as roots or mounts. Archive entries must contain index.md at their root; they are always read-only, including when wikiaccess=rw is supplied. If an archive includes .mini-a-wiki-graph/graph.json, Mini-A can consume it for read-only graph hints without changing the archive.

Wiki ingestion

ingestlayout=source preserves sanitized source folders for new mappings. Ingestion rewrites local Markdown page links, tracks moved destinations and refreshes referring pages when missing targets appear. Explicit /dream reorg topics organizes related pages under existing shallow sections with the normal approval gate. See organization and move recovery.

Use mini-a-ingest.yaml to turn a documentation folder, a local or remote git repository, or a web page into distilled wiki pages. Discovery, filtering, chunking, change detection, writing, and finalization are deterministic; distillation and image descriptions call the model.

# Preview a documentation ingest
ojob mini-a-ingest.yaml ingestsource=./docs wikiroot=/tmp/wiki ingestdryrun=true

# In the console (requires usewiki=true wikiaccess=rw)
/ingest ./docs reference

An ingest records source provenance (source, source_ref, source_hash, ingested) and skips unchanged sources unless ingestforce=true. Oversized files are skipped, not truncated; accepted long sources are split at headings. If a distillation prompt overflows the model’s context window, ingestion automatically splits the source and synthesizes the parts (wikimaxprompttokens=0, bounded by wikiingestmaxcalls=32 calls per source). If recovery can’t finish, the previous page is kept.

Repeated ingestion is a non-destructive upsert: sources that disappear are reported and their pages preserved unless you opt in to ingestprune=true, which removes only pages owned by the same destination, origin, and section, and only after complete discovery. Hand-edited pages and pages whose ownership cannot be proven become conflicts rather than being overwritten, and ingestforce=true never overrides that. Preview any run with ingestdryrun=true; ingestmode=normalize or raw guarantees no model is called.

ojob mini-a-ingest.yaml ingestsource=./docs wikiroot=./wiki ingestmode=normalize ingestprune=true ingestdryrun=true

Office, RTF and PDF extraction, image descriptions and passive structured-file ingestion are also supported. Use /ingest recovery to inspect interrupted work, then explicitly resume, discard, or start an independent ingestion of disjoint pages. See Configuration → Wiki ingestion for the ingest* options, manifest, recovery, and single-writer limits.

Wiki Console Commands

/wiki context          — compact overview: page count, sections, mounts, recent log
/wiki list [prefix]    — list pages, optionally filtered (--meta for title+description)
/wiki tree [prefix]    — list pages as a hierarchy
/wiki browse [prefix]  — interactive wiki page browser
/wiki read <page.md>   — print a page
/wiki search <query>   — full-text search across all pages and mounts
/wiki backlinks <page> — list pages linking to a target page
/wiki lint             — run health checks
/wiki reindex          — rebuild search index (requires wikiaccess=rw)
/wiki mounts           — list active read-only mounts
/wiki attach <name> [backend=fs] [root=path]  — mount a read-only wiki
/wiki detach <name>    — unmount a wiki
/stats wiki            — show per-operation stats for the session

Choosing Between Wiki and Memory

  usememory usewiki
Scope Per-session or per-user global Shared across all agents/users
Format Typed JSON sections Human-readable Markdown pages
Survives restart With persistence channel Always
Best for In-flight reasoning, decisions Durable encyclopaedic knowledge

Use both together: the agent reasons with memory during a session, then distils durable findings into wiki pages for future sessions and other agents.

See Configuration → Wiki Knowledge Base for the full parameter reference.

Cross-wiki graph hints

When a primary wiki mounts reference wikis and graph support is enabled, wikigraphcross=true (default) can extend graph hints across mounts at query time. It follows explicit @name/path.md links and can join pages with shared tags, aliases, or semantic concepts. The expansion is read-only and never merges or persists graph data between wikis; use /graph cross <path> to inspect the links for one page.

Wiki absorption and maintenance

Wiki Absorption proposes destination-organized knowledge from multiple local wikis. Select pages, sections, tags or topics, review a saved plan, then apply its exact changes. Planning may use a model; apply and resume do not. Repeat runs preserve provenance and flag destination edits as conflicts.

Mounts can also be used without a persistent primary: supply nonempty wikimounts and omit wikiroot to get a generated read-only catalog. Its index.md links to attached mounts; navigation, federation and per-mount graph statistics remain available. It creates no primary index or graph and rejects writes and maintenance even with wikiaccess=rw.

For offline V2 cleanup and an exportable graph view, see Advanced → Wiki maintenance utilities.

Wiki operations manager

mini-a wikiman=true wikiroot=./wiki opens guided inspection without a model; add explicit wikiaccess=rw for reviewed writes and maintenance. Menus cover pages, lint, indexes, compaction, graphs, Dream, ingestion and absorption recovery. Mounts remain read-only. See guided manager and replay commands.

Wiki retrieval v2 and bounded retrieval

Repeated writes/ingestion automatically publish a fresh base when incremental depth reaches 32. Failed publication staging is cleaned up; older complete generations may still require offline compaction. A failed configured bundle export retains ingestion recovery rather than claiming success. See retrieval configuration.

Wiki retrieval V2 is enabled by default. Published wikis use a versioned passage index; unpublished wikis retain legacy retrieval with a warning until an explicit writable reindex. Invalid or incompatible published artifacts remain errors.

  • retrieve is a bounded workflow (search, inspect, expand, prepare for synthesis) that returns compact evidence entries with citations, line ranges, ranking score components, and used-versus-configured budgets. It never returns whole pages and never writes an ungrounded answer. Tune it with maxCandidates, maxInspected, maxGraphExpansion, and maxBytes; use expandGraph=true to request bounded graph expansion or expandGraph=false to disable it. With graph hints enabled, weak lexical coverage can trigger bounded expansion automatically.
  • wikiretrievalv2=true (default) switches search, retrieve, and context assembly to a shared, versioned passage engine. Markdown stays authoritative; a separate, rebuildable serving generation holds passages, reverse-link postings, and immutable evidence blocks.
# Build the v2 serving generation explicitly (writable wiki)
ojob mini-a.yaml dream=true usewiki=true wikiroot=/path/to/wiki wikiaccess=rw wikiretrievalv2=true dreamwikimode=reindex

# Readers consume the published generation without building or migrating it
mini-a usewiki=true wikiroot=/path/to/wiki wikiretrievalv2=true goal="..."

Results distinguish nativeScore (engine relevance) from rankScore (final ranking) and include scoreComponents and retrievalMethod; the compatibility score is neither a probability nor always native Lucene relevance, so prefer the explicit fields. Search returns the highest-ranked complete candidates that fit maxBytes (default 16000) and reports outcome: partial when it omits some. Each V2 source needs its own compatible build, and HTTP/S3 readers consume a published bundle. Read-only readers adopt the published index analysis by default (readPolicy=auto); readPolicy=strict requires a configuration match. With graph expansion, cross-wiki links and shared keys stay within the selected federation, honor the wikigraphcross* settings, and are re-validated against source revisions when disclosed. Retrieval telemetry (wikitelemetry=true) keeps aggregate counters only.

Search automatically spans the selected federation, including mounts-only catalogs, with shared V2 budgets and global ranking. Mixed V1/V2 searches retain each source’s engine. Native agent search presents up to five candidates within 4,000 serialized characters, including coverage warnings; programmatic results retain detailed scores and diagnostics. Partial coverage does not establish that a topic or feature is absent.

Graph indexing derives bounded title/source-identifier joins during a writable rebuild. These use the alias join switch and existing revision and permission checks; they do not write cross-wiki links. Expansion defaults to at most five candidates and 256 inspected edges, with maxima of ten and 4096.

Multi-wiki MCP clients call context() to discover mounts, then pass the optional wiki selector ("*", "primary", a mount name, or an array) to mcp-wiki tools. See Configuration → Wiki retrieval v2 for the tuning object and MCP Catalog for server details. Skill libraries built on the same engine are covered in Virtual Skills.

Published analysis and source reads

Read-only V2 readers default to wikiretrievalconfig='(readPolicy: auto)': each mount adopts its published generation’s index analysis settings. Synonyms, query expansion, relevance feedback and budgets stay reader-controlled. readPolicy: strict requires a match and reports incompatible-generation with differing fields. Writable builds still use configured settings and need explicit reindexing to change the contract.

wiki op="context" exposes retrieval.analysis; search/retrieve source diagnostics include policy, generation, source (generation or configured), effective settings and differingFields. Tight output budgets can report analysisOmitted: "output-budget"; use context for the full analysis. Native agent search supplies at most five compact candidates in a 4,000-character envelope, preserving partial-coverage warnings. Partial coverage cannot establish absence.

Control pages (AGENTS.md, index.md, log.md, including section-local copies) stay excluded from passage search. Explicit open/navigate/read/grep uses bounded source reads with section/range selection, mount routing and revision-checked continuations. Ordinary content pages still need valid V2 serving bindings; corrupt artifacts remain errors. Published outline, frontmatter metadata, title and description are checked against the source page. page-metadata-binding-failure reports the page and differing field names without exposing metadata values; repair with an explicit writable rebuild rather than a read-time migration.

Use nativeScore for engine relevance and rankScore for final ranking when supplied. The compatibility score varies by result path and is not a probability; scan fallback has no native lexical relevance.

Manage knowledge in a browser

Use Wiki Studio for a separate local workspace with page editing, source previews, graph builds, background jobs and recovery snapshots. Browsing, raw editing and structural graphs need no model. The graph and folder maintenance guide covers the shared engine operations.

Share a wiki with an MCP client

Try the bundled Team Handbook to give a client a searchable wiki and a guide to the team’s terminology. From a Mini-A checkout with OpenAF and oJob-common installed, copy the public sample and build its search index once.

handbook=$(mktemp -d)
cp -R examples/wiki-mcp-starter/wiki/. "$handbook/"
ojob utils/wikiOps.yaml operation=wiki.reindex "wikiroot=$handbook" wikiaccess=rw confirm=true
ojob mcps/mcp-wiki.yaml "wikiroot=$handbook" 'label=Team Handbook' \
  wikiguide=team-handbook-guide/ modern=true host=127.0.0.1 onport=8888

In a second terminal, connect Mini-A. Ask Where do I check a delayed dispatch? The guide supplies the team’s term scheduler, and the answer should cite operations/scheduler.md.

mini-a useskills=true "mcp=(type: remote, url: 'http://127.0.0.1:8888/mcp')"

A client can call context and read the returned guidePath. A skills-capable client can also discover the handbook guide and its references. To publish your own, point wikiguide at a folder with a trailing slash, give its SKILL.md a unique name and description, and include only files meant for readers. A path to a single Markdown file supplies a guide page. Skill publication needs modern Skills support in OpenAF and oJob-common. Reindex after editing V2 content and restart the MCP server after changing a published skill. Client configurations for VS Code, Claude, Codex and OpenCode.

To use the running server in VS Code, open the Command Palette, choose MCP: Add Server, select HTTP and enter http://127.0.0.1:8888/mcp. In Claude Code, run claude mcp add --transport http team-wiki http://127.0.0.1:8888/mcp and check the connection with /mcp. In either client, try the same delayed-dispatch question.

For a server with several mounts, each mount can have its own wikiguide. Set wikimountshint=true to include a short mount directory in the agent prompt and supported MCP tool descriptions. It lists up to wikimountshintmax mounts (12 by default). Restricted readers omit mount hints and wiki-specific skill resources.