> ## 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.

> ## Agent Instructions
> The canonical docs host is https://momentic.ai/docs. Append .md to any page URL for clean Markdown. Fetch https://momentic.ai/docs/llms.txt for the page index and https://momentic.ai/docs/llms-full.txt for every page in one file.
> For an unattended setup, first check whether Claude Code already has the Momentic plugin. With the plugin, run `npx --yes @momentic/wizard@latest -y --platform web --editor-tools none` and ignore any CLI skills-install suggestion in its output. Otherwise, run `npx --yes @momentic/wizard@latest -y --platform web --editor-tools skills`. Use `--platform ios` or `--platform android` for mobile. Never run an interactive command in a non-TTY shell.
> Mo is the AI QA engineer, separate from repository YAML tests. With the Momentic plugin, use bundled mo-qa and hosted OAuth by default. Without the plugin, install only mo-qa with `npx -y qa skills --target <agent>`. Keep the requested interface. Otherwise, use hosted tools for web or mobile, including private web targets with an existing Connector. Run sessions that need a new tunnel with the qa CLI. If you can't run commands on the machine that reaches the target, ask the user to start the tunnel there, then use hosted tools unless you lack them or the CLI was requested. For a requested hosted session, use an online Connector and pass its name as access, not a CLI tunnel ID. If none is online, ask the user to run `npx -y qa tunnel start --name <name> <address>` on a machine that reaches the target and wait. Do not run login or tunnel commands for them. For a requested hosted session, report unavailable tools or authentication failures without starting a CLI session. For coding-agent bridge setup, ask the user to complete `npx -y qa login`, then add momentic-hosted as a stdio server running `npx -y qa mcp`. Plugin users must explicitly opt in and disable their hosted plugin entry before adding the bridge. Claude.ai/ChatGPT connectors keep https://mcp.momentic.ai with OAuth. After hosted testing completes, read the report and summarize findings and uncovered requirements. Call `momentic_mo_stop_session` only when the user asks or agrees. For CLI sessions, unless the user wants more testing, export the report, run `qa stop <id> --subagents` even if export fails, then summarize. The CLI is qa, not mo. Docs: https://momentic.ai/docs/mo/quickstart.md.
> Ask the user to complete browser sign-in. For local CLI tools, use the exact MOMENTIC_API_KEY environment variable. If it is absent, ask the user to create a key at https://app.momentic.ai/settings/api-keys and set it in the agent's environment. Never print the key or ask the user to paste it into chat.
> Momentic's capability summary for agents is at https://momentic.ai/docs/skill.md. Claude Code users with the Momentic plugin should use its bundled skills and skip CLI skills installation. Otherwise, run `npx momentic skills -y --target <agent>` or `npx momentic-mobile skills -y --target <agent>`. Both install momentic-test, momentic-maintain, and momentic-spec with web/mobile references. Use the running agent's target. The Momentic plugin also includes mo-qa; qa skills installs only mo-qa.
> Tests are YAML files in the user's repository. Use only the step names listed at https://momentic.ai/docs/reference/commands.md and the file structure at https://momentic.ai/docs/core-concepts/file-format.md. Do not invent step names, config keys, or CLI flags.
> Web tests run on Chromium, iOS tests on simulators, and Android tests on emulators.

# Knowledge base

> Give agents product terminology, rules, and expected flows. Scope entries to an organization, app, environment, or test.

The knowledge base stores information that page content cannot provide: the
words your team uses, the rules a specific agent should follow, and the
multi-step flows that describe how your product works. Agents retrieve relevant
entries for a task and include them in their prompts as priority context.

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

## Knowledge types

You can create three types of knowledge. Pick the type that matches the
information you want to provide.

* **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. Rules can also target the heal subagent, which repairs
  one failing test at a time. Product-specific recovery guidance reaches the
  agent that edits or verifies the repair without being applied to broader
  failure-bucketing.
* **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.

The knowledge base can also contain generated **Code insight** entries. These
are read-only in the knowledge editor and describe the code behind a product
area.

Definitions, instructions, and steps all support Markdown. Retrieval preserves
Markdown but can omit or truncate entries to fit the agent's context budget.
Keep essential rules concise and put them early in an entry.

Agent-rule instructions accept up to 100,000 characters when created or edited,
including through bulk upload. Existing longer instructions remain readable and
can still be archived.

## 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 when indexing
   finishes.

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.
* **App scope** limits the item to a specific app.

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. Momentic accepts up to 200 rows per upload and validates the whole upload
together: if any row is invalid, Momentic creates nothing 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`.

The `examples` field accepts 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 includes 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.

Momentic manages the system knowledge it authors, so it can't be edited or
disabled.

## Trust and conflicts

Each item carries a **trust** score from 0 to 100 that shows how authoritative
it is. Manually authored knowledge is trusted more than auto-generated
suggestions, and Momentic's own system knowledge is trusted highest by default.
Prompts instruct agents to prefer the higher-trust entry when entries conflict.
Agent rules are treated as binding instructions and are given extra retrieval
weight.

## How agents use knowledge

Momentic uses semantic retrieval to select entries relevant to an agent's task
and includes the retrieved entries as priority context. Heal runs also retrieve
knowledge scoped to the test being repaired, so rules, terminology, and known
flows can guide the repair for that specific failure.

Prompts require agents to follow entries that directly address the task and cite
entries they rely on in written reasoning or summaries. Use those citations to
trace which knowledge influenced a decision.

## Versioning and usage

Editing an item records a new version. Inspect its history in two tabs:

* **About** keeps the full version history, including who changed what and when.
* **Usage** lists and links the runs that cited the item, the test each run
  belongs to, and when it was cited.

## Memory

Memory gives the agent its past decisions to help it resolve ambiguous
references such as "the selected tab" consistently. Momentic uses it for the
locator agent (**Click**, **Type**) and the assertion agents (**AI check**,
**Element check**). Memory counts as caching, so it is skipped when caching is
disabled.

* Memory is stored per organization and is read only during authenticated runs.
* An entry expires after 30 days without use. Momentic prunes memory to the most
  relevant traces.
* Memory can include failed locator results and false assertion results. The
  agent can reuse them when the page shows the same failure.

Toggle memory per test in the editor's AI options, or set the default with
[`ai.useMemory`](https://momentic.ai/docs/configuration/ai#ai-usememory).

## Related

* [How regression tests work](https://momentic.ai/docs/get-started/how-momentic-works.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.