> ## Documentation Index
> Fetch the complete documentation index at: https://docs.genesiscomputing.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Team Wiki Learnings and Memory

> Enable durable, cross-thread memory so agents remember the conventions, source tables, and corrections they learn in one conversation and apply them in future ones.

## Overview

By default the Genesis **Team Wiki** is dormant — agents have no durable, cross-thread memory of what they learn. Once enabled, agents capture the facts and conventions they pick up in a conversation and apply them automatically in later, unrelated threads, with no one re-teaching them.

Two capabilities come online:

* **On-demand capture** — an agent (or a Flow) deliberately saves a learning about a table, view, or dataset.
* **Background extraction (the "Librarian")** — a background process reads completed human chat threads, distills the durable facts and conventions, and attaches them to the relevant data assets automatically.

Once a learning is captured, it surfaces in *any* future thread: when an agent looks up a table in the Context Graph, the attached conventions come back with it and shape the answer.

<Note>
  **Example.** A user teaches an agent, over a long thread, that revenue must come from a specific summary view (not a raw activity table), that one report type must be excluded to avoid double-counting, and that a blank country code means a specific internal category. Days later, in a brand-new thread, the agent computes that revenue correctly — applying all three rules — without being told again.
</Note>

## Correcting a stale learning

For the supported workflow to refine a Team Wiki learning or retire it from
the default final-filtered overlays, use its current identifier from
`wiki_read`, set the appropriate category with `wiki_edit`, and follow [Context
Tools → Team Wiki tools](/docs/Genbot-Toolkit/Context-Tools#team-wiki-tools).
If a retry follows an earlier same-text edit that did not persist its category
or privacy class, Genesis reapplies the missing state instead of silently
deduplicating the retry. To remove specific values from a learning and restore
its `metadata` privacy class, provide that class explicitly; see the [Context
Tools reference](/docs/Genbot-Toolkit/Context-Tools#team-wiki-tools) for the
edit behavior and stale-replay rules.

## How it works

There are three moving parts:

1. **Capture** — on-demand (`wiki_write`) or automatic (the Librarian extracts learnings from completed chat threads on a schedule).
2. **Anchoring** — every learning is attached to a qualified name, typically a data asset (a table or view) in the [Context Graph](/docs/User-Guide/Digital-Twin-And-Context-Graph). If the anchor is not catalogued in the graph, the learning remains available through a synthesized, learnings-only Team Wiki page and browseable qualified-name branch.
3. **Retrieval** — when an agent searches the data context, attached learnings come back automatically. This retrieval path is **always on** and does not depend on any agent-facing wiki tool.

For SQLite assets, retrieval also checks the historical connection-less anchor
used by older learnings and past SQL records when the asset is requested through
its current graph identity. Existing records therefore remain available without
being migrated; the tool reference documents the exact alias behavior.

<Warning>
  Enabling extraction is necessary but not sufficient for graph-backed retrieval: the **data your agents talk about should be catalogued in the Context Graph** so learnings can attach to the scanned asset and participate in its normal context. If an anchor is not yet in the graph, active authored learnings remain readable from the Team Wiki, but the page is marked as ungrounded until the asset is scanned.
</Warning>

## Prerequisites

Confirm all four before enabling:

| Prerequisite | Why it matters |
| - | - |
| **A current Genesis build** | The cross-thread-memory layers and the `wiki.*` settings must be present. |
| **Data catalogued in the Context Graph** | Recommended for graph-backed retrieval and metadata. An anchor that is not yet a graph node can still be read as a synthesized, ungrounded Team Wiki page; confirm your tables appear in the [Digital Twin](/docs/User-Guide/Digital-Twin-And-Context-Graph), and run a scan if they do not. |
| **A supported extractor model** | The Librarian uses an LLM for extraction, and only certain providers are supported (see below). |
| **Embeddings configured** | The graph's semantic anchor search relies on embeddings. Standard on managed deployments. |

## Supported LLM providers for the extractor

The extractor uses your deployment's **active LLM provider** — the one selected under **AI Providers**. The prefix in `wiki.extractor_model` names the provider, and it must be the active one:

| Active provider | `wiki.extractor_model` prefix |
| - | - |
| LiteLLM Proxy | `litellm_proxy/` |
| Amazon Bedrock | `bedrock/` |
| Anthropic (direct API) | `anthropic/` |
| Snowflake Cortex | `cortex/` |
| OpenAI | `openai/` |
| Databricks | `databricks/` |
| Gemini | `gemini/` |

Pick the model from the dropdown in **Advanced Settings** — it lists the active provider's models, already qualified with the right prefix. A value naming a provider other than the active one is refused when you save it.

<Warning>
  **Switching the active provider pauses the wiki until you re-pick its models.** A model chosen under the old provider still names that provider, so the wiki stops calling it rather than keep spending on a provider you moved away from. Genesis warns you when you make the switch. Choose new values for `wiki.extractor_model` (and `wiki.correction_classifier_model`, if set) from the new provider to resume background extraction.
</Warning>

## H2 correction classifier model

When `wiki.correction_classifier_enabled` is `true`, optionally set
`wiki.correction_classifier_model` (default `""`) to choose the model used by
the H2 correction scan. The value is read live when the scan runs, so no restart
is required. It must be a non-Claude model; leave it empty to use
`WIKI_CORRECTION_CLASSIFIER_MODEL`. With neither set, the scan stops with an
error that names both settings. See [Advanced Settings → Team Wiki / Librarian settings](/docs/Setup/Advanced-Settings#team-wiki--librarian-settings)
for the full configuration reference.

The H2 correction scan watches both ways an agent can rely on a Team Wiki
statement: a search result that surfaces it and a statement-tagged `wiki_read`
or hierarchical browse event. After the reliance, the scan checks the next
user turn in the same thread for a contradiction. If the same statement is
surfaced and read before that turn, Genesis classifies the reliance once rather
than spending twice or counting the same correction twice. Reads without a
thread are not scanned.

## Enable it

All settings live in **Config → Advanced Settings** under the `wiki` section. See [Advanced Settings → Team Wiki / Librarian settings](/docs/Setup/Advanced-Settings#team-wiki--librarian-settings) for the full reference of every flag; the steps below are the minimal path to turn on durable learnings.

<Steps>
  <Step title="Set the extractor model">
    Set `wiki.extractor_model` to a model from your active LLM provider (see above). **Do this first** — enabling extraction without a model causes errors every cycle.
  </Step>

  <Step title="Enable the Librarian">
    Set `wiki.librarian_enabled` to `true`. This arms background extraction (takes effect on the next cycle — no restart).
  </Step>

  <Step title="Enable the master gate">
    Set `wiki.write_enabled` to `true`. This is the master gate for the whole wiki feature.
  </Step>

  <Step title="Restart the server once">
    Restart so agents see the wiki tools. Background extraction and automatic learning-retrieval already work without it, but the restart completes the experience. Batch all your changes first, then restart once.
  </Step>

  <Step title="(Optional) keep settings safe on shared deployments">
    Leave `wiki.admin_trace_bodies_enabled` set to `false` on any shared/multi-tenant deployment. Optionally enable `wiki.admin_tools_enabled` (also needs a restart) to get operator inspection tools for auditing what was captured.
  </Step>
</Steps>

## Do I need to restart?

| Setting | Restart required? |
| - | - |
| `wiki.write_enabled` | **Yes** — controls whether wiki tools are attached to agents (built at startup). |
| `wiki.admin_tools_enabled` | **Yes** — registers operator tools at startup. |
| `wiki.librarian_enabled` | No — read live on each extraction cycle. |
| `wiki.extractor_model` | No — read live by the extractor. |
| `wiki.correction_classifier_enabled` | No |
| `wiki.correction_classifier_model` | No — read live when the H2 correction scan runs. |
| `wiki.correction_learning_write_enabled` | No |
| `wiki.correction_write_min_confidence` | No |
| `wiki.degradation_ranker_enabled` | No |

<Note>
  Even before a restart, once the gates are on the Librarian begins extracting, and the learnings it produces surface to agents automatically through Context Graph search. The restart is needed only so agents can use the *direct* wiki tools (read a full wiki page, write on demand) — not for capture or for the automatic recall that delivers most of the value.
</Note>

<Warning>
  A restart re-checks two environment kill-switches — `WIKI_LIBRARIAN_DISABLED` and `GENESIS_RUN_WIKI_LIBRARIAN`. If either is set to disable the Librarian in your service spec, the background loop will not start regardless of `wiki.librarian_enabled`. Your Advanced-Settings values persist across the restart.
</Warning>

## Verify it works

<Steps>
  <Step title="Teach it">
    In a substantial conversation (several turns), have an agent work with a real, catalogued table and state the conventions explicitly — the right source, any exclusion rules, what special values mean.
  </Step>

  <Step title="Wait at least an hour">
    The Librarian deliberately ignores threads that are still active; a thread must be idle for about 60 minutes before it is eligible for extraction, so it never extracts mid-conversation.
  </Step>

  <Step title="Open a fresh thread">
    Ask the same question plainly, with no rules given. The agent should apply the conventions and produce the right answer.
  </Step>

  <Step title="Confirm capture directly">
    Ask the agent to look up that table in the data context — it should now report attached learnings (a non-zero learnings count) quoting the conventions. With the admin inspection tools enabled, you can audit captured learnings directly.
  </Step>
</Steps>

## What to expect

* **\~1-hour lag for the durable layer.** Because of the idle-settling rule, a freshly taught convention will not appear in the wiki for about an hour. In the meantime, an agent can still recall a prior thread directly if asked ("bring up that report we did") — that path is immediate and needs none of this setup.
* **Conversations must be substantial.** Very short threads (a couple of messages) are skipped as too thin to extract from.
* **Ungrounded anchors remain browsable.** Active learnings about qualified names not in the Context Graph are served as synthesized Team Wiki pages and branches, marked as ungrounded until the corresponding asset is scanned.
* **Extraction uses the LLM.** Each eligible thread costs an extraction call; the Librarian backs off when there is nothing new.

## Troubleshooting

<AccordionGroup>
  <Accordion title="No learnings appear after enabling">
    The thread may not be idle 60+ minutes yet, may be too short, or the table may not be catalogued in the Context Graph. Wait past the settling window, use a substantial thread, and scan the connection into the graph.
  </Accordion>

  <Accordion title="Errors every cycle right after enabling">
    `wiki.librarian_enabled` is on but `wiki.extractor_model` is empty. Set the extractor model.
  </Accordion>

  <Accordion title="The background loop never runs">
    A `WIKI_LIBRARIAN_DISABLED` or `GENESIS_RUN_WIKI_LIBRARIAN` environment kill-switch is set in the service spec. Clear it and restart.
  </Accordion>

  <Accordion title="Agents do not see the wiki tools">
    `wiki.write_enabled` was flipped but the server has not been restarted yet. Restart once.
  </Accordion>

  <Accordion title="A setting change does not take effect">
    An environment override may be outranking the database value. Check the service spec for a matching env override and remove it.
  </Accordion>
</AccordionGroup>

## Related

<CardGroup cols={2}>
  <Card title="Advanced Settings" href="/docs/Setup/Advanced-Settings#team-wiki--librarian-settings">
    Full reference for every `wiki.*` setting, the model picker, and `wiki.db` storage and recovery.
  </Card>

  <Card title="Digital Twin and Context Graph" href="/docs/User-Guide/Digital-Twin-And-Context-Graph">
    Browse Team Wiki alongside the graph, and confirm your data is catalogued so learnings can anchor.
  </Card>
</CardGroup>
