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

# Knowledge base

> Teach Momentic about your product (terminology, agent rules, and flows) so every AI-assisted step behaves consistently across runs.

<Warning>The knowledge base is in beta and may change.</Warning>

The knowledge base is where you tell Momentic what it can't infer from the page
alone: the words your team uses, the rules a specific agent should follow, and
the multi-step flows that describe how your product works. Momentic retrieves
the most relevant entries on every AI-assisted step and treats them as
top-priority context, so the agent stays consistent instead of guessing.

You manage it from the **Knowledge** section of the dashboard at
[app.momentic.ai/knowledge](https://app.momentic.ai/knowledge).

## Knowledge types

Every item is one of three types. Pick the type that matches what you're
teaching.

* **Terminology** defines a term your test or app uses so the agent resolves it
  the way your team means it. You provide a **canonical term**, a
  **definition**, and optional **examples** that ground how the term is used.
  Use this when a word is ambiguous, such as what "the selected tab" actually
  refers to in your UI.
* **Agent rule** is a binding instruction that one agent should follow at
  runtime. You give it a **title**, choose the **agent** it applies to, and
  write the **instruction**. Only the selected agent receives the rule, so you
  can shape behavior precisely, such as how elements are located or how a
  failure is classified.
* **Flow** is a known workflow with an expected outcome. You describe the
  **intent** (the user-level goal, like "log in"), the **steps** (one per line),
  and the **success state** (what should be true once the flow finishes). Flows
  give the agent a reliable map of how a journey through your product is
  supposed to go.

Definitions, instructions, and steps all support Markdown. Agents read these
fields verbatim, so be precise.

## Adding knowledge

1. Open the **Knowledge** section, click **Add knowledge**, and choose **Create
   manually**.
2. Choose a type. The form shows the fields relevant to that type.
3. Fill in the content and, optionally, set a scope.
4. Save. The item is visible immediately and becomes searchable within seconds
   once Momentic finishes indexing it.

To import many items at once, choose **Bulk upload** from the same menu instead
(see [Bulk upload](#bulk-upload)).

### Scope

By default, knowledge applies across your whole **organization**. You can narrow
an item so it's only retrieved in a more specific context:

* **Test scope** limits the item to a single test.
* **Environment scope** limits the item to a specific environment.

Leave a scope blank to keep it organization-wide. The detail view shows each
item's scope (Organization, Test, Environment, or App).

### Bulk upload

To import an existing knowledge base in one step, choose **Bulk upload** from
the **Add knowledge** menu and upload or paste a **JSON array** or **CSV** of
items. Up to 200 rows are accepted per upload, and the whole upload is validated
together: if any row is invalid, nothing is created and the error lists the
offending rows.

Each row carries a `type` of `TERMINOLOGY`, `AGENT_RULE`, or `FLOW` (defaulting
to `TERMINOLOGY` when omitted) plus that type's fields:

* **Terminology**: `canonicalTerm`, `definition`, and optional `examples`.
* **Agent rule**: `title`, `agentSubtype`, and `instruction`.
* **Flow**: `intent`, `steps`, and `successState`.

`examples` accept either a JSON string array or a newline-separated string (one
example per line), which is convenient for a single CSV cell. Add an optional
`appId`, `testId`, or `environmentId` to a row to [scope](#scope) it; omit them
to keep the item organization-wide. The dialog ships JSON and CSV samples you
can load as a starting point.

## Suggestions

Momentic captures **candidate** knowledge from your sessions and collects it in
the **Suggestions** tab for review. These are entries Momentic inferred about
your product that aren't part of your knowledge base yet.

* **Approve** a suggestion to promote it into your organization's knowledge
  base, where it starts informing agents.
* **Reject** a suggestion to discard it.

The **Organization** tab shows knowledge that's already in effect, and the
**Suggestions** tab shows what's waiting on your review. Each tab displays a
count so you can see whether there's anything to triage.

## Enabling and disabling

Active knowledge can be turned on or off without deleting it:

* **Enabled**: the item is live and eligible for retrieval.
* **Disabled**: the item is kept but excluded from retrieval.

Use the toggle on an item to switch between the two. Items that are still
pending review (or otherwise not yet active) must be approved or archived before
they can be toggled.

System knowledge authored by Momentic is managed for you, so it can't be edited
or disabled.

## Trust and conflicts

Each item carries a **trust** score from 0 to 100 reflecting how authoritative
it is. Manually authored knowledge is trusted more than auto-generated
suggestions, and Momentic's own system knowledge is trusted highest. When two
entries conflict, the agent prefers the higher-trust entry. Agent rules are
treated as binding instructions and are given extra weight.

## How agents use knowledge

On each AI-assisted step, Momentic semantically retrieves the entries most
relevant to what the agent is doing and injects them as top-priority context. If
an entry directly addresses the task, the agent follows it instead of guessing.
When the agent relies on an entry in its written reasoning or summaries, it
cites the entry inline so you can trace which knowledge influenced a decision.

## Versioning and usage

Editing an item records a new version, and the **About** tab keeps the full
version history alongside who changed what and when. The same panel surfaces
usage signals, such as how many times an item has been retrieved and when it was
last used, so you can tell which knowledge is being used.
