> For the complete documentation index, see [llms.txt](https://ai-security-docs.akto.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ai-security-docs.akto.io/akto-argus-agentic-ai-security-for-homegrown-ai/agentic-red-teaming/concepts/smart-automated-testing.md). Agents can also search and read this documentation through its [MCP server](https://ai-security-docs.akto.io/~gitbook/mcp).

# Smart Automated Testing

AI-driven red teaming that reasons, acts, and iterates to find vulnerabilities in agents and MCP servers.

Smart Automated Testing is Akto's AI-powered scan mode in which an intelligent agent takes over the execution of probes. Rather than mechanically replaying pre-defined payloads, the agent reasons about each probe, forms a plan, sends requests to your agent or MCP server, observes the response, and refines its approach across multiple attempts to determine whether a vulnerability is real.

## How It Works

The agent follows a **Think → Plan → Act → Observe** loop, repeating until it either confirms a vulnerability or exhausts its attempts. Each iteration builds on what the previous one learned.

### Execution Loop

| Step                         | What Happens                                                                                                                                                                                                                                                                     |
| ---------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Thinking**                 | The agent reads the probe scenario and baseline request, then reasons about what a successful exploit looks like: which parameters to change and which response signals matter (status code, body similarity, error messages).                                                   |
| **Plan (Attempt N)**         | Before sending a request, the agent decides exactly what to change and why, for example swapping the auth token for a different identity's token, altering an object ID, or crafting a malformed payload.                                                                        |
| **Action (Attempt N)**       | The agent sends the crafted request. The full request is logged: method, URL, headers, and body.                                                                                                                                                                                 |
| **Observation (Attempt N)**  | The agent reads the response (status code, body, headers) and judges whether it indicates a vulnerable or secure state. If the response is not conclusive, the agent adjusts and tries again.                                                                                    |
| **Vulnerability Validation** | After all attempts, the agent checks the key indicators defined in the probe scenario, for example an HTTP response code of `2XX`, a response body that matches the baseline by more than 90%, and no error message. If the criteria are met, the issue is flagged as confirmed. |

## How to Run Smart Automated Scans

Smart Automated Testing runs the same way as a standard scan: you select the probes you want to run, and the AI agent executes them.

{% stepper %}
{% step %}

### Open the Collection

Go to **Agentic AI Discovery > Collections** and open the collection that contains your agent or MCP server.
{% endstep %}

{% step %}

### Select Probes

Click **Run scan** and select the probes by name or category. See [Run Scan](https://ai-security-docs.akto.io/akto-argus-agentic-ai-security-for-homegrown-ai/agentic-red-teaming/how-to/run-test.md#run-the-scan).
{% endstep %}

{% step %}

### Enable Smart Automated Testing

Check **Smart Automated Testing** in the post-scan options of the **Configure scan** window.
{% endstep %}

{% step %}

### Choose a Smart Agent

In **Smart agent**, select **Default smart testing** or one of your own [smart agents](#customizing-the-agent-with-smart-agents). Optionally enter a **Custom prompt for Smart Automated Testing** to focus the run, for example `Focus on auth bypass and IDOR on admin endpoints`. The custom prompt applies to a single run, while a smart agent applies to every run that selects it.

<div data-with-frame="true"><figure><img src="https://1895868029-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkpBG2Nfd5ZbNmahr8W6H%2Fuploads%2Fgit-blob-022f8298e7c9b34950f077f183c9a1174548c63b%2Fsmart-automated-testing-smart-agent-dropdown.png?alt=media" alt="Smart Automated Testing option with the Smart agent dropdown set to Default smart testing and an optional custom prompt field" width="563"><figcaption><p>Choose a smart agent and an optional custom prompt.</p></figcaption></figure></div>
{% endstep %}

{% step %}

### Run

The agent references the selected probe definitions and begins the execution loop. Results appear under **AI Red Teaming > Results**.
{% endstep %}
{% endstepper %}

The agent uses the probe ID and its associated YAML definition to understand the scenario: which vulnerability to probe for, which parameters to manipulate, and which response conditions confirm a finding.

## Customizing the Agent with Smart Agents

A smart agent adds your own context to Smart Automated Testing. You can upload custom skills for the probes you want to run, and provide instructions, files, and links that describe your agents or MCP servers. Smart agents work only with Smart Automated Testing.

{% hint style="warning" %}
Smart agents are in **Beta**.
{% endhint %}

Before you create a smart agent, import the agent or MCP server you want to scan ([Run Scan prerequisites](https://ai-security-docs.akto.io/akto-argus-agentic-ai-security-for-homegrown-ai/agentic-red-teaming/how-to/run-test.md#prerequisites)) and create a [scan role](https://ai-security-docs.akto.io/akto-argus-agentic-ai-security-for-homegrown-ai/agentic-red-teaming/how-to/create-a-test-role.md) for the identity the agent scans as.

### Open the Smart agents page

Go to **AI Red Teaming** → **Smart agents**. The page lists your smart agents with their **Skills**, **Knowledge base** content, **Last updated** time, and **Updated by** user. Click **Create smart agent** to open the **New smart agent** form.

<div data-with-frame="true"><figure><img src="https://1895868029-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkpBG2Nfd5ZbNmahr8W6H%2Fuploads%2Fgit-blob-fc837d49265400d05a428f83cf28671438bb8f61%2Fred-teaming-smart-agents-list.png?alt=media" alt="Smart agents page under AI Red Teaming listing an agent with its skills, knowledge base, last updated time and updated by user" width="563"><figcaption><p>Click Create smart agent to start.</p></figcaption></figure></div>

### Configure the agent

The **New smart agent** form has four sections: **Agent**, **Skills**, **Identities**, and **Knowledge base**.

{% stepper %}
{% step %}

#### Name the agent

In **Agent**, enter a **Name** (required), for example `Payments API agent`. Optionally add a **Description** that states what the agent is for.

<div data-with-frame="true"><figure><img src="https://1895868029-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkpBG2Nfd5ZbNmahr8W6H%2Fuploads%2Fgit-blob-fd9a3a1cc1d0f5b55be6f5ffdd8507e728c917b8%2Fred-teaming-smart-agents-new-agent-form.png?alt=media" alt="New smart agent form showing the Agent section with Name and Description fields and the Skills section" width="563"><figcaption><p>Enter a name and an optional description.</p></figcaption></figure></div>
{% endstep %}

{% step %}

#### Choose skills

In **Skills**, use the dropdown to select the skills the agent applies. A new agent starts with 17 skills selected. Click the delete icon on a skill to remove it. See [Built-in skills](#built-in-skills).
{% endstep %}

{% step %}

#### Add custom skills (optional)

In **Custom skills**, click **Add skill files** to upload your own skills, or click **Import skills folder** to import a folder of skills. See [Custom skills](#custom-skills).

<div data-with-frame="true"><figure><img src="https://1895868029-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkpBG2Nfd5ZbNmahr8W6H%2Fuploads%2Fgit-blob-ea86b23212011d1e8e8b97763daa9d12aa42eb17%2Fred-teaming-smart-agents-custom-skills-identities-knowledge-base.png?alt=media" alt="Custom skills upload area, Identities checkbox, and Knowledge base fields for Instructions, Files and Links" width="563"><figcaption><p>Add custom skills, set identities, and fill the knowledge base.</p></figcaption></figure></div>
{% endstep %}

{% step %}

#### Set identity behavior

In **Identities**, decide whether the agent can create its own users or API keys. See [Identities](#identities).
{% endstep %}

{% step %}

#### Add a knowledge base

In **Knowledge base**, add **Instructions**, **Files**, and **Links** that describe how your target works. See [Knowledge base](#knowledge-base).
{% endstep %}
{% endstepper %}

### Built-in skills

Each skill tells the agent which class of weakness to probe. Skills are named after the OWASP API Security Top 10 (2023) categories they cover. The following skills appear in the default selection.

<table><thead><tr><th width="320">Skill</th><th>What the agent does</th></tr></thead><tbody><tr><td><strong>API1:2023 Broken Object Level Authorization</strong></td><td>Learns which objects belong to which identity, then tries each identity's ids as the others.</td></tr><tr><td><strong>API1:2023 BOLA - Cross-Tenant Isolation</strong></td><td>Uses other organizations', projects' or workspaces' ids in path, body, headers and query. Scoped routes must stay in scope.</td></tr><tr><td><strong>API2:2023 Broken Authentication</strong></td><td>Tests authentication strength: weak or missing auth, token and JWT handling, session and password-reset flows.</td></tr></tbody></table>

The **Skills** dropdown lists every skill you can select.

### Custom skills

Custom skills extend the built-in skills with the probes you want the agent to run.

* Upload Markdown or text skill files, up to 100 files, with **Add skill files**.
* Import a folder of skills with **Import skills folder**. Each skill in the folder is its own folder containing a `SKILL.md` and optional reference files.

Only smart testing reads the content of custom skills.

### Identities

The agent scans as the scan role you choose when you run the scan.

You can select **Let the agent create its own users or API keys at other role levels when it needs them** so the agent creates additional identities through the API under test. The agent removes the identities it created at the end of the run.

{% hint style="danger" %}
Identity creation is intended for test environments only, because the agent creates real users and API keys through the API under test.
{% endhint %}

### Knowledge base

The knowledge base gives the agent context about your target. Skills read the files and links you add here when they need API documentation.

| Field            | What to add                                                                                                                                               | Limit            |
| ---------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------- |
| **Instructions** | How the target works and what to use: roles, who owns which objects, ids and values to use, what never to change.                                         | 2000 characters  |
| **Files**        | Text files (`.txt`, `.md`, `.markdown`, `.json`, `.yaml`, `.yml`, `.csv`, `.xml`, `.html`, `.har`).                                                       | Up to 10 files   |
| **Links**        | API docs and other pages, one link per line, for example `https://api.example.com/openapi.json`. An OpenAPI spec link is used as the API's documentation. | At most 20 links |

## Viewing the AI Execution Trace

Each Smart Automated Testing run produces a detailed **AI Execution Trace** in the scan result. The trace lists the Thinking, Plan, Action, and Observation entries for each attempt.

## Key Differences from Standard Scanning

|              | Standard Scanning         | Smart Automated Testing                                    |
| ------------ | ------------------------- | ---------------------------------------------------------- |
| Execution    | Fixed payload templates   | AI-reasoned, adaptive requests                             |
| Attempts     | Single pass               | Multiple attempts, each improving on the last              |
| Transparency | Request and response logs | Full reasoning trace (Thinking, Plan, Action, Observation) |
| Validation   | Rule-based matchers       | AI-driven judgment with evidence                           |

## Setup

Smart Automated Testing requires the **AI Automated Testing** agent running alongside your hybrid scanning module. For now, contact the Akto support team to set up Smart Automated Testing. See [Get Support for your Akto setup](#get-support-for-your-akto-setup).

## Get Support for your Akto setup

There are multiple ways to request support from Akto. We are 24x7 available on the following:

1. In-app `intercom` support: message us inside the Akto dashboard and someone will reply.
2. Contact `support@akto.io` for email support.
3. Reach us [here](https://www.akto.io/contact-us).
