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

# Agents

> The specialized AI agents behind Momentic steps, the versions available for each, and what every agent does.

Momentic uses several specialized AI agents. Each is versioned independently, so
you can upgrade one without changing the others. Older versions stay available
for backwards compatibility; set a specific version per agent in your
`momentic.config.yaml` [`ai.agentConfig`](/configuration/ai#ai-agentconfig)
block. Momentic generally announces agent deprecations at least 90 days in
advance.

<Tip>
  When upgrading an agent version, we recommend testing the migration in a
  branch first. In rare cases, AI model decisions can vary from version to
  version.
</Tip>

The recommended agents use the latest models. They are specifically tuned to
strongly respect [memory](/ai/memory) (insights saved from past runs) as well as
custom [knowledge base](/ai/knowledge-base) entries.

All agents have built-in fallback mechanisms to handle AI provider outages and
disruptions. During such downtime, agents may incur additional latency or
exhibit different behavior. However, Momentic uses multiple mechanisms such as
[memory](/ai/memory) and [knowledge base](/ai/knowledge-base), and
[failure recovery](/reliability/failure-recovery) to reduce the frequency and
impact of AI non-determinism on your tests.

| Agent              | Recommended | p50 latency          | Older versions |
| ------------------ | ----------- | -------------------- | -------------- |
| `locator`          | `v4`        | 3.6s                 | `v2`, `v3`     |
| `assertion`        | `v4`        | 2.8s                 | `v2`, `v3`     |
| `visual-assertion` | `v4`        | 2.7s                 | `v2`, `v3`     |
| `text-extraction`  | `v3`        | 4.2s                 | `v2`           |
| `failure-recovery` | `v2`        | Variable (multiturn) | `v1`           |

## What each agent does

<ParamField path="locator">
  Locates elements from a natural language description, used by **Click**,
  **Type**, and **Element check** steps. Strongly respects single quoted text
  values, builds more accurate caches, and achieves 15% lower latency compared
  to `v3`. Scores 10% better on our toughest web automation benchmark.
</ParamField>

<ParamField path="assertion">
  Evaluates natural language statements against a snapshot of the page, used by
  **AI check** steps. Strongly respects single quoted text values and discerns
  visual detail more accurately. Improves by 8% on our toughest web assertion
  benchmark with 22% reduced latency compared to `v3`.
</ParamField>

<ParamField path="visual-assertion">
  Evaluates natural language statements from a viewport screenshot. Reasons
  about position more accurately than previous versions. Scores 12% better on
  our toughest visual understanding benchmark.
</ParamField>

<ParamField path="text-extraction">
  Extracts structured data from the page given a JSON schema, used by **AI
  extract** steps. Handles nested objects and arrays.
</ParamField>

<ParamField path="failure-recovery">
  Generates and executes recovery steps when a recoverable failure is detected.
  Requires [`ai.failureRecovery`](/configuration/ai#ai-failurerecovery).
</ParamField>
