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

# AI agents

> Give agents runtime evidence through Vexlo's MCP tools.

Vexlo's MCP server gives AI agents access to recorded code execution. An agent can inspect
which functions ran, their arguments and return values, errors and retry attempts, and
observed relationships between functions. It can use that evidence with the source, tests and
other context available for its task.

Connect Vexlo to the agent's MCP client, then query the recorded data as needed. The same
recordings are available through the [web UI](https://docs.vexlo.ai/ui.md) and [HTTP API](https://docs.vexlo.ai/reference/http-search.md).

## Execution as task context

Source code describes what a service can do. A recording shows what its instrumented
functions did in one execution, including the data they received and returned. Function
metadata connects those individual recordings to observed callers, callees and retained
examples.

An agent can start with a request identifier, a function, a service or a symptom. To examine
a function, find its observed callers and inspect their executions. To explain an unexpected
response, follow the calls and data that produced it.

## Available evidence

| Evidence | What the agent can inspect |
| - | - |
| Recorded executions | Call relationships, attempt status, elapsed timing, previews and selected full inputs, outputs, errors or logs. |
| Function usage | Observed callers and callees, counts and retained executions of a function. |
| Related recordings | Executions sharing recorded tags, such as request or business identifiers, across services. |
| Recording coverage and health | Observed services, reported loss, storage state and recent service activity. |

A read token determines which teams the MCP server can query. Service and environment filters
narrow those queries to the relevant deployment. Requested teams cannot expand the token's
access. Give the agent the available identifiers and scope along with the task, so it can
find the right execution before interpreting its data.

## From a question to recorded behavior

In the [checkout investigation](https://docs.vexlo.ai/guides/investigation.md), an agent received an order identifier,
an unexpected total and the relevant pricing rule. It searched for the recording, followed
the pricing branch and read a successful discount call's input and output. The customer had
`loyalty_member: true`, but the function returned zero.

Comparing that input with the supplied source identified a field-name mismatch. The graph
also contained a recovered payment error; that error was separate from the incorrect price.
The runtime data helped the agent locate the calculation before proposing a correction.

[Use execution data](https://docs.vexlo.ai/agents/use-data.md) explains the query workflow and how to interpret the
results. It also covers progressive disclosure for managing the agent's working context.
The [MCP tool reference](https://docs.vexlo.ai/reference/mcp.md) provides exact argument and response contracts.

## Using the evidence

The agent's host provides the tools for its wider task. Vexlo provides recorded execution;
source inspection, code edits, test runs or other actions use the host's other tools. In the
checkout case, the agent proposed a source correction. A regression test and a new
recording then verified that input case.

Match recordings to the relevant application revision and check recording quality before
relying on an absence or an apparent dependency. Observed usage is evidence of what ran;
it does not enumerate every possible caller or input.

> [card] [Connect an agent](https://docs.vexlo.ai/agents/connect.md)
>
> Install the MCP server and connect it to your instance.

> [card] [Use execution data](https://docs.vexlo.ai/agents/use-data.md)
>
> Find relevant recordings and use their calls and values as task context.


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