Levain LabsLevain Labs
Platform

Wikis

A living knowledge base your agents read from.

A wiki is your workspace's knowledge base: a structured set of pages, kept fresh from raw source material, that every agent in the workspace can read. One workspace, one wiki.

Why wikis are a primitive

Resources point an agent at data that already exists in the right shape. A wiki goes further: it owns the shape. You hand it raw inputs — uploaded files, web pages, notes — and Levain distills them into pages organised under a table of contents you control.

That separation buys you two things:

  • Agents read clean pages. They don't need to track where a fact came from or when the underlying file last changed — the wiki abstracts that away.
  • Pages stay coherent over time. When new material contradicts old material, the wiki reconciles them in place instead of stacking yet another file on the pile.

The shape of a wiki

A wiki has three layers:

  • Sources — the raw material. PDFs, markdown files, text snippets you upload. Each source is immutable; replace one by deleting it and uploading a new copy.
  • Schema — the table of contents. A plain-markdown list of page paths with a short description of what each should cover.
  • Pages — the maintained output. Markdown files at the paths declared in the schema, kept in sync with the underlying sources.

You write the schema. Levain writes the pages. Other agents read both. You can also write pages directly — Levain treats them as authoritative and works around your edits rather than over them.

Write pages yourself

Create or update any page under the wiki root or inside the entities/, concepts/, or sources/ directories with a PUT to /api/v1/wikis/{id}/pages/{path}, or remove one with a DELETE to the same path. Seeded platform files (CLAUDE.md, DESIGN.md, VOICE.md, overview.md) are write-protected and return a 404 on those paths.

Every page you save is stamped with a user_edited_at timestamp in its frontmatter. The wiki maintainer reads that stamp and treats those pages as append-only: it may add new sections, wikilinks, or a Contradictions block, but it will not rewrite or remove content you wrote. Your words stay yours; the maintainer fills in around them.

You can also create and edit pages directly in the dashboard — open a page in the Pages tree, click Edit, and save.

Every page carries YAML frontmatter (platform, date, tags, whatever you put there), and search reads it. Two modes:

  • Keyword scores token matches, titles weighted. Good for names and exact terms.
  • Semantic ranks pages by meaning against an embedding index the wiki keeps at .wiki/embeddings.json. Good for topic-shaped asks, including a whole draft as the query.

Filters narrow either mode by frontmatter. platform=linkedin matches a field exactly (or a member of a list field like tags); date>=2026-01-01 and likes<=500 are inclusive bounds, compared as numbers when both sides are numeric and as strings otherwise, which orders ISO dates. String bounds are exact: date<=2026-08-01 excludes 2026-08-01T10:00:00Z, so bound at the field's precision. Every hit carries the page's frontmatter, so you can re-rank on your own metrics without fetching each page.

Similar pages ranks the index by one page's own stored embedding: the closest pages to this one, filtered to a platform if you like. Nothing is embedded per lookup.

Freshness

The maintainer rebuilds the index on every run, and a page you save or delete through the API is embedded (or dropped) as it lands, so it is searchable right away. Until a maintainer run has built the first index, semantic searches return keyword results and say so in a warning.

Always-on maintenance

Every wiki has a dedicated maintainer that wakes up whenever new sources arrive or you ask for a refresh. The maintainer reads the schema, reads the sources, and rewrites the pages so they reflect the current state of the material. Maintenance runs on Levain's account — keeping a fresh wiki costs you nothing.

A source whose text the wiki has already read is recorded as unchanged and not read again, even when it was re-wrapped or re-styled in between. Tag and category listings, pagination and legal pages from a crawl are recorded without being read, and so is an older crawl snapshot of a page the wiki has already read from a newer crawl.

Reads never block on maintenance: agents always see the last committed pages, even when a refresh is in flight.

Next

On this page