> For the complete documentation index, see [llms.txt](https://support.attackforge.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://support.attackforge.com/attackforge-enterprise/ai-agentic-workflows.md).

# AI Agentic Workflows

## Overview

<figure><img src="/files/TjhXQUXDokIRdhcgbD2S" alt=""><figcaption></figcaption></figure>

You can integrate your own AI models and agents with AttackForge.

This can help you with:

* **Speed and scale.** Agents can enumerate, fingerprint, and probe targets in parallel far faster than a human, compressing reconnaissance and initial discovery from hours into minutes. They also let a single tester effectively cover a much larger scope.
* **Coverage and consistency.** Humans get tired, skip steps, or follow personal preferences. Agents methodically work through checklists, attack paths, or playbooks the same way every time, reducing the chance that something obvious slips through.
* **Lower-tier task automation.** Repetitive work - credential spraying with safe thresholds, payload permutation, header analysis, certificate inspection, OSINT collection, evidence collection and screenshotting - can be handed off, freeing testers to focus on the creative, high-judgment parts of the engagement.
* **Adaptive reasoning.** Unlike traditional scanners, modern AI agents can chain findings together, pivot based on context, and reason about *why* something might be exploitable rather than just matching signatures. That narrows the gap between automated scanning and manual testing.
* **Better reporting and evidence handling.** Agents can draft findings, normalize evidence, map issues to frameworks (MITRE ATT\&CK, OWASP, CWE), and suggest remediation language -turning hours of write-up into a review-and-edit pass.
* **Continuous / on-demand testing.** Agents enable testing models that aren't viable with humans alone: always-on assessment, retesting on every release, or rapid validation after a remediation push.
* **Knowledge amplification for junior testers.** An agent acting as a co-pilot can surface relevant techniques, suggest next steps, and explain unfamiliar tech, effectively giving less experienced testers a senior-level reference on tap.
* **Triage and noise reduction.** Agents can validate scanner output, deduplicate findings, and downgrade or discard false positives before a human ever sees them.

&#x20;When integrating your AI with AttackForge - you can benefit from:

* [Human-in-the-loop](https://support.attackforge.com/attackforge-enterprise/modules/ai-mcp-and-skills#prompt-examples) workflows
* Agentic workflows

Agents can be used with AttackForge in different ways to help you scale your testing processes, and to make your testing more efficient and effective.

Some of the examples of using agents with AttackForge:

* [Enrichment of vulnerability data](#agentic-vulnerability-enrichment)
* [Triggering hackbots to perform testing and ingest their findings](#triggering-hackbots-and-ingesting-findings)

## Agentic Vulnerability Enrichment

<figure><img src="/files/Ndo3iXaviltsdbTepait" alt=""><figcaption></figcaption></figure>

You can use AI to enrich your vulnerability data in AttackForge.

This can help you with:

* **Contextual enrichment from external sources.** AI can pull in and synthesise data from CVE, NVD, EPSS, KEV, exploit-DB, vendor advisories, threat intel feeds, and GitHub PoCs, then attach a digestible summary, known exploit status, affected versions, and patch availability directly onto the finding in AttackForge. No more manual tab-hopping during write-up.
* **Severity and risk scoring.** Beyond a raw CVSS base score, AI can compute or recommend a contextual score by factoring in asset criticality, exposure (internet-facing vs. internal), compensating controls, data sensitivity, and active exploitation in the wild. EPSS probability and KEV presence can be layered in automatically.
* **Smarter deduplication and clustering.** AI can recognise that 200 findings across 40 hosts are the same root cause (e.g. one missing patch, one shared library), cluster them, and surface a single "fix once, resolve many" vulnerability in AttackForge - dramatically reducing reporting noise.
* **Auto-generated descriptions, impact statements, and remediation guidance.** AI can draft technically accurate, audience-appropriate language for each finding - one tone for the executive summary, another for the developer reading the ticket. It can also tailor remediation steps to the specific tech stack (e.g. give the fix for the actual NGINX version detected, not a generic line).
* **Framework and standard mapping.** Automatically map findings to MITRE ATT\&CK techniques, CWE, OWASP Top 10, PCI-DSS, ISO 27001, NIST controls, or whatever framework the client cares about. This is high-effort manual work that AI handles well.
* **Attack path and chain reasoning.** Given a set of findings and asset relationships, AI can hypothesise how an attacker would chain them - e.g. "exposed admin panel + default creds + outdated Tomcat = RCE → lateral movement via reused SSH key." This turns a flat finding list into a narrative.
* **Proof-of-concept and validation assistance.** AI can suggest exploitation steps, generate safe PoC payloads, propose validation commands, or draft retest procedures - accelerating both initial testing and post-remediation verification.
* **Translation and localisation.** Findings, reports, and remediation guidance translated into the client's preferred language, with technical accuracy preserved.
* **Business impact translation.** Convert technical vulnerabilities into business-language impact: *"this SQLi exposes the customer PII database"* rather than *"unsanitised input on /search.php."* Useful for executive reporting and risk-acceptance conversations.
* **Trend detection and program insights.** Across an organisation's full vulnerability history, AI can identify recurring weaknesses, slow-fix categories, teams or apps that lag in remediation, and emerging patterns - feeding back into program improvement.
* **Conversational query layer.** Let users ask the library in natural language: *"show me all critical findings on internet-facing assets without a fix in 30 days that map to ATT\&CK Initial Access."* This makes vulnerability data accessible to non-technical stakeholders.
* **Quality assurance on testing output.** AI can review writeups for completeness, flag missing evidence, check that severity matches the described impact, and catch inconsistencies before a report goes out - a "second pair of eyes" pass.

The example below utilizes the following components in order to enrich vulnerabilities in AttackForge using AI agents:

* AttackForge [Actions](/attackforge-enterprise/actions.md)
* AttackForge [Flows](/attackforge-enterprise/modules/flows.md)
* [Microsoft Copilot Studio Flows](https://learn.microsoft.com/en-us/microsoft-copilot-studio/flows-overview)
* [Microsoft Copilot Studio Agents](https://www.microsoft.com/en-au/microsoft-365-copilot/microsoft-copilot-studio)

> **IMPORTANT**: Although this example uses Microsoft Copilot Studio - you can tailor this example to use *any AI agentic systems*, including your own existing agents.

### 1. Creating an Agent

This example utilizes [Microsoft Copilot Studio Agents](https://www.microsoft.com/en-au/microsoft-365-copilot/microsoft-copilot-studio). However you can use *any AI agentic systems*, including your own existing agents.

Start by opening Copilot Studio and click on `Agents`. Click on `Create blank agent`. Give the agent a name, then click `Create`.

<figure><img src="/files/IeOGyhv81cCRZaCpnhTL" alt=""><figcaption></figcaption></figure>

Once your agent is ready, we recommend configuring `Claude Opus 4.5` as the supporting Large Language Model (LLM).

<figure><img src="/files/TzFjRP6AarxFDK2TP6Bo" alt=""><figcaption></figcaption></figure>

Click on `Tools`. [Follow this guide to configure your agent to the AttackForge MCP server](https://support.attackforge.com/attackforge-enterprise/modules/ai-mcp-and-skills#microsoft-copilot-studio-self-registration).

The following MCP tools are required:

* Find Vulnerabilities
* Find Writeups
* Get Args Schema for Tool
* Get Field Structure
* Patch Writeup

<figure><img src="/files/5HypvSLbNsXxFhMm64wi" alt=""><figcaption></figcaption></figure>

Connect your agent to the internet so it can retrieve better sources of vulnerability context.&#x20;

Click on `Settings`. Within `Generative AI` - scroll down to `Use information from the Web` and `enable` this setting.

<figure><img src="/files/ZsOrt3DhyRwIkdGnkL3N" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/nad73B3HkMxCr2c6mKNN" alt=""><figcaption></figcaption></figure>

Click `Publish` to publish your agent. Your agent is now ready 😊

<figure><img src="/files/Nwb5HXDyOhxdmBx3Ju9i" alt=""><figcaption></figcaption></figure>

### 2. Triggering an Agent

This example utilizes [Microsoft Copilot Studio Flows](https://learn.microsoft.com/en-us/microsoft-copilot-studio/flows-overview) to create an incoming webhook which triggers the agent. However you can use *any HTTP trigger-based solutions*, including your own existing HTTP triggers.

Start by opening Copilot Studio and click on `Flows`. Click on `New agent flow`.

<figure><img src="/files/DJyTWTySnSqO46s6eIDi" alt=""><figcaption></figcaption></figure>

Select `Request`. Select `When an HTTP request is received`.

<figure><img src="/files/zdlmpl21AKszUNEDO8E2" alt=""><figcaption></figcaption></figure>

Configure the following:

* *Who can trigger the flow?*
  * Select `Anyone` for testing purposes.
  * For Production - lock down this trigger based on your security requirements.
* *Request Body JSON Schema*
  * Enter the following:

```json
{
    "type": "object",
    "properties": {
        "project_ids": {
            "type": "array",
            "items": {
                "type": "string"
            }
        },
        "vulnerability_ids": {
            "type": "array",
            "items": {
                "type": "string"
            }
        },
        "writeup_ids": {
            "type": "array",
            "items": {
                "type": "string"
            }
        }
    },
    "additionalProperties": false
}
```

Click on the `+` icon to add the next step in the flow.

<figure><img src="/files/7Hxm4yzzXUVY9QBPCETP" alt=""><figcaption></figcaption></figure>

Select `Run an agent`.

<figure><img src="/files/YlQ8HB6Bs9dfgAL4qHKP" alt=""><figcaption></figcaption></figure>

Select your agent created in the previous step.

<figure><img src="/files/XSDtJh8SS0yux0d3uX44" alt=""><figcaption></figcaption></figure>

For the Message - start by clicking on `Trigger function`. Enter in `triggerBody()` as the function. Click `Add`.

> **IMPORTANT**: This step is essential to ensure the Body from your HTTP Request is injected into the agent prompt. The body is expected to include *project\_ids*, *vulnerability\_ids* or *writeup\_ids* - depending from where the agent gets triggered in AttackForge.

<figure><img src="/files/p3so056v52l04G2czO8b" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/hKDQAAtwGS3LI462TeuN" alt=""><figcaption></figcaption></figure>

After `Body` - enter the following prompt:

{% code overflow="wrap" %}

```
The goal is to improve the Writeups in AttackForge.

Improvements should focus on improving the following fields:
- Title
- Description
- Attack Scenario
- Remediation Recommendation
- Template Steps to Reproduce (POC)

You will recieve either of the following in the body:
- project_ids
- vulnerability_ids
- writeup_ids

If you receive a Project Id - improve the Writeups for every Vulnerability on the Project.

If you receive a Vulnerability Id - improve the Writeup associated to that Vulnerability.

To improve the Writeup, you first need to identify the type of vulnerability discovered, then work out the relevant MITRE CWEs and MITRE CAPECs.

Patch the AttackForge Writeup to update the Title, Description, Attack Scenario, Remediation Recommendation and Template Steps to Reproduce (POC) using the data from MITRE CWE and MITRE CAPEC. Dont ask for confirmation - just do it.

Template Steps to Reproduce (POC) is a custom field.
```

{% endcode %}

<figure><img src="/files/LqwpyXTJYLnd9kBYVBQm" alt=""><figcaption></figcaption></figure>

`Disable` the option `Request human assistance when unsure`.

<figure><img src="/files/AqR7pVOln88LgSiPbNG9" alt=""><figcaption></figcaption></figure>

Click `Publish` to publish your flow.

<figure><img src="/files/oY9EChUPYz6DWTnymPyR" alt=""><figcaption></figcaption></figure>

Click on the first step of your flow. Copy the `HTTP URL` and paste this somewhere (you will need it later).

<figure><img src="/files/Gr8g4TOUvehKx1no9yhr" alt=""><figcaption></figcaption></figure>

Your HTTP Trigger for your agent is now ready 😊

### 3. Configure Flows

In AttackForge, click on `Flows`. Click `New > Create Flow`.

<figure><img src="/files/2KOY7WfZ4zxth1facq1C" alt=""><figcaption></figcaption></figure>

Enter the following configuration:

* Enabled = `On`
* Trigger Type = `Action`
* Restrict to Entities:
  * `Project`
  * `Projects`
  * `Vulnerability`
  * `Vulnerabilities`
  * `Writeup`
  * `Writeups`
* Action 1
  * Method = `POST`
  * URL = `paste HTTP URL from previous step`
  * Headers:
    * `Content-Type - Value - application/json`

<figure><img src="/files/uNnrECT76VlLqbHvBQ8W" alt=""><figcaption></figcaption></figure>

* Request Script

```javascript
const body = {};

if (data.projects || data.project) {
  body.project_ids = [];
  
  if (data.projects && data.projects.length > 0) {
    for (let x = 0; x < data.projects.length; x++) {
      const project_id = data.projects[x];
      Array.push(body.project_ids, project_id);
    }
  }
  else if (data.project?.project_id) {
    Array.push(body.project_ids, data.project.project_id);
  }
}
else if (data.vulnerabilities || data.vulnerability) {
  body.vulnerability_ids = [];
  
  if (data.vulnerabilities && data.vulnerabilities.length > 0) {
    for (let x = 0; x < data.vulnerabilities.length; x++) {
      const vulnerability_id = data.vulnerabilities[x];
      Array.push(body.vulnerability_ids, vulnerability_id);
    }
  }
  else if (data.vulnerability?.vulnerability_id) {
    Array.push(body.vulnerability_ids, data.vulnerability.vulnerability_id);
  }
}
else if (data.writeups || data.writeup) {
  body.writeup_ids = [];
  
  if (data.writeups && data.writeups.length > 0) {
    for (let x = 0; x < data.writeups.length; x++) {
      const writeup_id = data.writeups[x];
      Array.push(body.writeup_ids, writeup_id);
    }
  }
  else if (data.writeup?.id) {
    Array.push(body.writeup_ids, data.writeup.id);
  }
}

if (!body.project_ids && !body.vulnerability_ids && !body.writeup_ids) {
  return {
    decision: {
      status: 'abort',
      message: 'body is missing project_ids and vulnerability_ids and writeup_ids. Exiting.',
    }
  };
}
if (body.project_ids && !body.project_ids.length === 0) {
  return {
    decision: {
      status: 'abort',
      message: 'body has no project_ids. Exiting.',
    }
  };
}
if (body.vulnerability_ids && !body.vulnerability_ids.length === 0) {
  return {
    decision: {
      status: 'abort',
      message: 'body has no vulnerability_ids. Exiting.',
    }
  };
}
if (body.writeup_ids && !body.writeup_ids.length === 0) {
  return {
    decision: {
      status: 'abort',
      message: 'body has no writeup_ids. Exiting.',
    }
  };
}

return {
  decision: {
    status: 'continue',
    message: 'Trigger agent to improve Writeups',
  },
  request: {
    body: body
  }
};
```

<figure><img src="/files/ZHybLD3rg4SqoXE6SnyY" alt=""><figcaption></figcaption></figure>

* Response Script

```javascript
if (response?.statusCode === 202) {
  return {
    decision: {
      status: 'finish',
      message: 'Agent successfully triggered!',
    }
  };
}
else {
  Logger.error(JSON.stringify(response));
  return {
    decision: {
      status: 'abort',
      message: 'Error triggering Agent',
    }
  };
}
```

<figure><img src="/files/KSy9xD5SvPD6ue98EtQe" alt=""><figcaption></figcaption></figure>

Click `Create`. Your Flow is now ready 😊

### 4. Configure Actions

Click on `Actions` in the main navigation menu. Click on `All Actions`.

<figure><img src="/files/9kjwyrMPMVlqW1qPUjMe" alt=""><figcaption></figcaption></figure>

Select `System Actions`. Click on `New`.

<figure><img src="/files/2SDEsEgP9j20tFZ69vr6" alt=""><figcaption></figcaption></figure>

Enter the following configuration:

* Entities:
  * `Project`
  * `Projects`
  * `Vulnerability`
  * `Vulnerabilities`
  * `Writeup`
  * `Writeups`
* Flows
  * `Select your flow from the previous step`

Click `Create`.

<figure><img src="/files/QFEsbiz9qScg490nDbKS" alt=""><figcaption></figcaption></figure>

Your Action is now created and ready for use 😊

> **REMINDER**: Don't forget to give other people access to your Action if you need to roll this workflow out to more people than yourself.

Navigate to any project and notice that your workflow is now ready to launch from your Actions menu:

<figure><img src="/files/ZJ2I3RSNGPYDdOFXmHtk" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/aZS0t5Ghe3NkdahMFhS3" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/VbogEjPwfATozwnQXuHd" alt=""><figcaption></figcaption></figure>

This is what the writeup looked like `BEFORE` the agent enriched the data:

<figure><img src="/files/cifOyucvGJ4UK6WKwMKB" alt=""><figcaption></figcaption></figure>

This is what the writeup looks like `AFTER` the agent enriched the data:

<figure><img src="/files/syJauvHjKhChypmu985s" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/R50uj0kDa1dJLJGkWU07" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/eSx2u4UdrPI0mEtClF1t" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/tDi6EIQgqQxvCrLM3CsY" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/ECJZ3ZsZBts4JUlijqDq" alt=""><figcaption></figcaption></figure>

When triggering this workflow on a project - all vulnerabilities will be sent to the agent for processing.

You can also trigger this workflow on multiple projects at the same time:

<figure><img src="/files/f494xuRM1Qwk4yD0YtTp" alt=""><figcaption></figcaption></figure>

You can also trigger this workflow from a vulnerability:

<figure><img src="/files/1Sw8JJ2pAVC1YZeU82lS" alt=""><figcaption></figcaption></figure>

You can also trigger this workflow on multiple vulnerabilities at the same time:

<figure><img src="/files/mMhqm3EultbTBGHRdDpU" alt=""><figcaption></figcaption></figure>

You can also trigger this workflow from a writeup:

<figure><img src="/files/5H9Pgw0cOqqCuzd3U9eI" alt=""><figcaption></figcaption></figure>

You can also trigger this workflow on multiple writeups at the same time:

<figure><img src="/files/2Grga1mgUIPLOeRnTYUl" alt=""><figcaption></figcaption></figure>

## Agentic Penetration Testing

<figure><img src="/files/CykgFBYSpp3Awsrn8RBH" alt=""><figcaption></figcaption></figure>

You can use AI to run pentesting agents for you, and ingest their findings in to AttackForge.

This can help you with:

* **Scale and coverage.** A single agent (or a swarm of them) can probe orders of magnitude more attack surface than a human team in the same window. Every subdomain, every API endpoint, every parameter can be exercised without triage bottlenecks.
* **Continuous vs. point-in-time.** Traditional engagements are snapshots - accurate the day they're delivered, stale the day after. Agents can run continuously against staging and production, catching regressions as code ships. This fits modern CI/CD far better than annual or quarterly assessments.
* **Speed to first finding.** Reconnaissance, fingerprinting, credential-spraying checks, and misconfig scanning are the slowest parts of a human-led test. Agents compress those hours or days into minutes, so testers hit the interesting work sooner.
* **Multi-step attack chaining.** This is where LLM-driven agents differ meaningfully from legacy scanners. They can enumerate a service, notice a weak permission, pivot to an adjacent host, and chain low-severity issues into a high-impact path - the way a human attacker would. Scanners flag issues in isolation; agents build narratives.
* **Tool orchestration.** Instead of hard-coding *"run nmap then Nuclei then Burp,"* an agent can pick the right tool for what it's seeing, feed results between tools, and adapt on the fly. It behaves more like a tester driving a toolkit than a pipeline stitched together.
* **Consistency and auditability.** Agents apply the same methodology every run. That makes it much easier to trend security posture over time, compare pre/post remediation states, and prove coverage for auditors. Every action is logged, timestamped, and reproducible.
* **Addressing the talent gap.** There aren't enough experienced pentesters to meet demand - not even close. Agents let small teams punch above their weight and let organizations that couldn't previously afford ongoing offensive testing get meaningful coverage.
* **Realistic adversary simulation.** Attackers are already adopting AI. Defensive testing that doesn't use the same techniques is training against yesterday's adversary. Agent-driven testing more accurately reflects what a modern attacker will actually do.
* **Framework-driven coverage.** Agents can systematically walk MITRE ATT\&CK or a custom playbook, ensuring techniques aren't skipped because a human forgot or ran out of time. Good for compliance narratives too.
* **Cost efficiency on the repetitive layer.** Recon, credentialed config review, IAM enumeration, and similar tedium is where humans burn hours without adding much creativity. Offloading that to agents lets senior testers focus on business-logic flaws, chained exploits, and the judgment calls agents still can't make well.

> **IMPORTANT**: AI agents *do not* replace human pentesters - they extend them. The creative leaps, the business-context understanding, the judgment about which finding actually matters to a given customer, still need people. The best way to think about it is "*AI agents cover breadth, humans cover depth*" - a managed workflow where both feed into the same lifecycle rather than competing.

The example below utilizes the following components in order to perform a pentest using AI agents, then ingest their findings into AttackForge:

* AttackForge [Actions](/attackforge-enterprise/actions.md)
* AttackForge [Flows](/attackforge-enterprise/modules/flows.md)
* [OpenClaw](https://openclaw.ai/)
* [Microsoft Foundry](https://azure.microsoft.com/en-us/products/ai-foundry)

> **IMPORTANT**: Although this example uses OpenClaw and Microsoft Foundry - you can tailor this example to use *any AI agentic systems*, including your own existing agents.

### 1. Creating and Triggering an Agent

This example utilizes [OpenClaw](https://openclaw.ai/) and [Microsoft Foundry](https://azure.microsoft.com/en-us/products/ai-foundry). However you can use *any AI agentic systems*, including your own existing agents.

The following diagram illustrates the key components utilized in this workflow.

<figure><img src="/files/55jLXkItyGVbUePT7vhu" alt=""><figcaption></figcaption></figure>

> **IMPORTANT:** Please ensure to security harden your OpenClaw environment as the default settings for OpenClaw is inherently insecure.

**Notes:**

* OpenClaw is running on a Linux server hosted somewhere on your infrastructure.
* NGINX reverse proxy is installed on your linux server, and configured to manage ingress into the server, exposing the endpoint which the [AttackForge Flow](https://support.attackforge.com/attackforge-enterprise/modules/flows) will communicate with. IP-whitelisting and Authorization Key is recommended to control authentication to the endpoint.
* Open Claw is configured to allow [Hooks](https://docs.openclaw.ai/automation/hooks) to register the agent action. NGINX should proxy-pass to the relevent hook. Hooks and Transforms are defined - which turn an AttackForge Flow webhook into an agent directive.
* The OpenClaw [Gateway](https://docs.openclaw.ai/gateway) is configured and running.
* OpenClaw has [AttackForge MCP](https://support.attackforge.com/attackforge-enterprise/modules/ai-mcp-and-skills) configured. The following MCP tools are required:
  * Find Project
  * Find Project Scope
  * Create Writeup
  * Create Vulnerability
  * Patch Vulnerability
  * Get Args Schema for Tool
  * Get Field Structure
  * Count Vulnerabilities
* OpenClaw is connected to an AI Model. We used [Microsoft Foundry](https://azure.microsoft.com/en-us/products/ai-foundry) which adds extra layers of authorization, monitoring and control - however you can connect to any model supported by OpenClaw.
* OpenClaw has [Web Search](https://docs.openclaw.ai/tools/web) configured.
* OpenClaw [agents are configured](https://docs.openclaw.ai/gateway/config-agents) with `AGENTS.md`, `HEARTBEAT.md`, `IDENTITY.md`, `SOUL.md`, `TOOLS.md`, `USER.md`
* Testing tools are installed on the linux server and in-scope of the agent tools.

### 2. Configure Flows

In AttackForge, click on `Flows`. Click `New > Create Flow`.

<figure><img src="/files/2KOY7WfZ4zxth1facq1C" alt=""><figcaption></figcaption></figure>

Enter the following configuration:

* Enabled = `On`
* Trigger Type = `Action`
* Restrict to Entities:
  * `Project`
* **Action 1: Trigger Hackbots and Start Hacking!**
  * Method = `POST`
  * URL = `https://{{openclaw_hostname}}/hooks/{{hook_name}}`
  * Secrets:
    * `openclaw_hostname - the FQDN for your OpenClaw server`
    * `openclaw_api_key - <your hooks API key>`
    * `openclaw_hackbot_trigger_name - the name of your hook`
  * Headers:
    * `Content-Type - Value - application/json`

<figure><img src="/files/ZmTdV5JCokyobIJFa56K" alt=""><figcaption></figcaption></figure>

* Request Script

```javascript
const body = {};

if (data.project?.project_id) {
  body.project_id = data.project.project_id;
}

if (!body.project_id) {
  return {
    decision: {
      status: 'abort',
      message: 'body is missing project_id. Exiting.',
    }
  };
}

return {
  decision: {
    status: 'continue',
     message: 'Trigger agent to start hacking',
  },
  request: {
    url: 'https://' + secrets.openclaw_hostname + '/hooks/' + secrets.openclaw_hackbot_trigger_name,
    headers: {
      'Authorization': 'Bearer ' + secrets.openclaw_api_key
    },
    body: body
  }
};
```

* Response Script

```javascript
if (response?.statusCode === 200) {
  return {
    decision: {
      status: 'finish',
      message: 'Agent successfully triggered!',
    }
  };
}
else {
  Logger.error(JSON.stringify(response));
  return {
    decision: {
      status: 'abort',
      message: 'Error triggering Agent',
    }
  };
}
```

Click `Create`. Your Flow is now ready 😊

### 3. Configure Actions

Click on `Actions` in the main navigation menu. Click on `All Actions`.

<figure><img src="/files/9kjwyrMPMVlqW1qPUjMe" alt=""><figcaption></figcaption></figure>

Select `System Actions`. Click on `New`.

<figure><img src="/files/1uEhxUfATl1O89SftbWf" alt=""><figcaption></figcaption></figure>

Enter the following configuration:

* Entities:
  * `Project`
* Flows
  * `Select your flow from the previous step`

Click `Create`.

<figure><img src="/files/g84VgUMipJTtk2ZkUWmR" alt=""><figcaption></figcaption></figure>

Your Action is now created and ready for use 😊

> **REMINDER**: Don't forget to give other people access to your Action if you need to roll this workflow out to more people than yourself.

Navigate to any project and notice that your workflow is now ready to launch from your Actions menu:

<figure><img src="/files/kIJCaoSpbRPYSCEwh55J" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/fPmPdyqVeMbyGF60AZMb" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/yRZkD3AycqFhOuwWeTNK" alt=""><figcaption></figcaption></figure>

Your vulnerabilities will start ingesting as your agent identifies, verifies and enriches each vulnerability:

<figure><img src="/files/v3wuU5MgirUFSIAcuKvv" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/kMPn9YDAz8gcTLYCbUMN" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/BCDYNGgJZUMxwT4uP0ef" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/QnSS8rfxzyhI5PNh8Ew2" alt=""><figcaption></figcaption></figure>

### 4. Monitoring Agent Testing Progress

The OpenClaw Gateway [Control UI](https://docs.openclaw.ai/web/control-ui) can be used to monitor agent sessions and live agent testing progress.

<figure><img src="/files/LhpwVtRLCNOqJqr3svYp" alt=""><figcaption></figcaption></figure>

Click into the session to see what the agent is doing.

<figure><img src="/files/YnohGxHcUdRNc9O5LBXF" alt=""><figcaption></figcaption></figure>

### 5. Dynamic Agent Prompts Using Custom Forms on Actions

> Example Coming soon!

### 6. Dynamically Registering Agent Test Procedures as Project Test Cases

> Example Coming soon!

### 7. Driving Agent Test Procedures from AttackForge Project Test Cases

> Example Coming soon!

## Agentic Retesting

<figure><img src="/files/fhGxW7x9nECroQDbJQ5c" alt=""><figcaption></figcaption></figure>

You can use AI to run pentesting agents to retest for you, and ingest their retest findings in to AttackForge.

Retesting is one of the highest-value automation targets in the pentest lifecycle because the hard work (discovery, reasoning about impact, crafting the exploit) has already been done.&#x20;

The main advantages of using AI agents for it:

* **Speed and closing the exposure window.** Traditional retesting waits for a human tester's availability, so fixes can sit "verified in staging, unverified in prod" for days or weeks. An agent can run the retest minutes after the developer marks a finding ready, collapsing the remediation cycle from weeks to hours.
* **Reproducibility and evidence quality.** An agent follows the exact same reproduction steps every time and logs every request, response, payload, and screenshot. That gives auditors, compliance teams, and clients a much cleaner evidence trail than "the tester tried it again and it looked fixed." It also removes the risk of a human accidentally testing a slightly different variant of the exploit and giving a false pass.
* **Scale and parallelism.** Enterprise engagements routinely produce hundreds of findings. Humans retest serially; agents retest in parallel across all findings and all environments (dev, staging, prod) without scheduling overhead.
* **Continuous verification, not one-shot.** Once you have an agent that can reproduce a finding, you can run it on a schedule to catch regressions from rollbacks, redeploys, config drift, or "someone re-enabled the debug endpoint." This turns retest from a point-in-time gate into a control.
* **Cost profile.** Compute cost per retest is roughly fixed and low; human tester cost is high and variable. That changes what's economically worth retesting — small findings and low-severity issues that were historically skipped can now be verified routinely.
* **Frees testers for work that actually needs a human.** Retesting is largely mechanical. Moving it off the human queue means your testers spend their time on chained logic flaws, novel attack surfaces, and creative work, which is where humans still outperform agents by a wide margin.
* **Better developer experience.** Devs get near-real-time confirmation that their fix worked (or a precise reproduction showing why it didn't), instead of waiting weeks and then needing to reload context.

> **IMPORTANT:** The caveat worth flagging: agents are strong at *reproducing a known exploit against a known target*. They're much weaker at deciding whether a fundamentally different mitigation (e.g. a WAF rule vs a code fix) genuinely closes the underlying weakness. That judgment call is still a good place to keep a human in the loop.

The example below utilizes the following components in order to perform a pentest using AI agents, then ingest their findings into AttackForge:

* AttackForge [Actions](/attackforge-enterprise/actions.md)
* AttackForge [Flows](/attackforge-enterprise/modules/flows.md)
* [OpenClaw](https://openclaw.ai/)
* [Microsoft Foundry](https://azure.microsoft.com/en-us/products/ai-foundry)

> **IMPORTANT**: Although this example uses OpenClaw and Microsoft Foundry - you can tailor this example to use *any AI agentic systems*, including your own existing agents.

### 1. Creating and Triggering an Agent

This example utilizes [OpenClaw](https://openclaw.ai/) and [Microsoft Foundry](https://azure.microsoft.com/en-us/products/ai-foundry). However you can use *any AI agentic systems*, including your own existing agents.

The following diagram illustrates the key components utilized in this workflow.

<figure><img src="/files/55jLXkItyGVbUePT7vhu" alt=""><figcaption></figcaption></figure>

> **IMPORTANT:** Please ensure to security harden your OpenClaw environment as the default settings for OpenClaw is inherently insecure.

**Notes:**

* OpenClaw is running on a Linux server hosted somewhere on your infrastructure.
* NGINX reverse proxy is installed on your linux server, and configured to manage ingress into the server, exposing the endpoint which the [AttackForge Flow](https://support.attackforge.com/attackforge-enterprise/modules/flows) will communicate with. IP-whitelisting and Authorization Key is recommended to control authentication to the endpoint.
* Open Claw is configured to allow [Hooks](https://docs.openclaw.ai/automation/hooks) to register the agent action. NGINX should proxy-pass to the relevent hook. Hooks and Transforms are defined - which turn an AttackForge Flow webhook into an agent directive.
* The OpenClaw [Gateway](https://docs.openclaw.ai/gateway) is configured and running.
* OpenClaw has [AttackForge MCP](https://support.attackforge.com/attackforge-enterprise/modules/ai-mcp-and-skills) configured. The following MCP tools are required:
  * Find Project
  * Find Vulnerabilities
  * Patch Vulnerability
  * Update Vulnerability Status
  * Create Remediation Note
  * Get Args Schema for Tool
  * Get Field Structure
  * Count Vulnerabilities
* OpenClaw is connected to an AI Model. We used [Microsoft Foundry](https://azure.microsoft.com/en-us/products/ai-foundry) which adds extra layers of authorization, monitoring and control - however you can connect to any model supported by OpenClaw.
* OpenClaw has [Web Search](https://docs.openclaw.ai/tools/web) configured.
* OpenClaw [agents are configured](https://docs.openclaw.ai/gateway/config-agents) with `AGENTS.md`, `HEARTBEAT.md`, `IDENTITY.md`, `SOUL.md`, `TOOLS.md`, `USER.md`
* Testing tools are installed on the linux server and in-scope of the agent tools.

### 2. Configure Flows

In AttackForge, click on `Flows`. Click `New > Create Flow`.

<figure><img src="/files/2KOY7WfZ4zxth1facq1C" alt=""><figcaption></figcaption></figure>

Enter the following configuration:

* Enabled = `On`
* Trigger Type = `Action`
* Restrict to Entities:
  * `Project`
* **Action 1: Trigger Agent to Retest Project Vulnerabilities**
  * Method = `POST`
  * URL = `https://{{openclaw_hostname}}/hooks/{{hook_name}}`
  * Secrets:
    * `openclaw_hostname - the FQDN for your OpenClaw server`
    * `openclaw_api_key - <your hooks API key>`
    * `openclaw_retest_trigger_name - the name of your hook`
  * Headers:
    * `Content-Type - Value - application/json`

<figure><img src="/files/yVLEkFTmZKigbFbIJxmV" alt=""><figcaption></figcaption></figure>

* Request Script

```javascript
const body = {};

if (data.project?.project_id) {
  body.project_id = data.project.project_id;
}

if (!body.project_id) {
  return {
    decision: {
      status: 'abort',
      message: 'body is missing project_id. Exiting.',
    }
  };
}

return {
  decision: {
    status: 'continue',
     message: 'Trigger agent to start retesting',
  },
  request: {
    url: 'https://' + secrets.openclaw_hostname + '/hooks/' + secrets.openclaw_retest_trigger_name,
    headers: {
      'Authorization': 'Bearer ' + secrets.openclaw_api_key
    },
    body: body
  }
};
```

* Response Script

```javascript
if (response?.statusCode === 200) {
  return {
    decision: {
      status: 'finish',
      message: 'Agent successfully triggered!',
    }
  };
}
else {
  Logger.error(JSON.stringify(response));
  return {
    decision: {
      status: 'abort',
      message: 'Error triggering Agent',
    }
  };
}
```

Click `Create`. Your Flow is now ready 😊

### 3. Configure Actions

Click on `Actions` in the main navigation menu. Click on `All Actions`.

<figure><img src="/files/9kjwyrMPMVlqW1qPUjMe" alt=""><figcaption></figcaption></figure>

Select `System Actions`. Click on `New`.

<figure><img src="/files/1uEhxUfATl1O89SftbWf" alt=""><figcaption></figcaption></figure>

Enter the following configuration:

* Entities:
  * `Project`
* Flows
  * `Select your flow from the previous step`

Click `Create`.

<figure><img src="/files/oDRG225Wvs027sWya5Tg" alt=""><figcaption></figcaption></figure>

Your Action is now created and ready for use 😊

> **REMINDER**: Don't forget to give other people access to your Action if you need to roll this workflow out to more people than yourself.

Navigate to any project and notice that your workflow is now ready to launch from your Actions menu:

<figure><img src="/files/5gKE09QXOHFEeMGFmeOx" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/fHQPbD0NG357l4LFrMYz" alt=""><figcaption></figcaption></figure>

Your agent will retest the instructed vulnerabilities, and update the findings on the vulnerability from the retest - such as vulnerability status (re-open or close) and creating remediation notes.

<figure><img src="/files/Qej6AP0HcKqLDRLgJFOS" alt=""><figcaption></figcaption></figure>

### 4. Monitoring Agent Retesting Progress

The OpenClaw Gateway [Control UI](https://docs.openclaw.ai/web/control-ui) can be used to monitor agent sessions and live agent testing progress.

<figure><img src="/files/LhpwVtRLCNOqJqr3svYp" alt=""><figcaption></figcaption></figure>

Click into the session to see what the agent is doing.

<figure><img src="/files/qiaCa959KoTjdNxXIEuG" alt=""><figcaption></figcaption></figure>

## Agentic Executive Summary

<figure><img src="/files/TrQgvayc1waMrGuYbxTf" alt=""><figcaption></figcaption></figure>

You can use AI to analyze your data on a project and create an executive summary for you.

The main advantages of using AI agents for it:

* **Speed to draft.** What takes a senior consultant two to four hours can be produced in seconds from the same underlying findings, removing the exec summary as the last-mile bottleneck on report delivery.
* **Consistency across testers and engagements.** Different consultants have different voices, hedging habits, and interpretations of what "high risk" reads like in prose. AI drawing on shared finding data and a house style guide produces summaries that sound like one firm, not seven contractors - especially valuable for consultancies, MSSPs, and internal teams whose reports end up side-by-side in board packs.
* **Technical-to-business translation.** AI is genuinely strong at re-registering "SMB relay → Kerberoast → DA in 90 minutes" as "an attacker could reach domain administrator access within two hours, exposing customer data and financial systems." That translation is the skill many technical testers find tedious to do well every time.
* **Audience tailoring from one source.** The same finding set can be rendered for the board, engineering leadership, or an external auditor - different emphasis, tone, and level of technical detail - without rewriting from scratch.
* **Cross-finding narrative.** AI can surface threads a tester writing one finding at a time might miss: "three of your five criticals share a root cause in identity misconfiguration," or "the exploitable chain runs through unpatched edge infrastructure." That thematic framing is often what executives actually act on.
* **Language and localisation.** Producing the summary in the client's preferred language without a separate translation pass - useful for multinational clients and localised engagements.
* **Frees senior time for higher-value work.** Testers edit rather than compose, which is faster and better-suited to their comparative advantage: judgement on what matters, not prose construction.
* **More consistent risk framing over time.** Because the AI works from structured finding data (severity, asset criticality, exploitability), the language it uses to describe risk stays calibrated across reports - reducing the drift where "critical" quietly starts meaning different things in different engagements.

> **IMPORTANT:** AI drafts need human sign-off. Hallucinated ratings, misattributed findings, or overconfident business-impact claims are worse in an exec summary than a slightly clunkier human-written one. The model is AI-as-first-draft, tester-as-editor - that's where the time savings and consistency wins actually come from without the reputational risk of shipping unreviewed text to a customer.

The example below utilizes the following components in order to create an executive summary for a pentest using AI agents:

* AttackForge [Actions](/attackforge-enterprise/actions.md)
* AttackForge [Flows](/attackforge-enterprise/modules/flows.md)
* [OpenClaw](https://openclaw.ai/)
* [Microsoft Foundry](https://azure.microsoft.com/en-us/products/ai-foundry)

> **IMPORTANT**: Although this example uses OpenClaw and Microsoft Foundry - you can tailor this example to use *any AI agentic systems*, including your own existing agents.

### 1. Creating and Triggering an Agent

This example utilizes [OpenClaw](https://openclaw.ai/) and [Microsoft Foundry](https://azure.microsoft.com/en-us/products/ai-foundry). However you can use *any AI agentic systems*, including your own existing agents.

The following diagram illustrates the key components utilized in this workflow.

<figure><img src="/files/55jLXkItyGVbUePT7vhu" alt=""><figcaption></figcaption></figure>

> **IMPORTANT:** Please ensure to security harden your OpenClaw environment as the default settings for OpenClaw is inherently insecure.

**Notes:**

* OpenClaw is running on a Linux server hosted somewhere on your infrastructure.
* NGINX reverse proxy is installed on your linux server, and configured to manage ingress into the server, exposing the endpoint which the [AttackForge Flow](https://support.attackforge.com/attackforge-enterprise/modules/flows) will communicate with. IP-whitelisting and Authorization Key is recommended to control authentication to the endpoint.
* Open Claw is configured to allow [Hooks](https://docs.openclaw.ai/automation/hooks) to register the agent action. NGINX should proxy-pass to the relevent hook. Hooks and Transforms are defined - which turn an AttackForge Flow webhook into an agent directive.
* The OpenClaw [Gateway](https://docs.openclaw.ai/gateway) is configured and running.
* OpenClaw has [AttackForge MCP](https://support.attackforge.com/attackforge-enterprise/modules/ai-mcp-and-skills) configured. The following MCP tools are required:
  * Find Project
  * Find Vulnerabilities
  * Find Project Reporting Fields
  * Patch Project Reporting Fields
  * Get Args Schema for Tool
  * Get Field Structure
* OpenClaw is connected to an AI Model. We used [Microsoft Foundry](https://azure.microsoft.com/en-us/products/ai-foundry) which adds extra layers of authorization, monitoring and control - however you can connect to any model supported by OpenClaw.
* OpenClaw has [Web Search](https://docs.openclaw.ai/tools/web) configured.
* OpenClaw [agents are configured](https://docs.openclaw.ai/gateway/config-agents) with `AGENTS.md`, `HEARTBEAT.md`, `IDENTITY.md`, `SOUL.md`, `TOOLS.md`, `USER.md`
* Testing tools are installed on the linux server and in-scope of the agent tools.

#### Prompt Example

You can use [this prompt example](https://support.attackforge.com/attackforge-enterprise/modules/ai-mcp-and-skills#generate-pentest-executive-summary) for guiding your agent to create an executive summary.

### 2. Configure Flows

In AttackForge, click on `Flows`. Click `New > Create Flow`.

<figure><img src="/files/2KOY7WfZ4zxth1facq1C" alt=""><figcaption></figcaption></figure>

Enter the following configuration:

* Enabled = `On`
* Trigger Type = `Action`
* Restrict to Entities:
  * `Project`
* **Action 1: Trigger Agent To Create Exec Summary**
  * Method = `POST`
  * URL = `https://{{openclaw_hostname}}/hooks/{{hook_name}}`
  * Secrets:
    * `openclaw_hostname - the FQDN for your OpenClaw server`
    * `openclaw_api_key - <your hooks API key>`
    * `openclaw_exec_summary_trigger_name - the name of your hook`
  * Headers:
    * `Content-Type - Value - application/json`

<figure><img src="/files/Iq1JwzsHqP5pro9UJs2C" alt=""><figcaption></figcaption></figure>

* Request Script

```javascript
const body = {};

if (data.project?.project_id) {
  body.project_id = data.project.project_id;
}

if (!body.project_id) {
  return {
    decision: {
      status: 'abort',
      message: 'body is missing project_id. Exiting.',
    }
  };
}

return {
  decision: {
    status: 'continue',
     message: 'Trigger agent to create executive summary for project',
  },
  request: {
    url: 'https://' + secrets.openclaw_hostname + '/hooks/' + secrets.openclaw_exec_summary_trigger_name,
    headers: {
      'Authorization': 'Bearer ' + secrets.openclaw_api_key
    },
    body: body
  }
};
```

* Response Script

```javascript
if (response?.statusCode === 200) {
  return {
    decision: {
      status: 'finish',
      message: 'Agent successfully triggered!',
    }
  };
}
else {
  Logger.error(JSON.stringify(response));
  return {
    decision: {
      status: 'abort',
      message: 'Error triggering Agent',
    }
  };
}
```

Click `Create`. Your Flow is now ready 😊

### 3. Configure Actions

Click on `Actions` in the main navigation menu. Click on `All Actions`.

<figure><img src="/files/9kjwyrMPMVlqW1qPUjMe" alt=""><figcaption></figcaption></figure>

Select `System Actions`. Click on `New`.

<figure><img src="/files/1uEhxUfATl1O89SftbWf" alt=""><figcaption></figcaption></figure>

Enter the following configuration:

* Entities:
  * `Project`
* Flows
  * `Select your flow from the previous step`

Click `Create`.

<figure><img src="/files/wqB2Pyiu9CwbdjdS0TPF" alt=""><figcaption></figcaption></figure>

Your Action is now created and ready for use 😊

> **REMINDER**: Don't forget to give other people access to your Action if you need to roll this workflow out to more people than yourself.

Navigate to any project and notice that your workflow is now ready to launch from your Actions menu:

<figure><img src="/files/5gcJxT96YcB2vAEyk50G" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/hmETWVwxekuZhxeH2yxI" alt=""><figcaption></figcaption></figure>

Your agent will analyze your project, and update the executive summary in the `Reporting` section.

<figure><img src="/files/CDABIaKpeSkZgTtQRSUP" alt=""><figcaption></figcaption></figure>

### 4. Monitoring Agent Exec Summary Reporting Progress

The OpenClaw Gateway [Control UI](https://docs.openclaw.ai/web/control-ui) can be used to monitor agent sessions and live agent testing progress.

<figure><img src="/files/LhpwVtRLCNOqJqr3svYp" alt=""><figcaption></figcaption></figure>

Click into the session to see what the agent is doing.

<figure><img src="/files/iB6RawpTUjRpYH2GmzWy" alt=""><figcaption></figcaption></figure>

## Agentic Attack Chain Analysis

<figure><img src="/files/Ons3TbTjRjhpSEtVtxDK" alt=""><figcaption></figcaption></figure>

You can use AI to analyze your data on a project and create attack chains for you.

Attack Chains turn a list of findings into a real story with impact. This shift unlocks many benefits which a usual vulnerability list cannot show:

* **Demonstrate real impact**. A report full of "medium" issues — a misconfigured share here, a weak service account there, an outdated Confluence page — tends to get triaged into oblivion. Chain them together into "anonymous foothold → credential harvest → lateral movement → domain admin → crown jewels," and suddenly the same findings represent an existential business risk. The attack chain proves the *so what?*, which is usually what executives and risk owners actually care about.
* **Forces realism**. Individual vulns are scored in isolation using CVSS or other, but attackers don't operate that way. Demonstrating the attack chain proves the path is actually walkable in the target environment, not just theoretically exploitable. Findings that looked scary on paper sometimes don't chain to anything meaningful, and findings that looked boring sometimes turn out to be the linchpin. That's much better signal for prioritization than severity scores alone.
* **Remediate faster with&#x20;*****break-chain*****&#x20;thinking rather than&#x20;*****fix-everything***. If five distinct findings are required to reach impact, the defender doesn't necessarily need to fix all five — breaking any one link disrupts the path. That's often significantly cheaper and faster than full remediation, and it gives the client a defensible interim posture while longer-term fixes land.
* **Map cleanly onto frameworks like MITRE ATT\&CK and Cyber Kill Chain**. Give the blue team a shared vocabulary. Each stage becomes a detection opportunity: if recon was caught, the chain stops at stage one; if not, where else could it have been broken? This feeds directly into purple-team exercises, SOC tuning, and tabletop scenarios.
* **Expose systemic weaknesses that single findings hide**. Over-permissioned service accounts, flat networks, missing egress controls, identity sprawl. Those root causes rarely show up as a single CVE but fall out clearly when you look at how an attacker actually moved from end-to-end.

<figure><img src="/files/lPqFwWPlbRaNhyTkvKst" alt=""><figcaption></figcaption></figure>

The main advantages of using AI agents for it:

* **Speed to insight**: What takes a tester hours of correlating findings, mapping techniques, and drafting narrative can be produced in seconds - freeing time for validation, exploitation, and creative attack work rather than write-up.
* **Pattern recognition across findings**: AI is good at spotting non-obvious chains where individually low or medium severity issues combine into a critical compromise path (e.g., info disclosure → credential reuse → lateral movement). Humans routinely miss these under time pressure.
* **Consistent framework mapping**: Techniques get mapped to MITRE ATT\&CK / Kill Chain phases uniformly across projects and testers, which makes chains comparable engagement-to-engagement and defensible in client conversations.
* **Executive translation**: AI can render the same chain at multiple audience levels - a technical walkthrough for the blue team and a business-impact narrative for the CISO/board - from one underlying set of findings.
* **Scale across the portfolio**: For consultancies and MSSPs, AI can generate chains for dozens of concurrent projects and surface recurring patterns across clients (e.g., "misconfigured SSO keeps appearing as the pivot in 60% of your chains"), which is very hard to do manually.
* **Levelling up junior testers**: A less-experienced consultant can produce senior-quality analytical narrative with AI assistance, which raises baseline report quality without waiting for the senior reviewer.
* **Reproducibility and auditability**: Given the same finding set, AI produces structured, comparable outputs - useful for retest deltas, year-over-year trending, and demonstrating methodology rigour to enterprise buyers.
* **Better remediation prioritisation**: Framing findings as chains (rather than a flat list) helps clients see which single fix breaks the most attack paths, which usually produces better security ROI than patching by CVSS score alone.

> **IMPORTANT:** AI-generated chains still need a human tester to validate that the proposed pivot actually works in the target environment, and to catch hallucinated techniques or infeasible transitions. The value is in acceleration and consistency, not replacing the tester's judgement.

The example below utilizes the following components in order to perform attack chain analysis using AI agents, then ingest their findings into AttackForge:

* AttackForge [Actions](/attackforge-enterprise/actions.md)
* AttackForge [Flows](/attackforge-enterprise/modules/flows.md)
* [OpenClaw](https://openclaw.ai/)
* [Microsoft Foundry](https://azure.microsoft.com/en-us/products/ai-foundry)

> **IMPORTANT**: Although this example uses OpenClaw and Microsoft Foundry - you can tailor this example to use *any AI agentic systems*, including your own existing agents.

### 1. Creating and Triggering an Agent

This example utilizes [OpenClaw](https://openclaw.ai/) and [Microsoft Foundry](https://azure.microsoft.com/en-us/products/ai-foundry). However you can use *any AI agentic systems*, including your own existing agents.

The following diagram illustrates the key components utilized in this workflow.

<figure><img src="/files/55jLXkItyGVbUePT7vhu" alt=""><figcaption></figcaption></figure>

> **IMPORTANT:** Please ensure to security harden your OpenClaw environment as the default settings for OpenClaw is inherently insecure.

**Notes:**

* OpenClaw is running on a Linux server hosted somewhere on your infrastructure.
* NGINX reverse proxy is installed on your linux server, and configured to manage ingress into the server, exposing the endpoint which the [AttackForge Flow](https://support.attackforge.com/attackforge-enterprise/modules/flows) will communicate with. IP-whitelisting and Authorization Key is recommended to control authentication to the endpoint.
* Open Claw is configured to allow [Hooks](https://docs.openclaw.ai/automation/hooks) to register the agent action. NGINX should proxy-pass to the relevent hook. Hooks and Transforms are defined - which turn an AttackForge Flow webhook into an agent directive.
* The OpenClaw [Gateway](https://docs.openclaw.ai/gateway) is configured and running.
* OpenClaw has [AttackForge MCP](https://support.attackforge.com/attackforge-enterprise/modules/ai-mcp-and-skills) configured. The following MCP tools are required:
  * Find Project
  * Find Vulnerabilities
  * Get Args Schema for Tool
  * Get Field Structure
* OpenClaw uses the [Upload Workspace File API](https://support.attackforge.com/attackforge-enterprise/modules/self-service-restful-api/uploadworkspacefile) to upload the attack chains to the project's workspace.
* OpenClaw is connected to an AI Model. We used [Microsoft Foundry](https://azure.microsoft.com/en-us/products/ai-foundry) which adds extra layers of authorization, monitoring and control - however you can connect to any model supported by OpenClaw.
* OpenClaw has [Web Search](https://docs.openclaw.ai/tools/web) configured.
* OpenClaw [agents are configured](https://docs.openclaw.ai/gateway/config-agents) with `AGENTS.md`, `HEARTBEAT.md`, `IDENTITY.md`, `SOUL.md`, `TOOLS.md`, `USER.md`
* Testing tools are installed on the linux server and in-scope of the agent tools.

#### Skills Example

You can use [this skills example](https://support.attackforge.com/attackforge-enterprise/modules/ai-mcp-and-skills#interactive-attack-chain-explorer) for guiding your agent to perform attack chain analysis and to produce the relevent output files.

### 2. Configure Flows

In AttackForge, click on `Flows`. Click `New > Create Flow`.

<figure><img src="/files/2KOY7WfZ4zxth1facq1C" alt=""><figcaption></figcaption></figure>

Enter the following configuration:

* Enabled = `On`
* Trigger Type = `Action`
* Restrict to Entities:
  * `Project`
* **Action 1: Trigger Agent To Create Attack Chain**
  * Method = `POST`
  * URL = `https://{{openclaw_hostname}}/hooks/{{hook_name}}`
  * Secrets:
    * `openclaw_hostname - the FQDN for your OpenClaw server`
    * `openclaw_api_key - <your hooks API key>`
    * `openclaw_attack_chain_trigger_name - the name of your hook`
  * Headers:
    * `Content-Type - Value - application/json`

<figure><img src="/files/UsMLiVHZVY5wURL3oTWe" alt=""><figcaption></figcaption></figure>

* Request Script

```javascript
const body = {};

if (data.project?.project_id) {
  body.project_id = data.project.project_id;
}

if (!body.project_id) {
  return {
    decision: {
      status: 'abort',
      message: 'body is missing project_id. Exiting.',
    }
  };
}

return {
  decision: {
    status: 'continue',
     message: 'Trigger agent to start attack chain analysis',
  },
  request: {
    url: 'https://' + secrets.openclaw_hostname + '/hooks/' + secrets.openclaw_attack_chain_trigger_name,
    headers: {
      'Authorization': 'Bearer ' + secrets.openclaw_api_key
    },
    body: body
  }
};
```

* Response Script

```javascript
if (response?.statusCode === 200) {
  return {
    decision: {
      status: 'finish',
      message: 'Agent successfully triggered!',
    }
  };
}
else {
  Logger.error(JSON.stringify(response));
  return {
    decision: {
      status: 'abort',
      message: 'Error triggering Agent',
    }
  };
}
```

Click `Create`. Your Flow is now ready 😊

### 3. Configure Actions

Click on `Actions` in the main navigation menu. Click on `All Actions`.

<figure><img src="/files/9kjwyrMPMVlqW1qPUjMe" alt=""><figcaption></figcaption></figure>

Select `System Actions`. Click on `New`.

<figure><img src="/files/1uEhxUfATl1O89SftbWf" alt=""><figcaption></figcaption></figure>

Enter the following configuration:

* Entities:
  * `Project`
* Flows
  * `Select your flow from the previous step`

Click `Create`.

<figure><img src="/files/TZIbfY43WT85NUgxRdWJ" alt=""><figcaption></figcaption></figure>

Your Action is now created and ready for use 😊

> **REMINDER**: Don't forget to give other people access to your Action if you need to roll this workflow out to more people than yourself.

Navigate to any project and notice that your workflow is now ready to launch from your Actions menu:

<figure><img src="/files/GBwWHELxJijcGWRvpinD" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/VOT6xLS4hmETDeTO3g0c" alt=""><figcaption></figcaption></figure>

Your agent will analyze your project, create the attack chains, store them in a file and upload that file to the `Workspace` section.

<figure><img src="/files/c3lK1HUnzCkpHONd4lYZ" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/K91dfjAMXGYXou0LxXUO" alt=""><figcaption></figcaption></figure>

### 4. Monitoring Agent Attack Chain Analysis Progress

The OpenClaw Gateway [Control UI](https://docs.openclaw.ai/web/control-ui) can be used to monitor agent sessions and live agent testing progress.

<figure><img src="/files/LhpwVtRLCNOqJqr3svYp" alt=""><figcaption></figcaption></figure>

Click into the session to see what the agent is doing.

<figure><img src="/files/1EmTsiRp7tynWgkfhFnm" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://support.attackforge.com/attackforge-enterprise/ai-agentic-workflows.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
