Skip to content

Agent Pipeline Overview

AI TestPilot X orchestrates 10 specialized AI agents through a LangGraph stateful graph. Each agent has a single responsibility, typed inputs/outputs, and communicates via GlobalState.

Pipeline flow

graph TD
    A[User Story] --> B[RequirementAgent]
    B --> C[TestCaseAgent]
    C --> D[VerificationAgent]
    D --> E{Parallel}
    E --> F[SeleniumAgent]
    E --> G[APIAgent]
    F --> H[ExecutionAgent]
    G --> H
    H --> I{HITL Gate}
    I -->|Approved| J[BugAgent]
    J --> K[HealingAgent]
    K --> L[ReportAgent]
    L --> M[GO / GO_WITH_RISK / NO_GO]

    style I fill:#eab308,color:#000
    style M fill:#23c55e,color:#000

The 10 agents

01
RequirementAgent
Parses the user story into structured modules, risk areas, and priority classification using Gemini 2.5 Flash.
02
TestCaseAgent
Generates structured test cases (UI, API, edge cases) enriched with RAG context from the knowledge base.
03
VerificationAgent
Coverage analysis, duplicate detection, and edge case gap identification. Flags under-tested paths.
04
SeleniumAgent
Generates executable Python Selenium scripts with robust locator strategies per test case.
05
APIAgent
Generates HTTP test suites (httpx) with auth headers, request bodies, and response assertions.
06
ExecutionAgent
Runs tests in MOCK / LOCAL / GRID mode. Manages trust domains and the HITL approval gate.
07
BugAgent
Root cause analysis on failures. RAG correlation against historical bugs. Severity classification and clustering.
08
HealingAgent
Self-healing locator recovery: 7-level fallback from ID to AI-generated selectors. Patches tests automatically.
09
ReportAgent
Synthesizes all results into a GO / GO_WITH_RISK / NO_GO release decision with risk score and recommendations.

Agent details

For deep-dives on each agent:

GlobalState

All agents share a single GlobalState TypedDict threaded through the LangGraph graph:

class GlobalState(TypedDict):
    session_id: str
    story: str
    target_url: str
    execution_mode: str

    # Agent outputs
    requirements: list[Requirement]
    test_cases: list[TestCase]
    verification: VerificationResult
    selenium_scripts: list[SeleniumScript]
    api_tests: list[APITest]
    execution_results: list[ExecutionResult]
    bugs: list[Bug]
    healed_locators: list[HealedLocator]
    report: ReportOutput

    # Control flow
    hitl_approved: bool
    error: str | None
    checkpoint: str