Skip to content
experimental

Swarm QA Framework

A local-first multi-agent QA framework that explores applications, designs testing strategies, generates automation assets, executes Playwright suites, analyses failures, and supports controlled self-healing.

10

Agent types

5

Suite types

Ollama

Local models

About

The Swarm QA Framework is an experimental multi-agent system that uses local LLMs to automate QA workflows. It explores target applications, architects test strategies, generates Page Objects, creates test suites, executes them via Playwright, analyses failures, and proposes repairs — all with human review gates.

Problem

QA teams spend significant time on repetitive test creation and maintenance. This framework explores whether local-first AI agents can assist with exploration, strategy, test generation, failure analysis, and controlled self-healing while keeping humans in the loop.

Architecture

The framework uses a modular agent architecture. Each agent (Explorer, Architect, Auditor, Data Forger, POM Generator, Suite Creator, Failure Analyzer, Healer) operates independently and communicates via a shared registry. The registry stores application models, generated assets, run history, and the knowledge graph. All agents run locally using Ollama-hosted models.

Pipeline

SWARM_QA_FRAMEWORK_PIPELINE

01
Explorer
02
Architect
03
Auditor
04
Data Forger
05
POM Generator
06
Suite Creator
07
Playwright
08
Analyzer
09
Healer
10
Registry

Workflow

01Target URL → Explorer Agent analyses application structure
02Architect Agent designs testing strategy
03Auditor Agent reviews for coverage gaps
04Data Forger generates test fixtures
05POM Generator creates Page Objects
06Suite Creator builds smoke, API, regression, accessibility, and visual suites
07Playwright Validation executes suites and collects results
08Failure Analyzer classifies failures by type
09Healer proposes targeted repairs
10Registry updates run history and knowledge graph

Code

TypeScriptAgent loop entry point
const registry = new Registry();
const explorer = new ExplorerAgent({ model: 'ollama' });
const architect = new ArchitectAgent({ model: 'ollama' });

await registry.initialize(targetUrl);
const appModel = await explorer.explore(targetUrl);
const strategy = await architect.designStrategy(appModel);

const suites = await Promise.all(
  strategy.suites.map(s => suiteCreator.build(s, appModel))
);

const results = await playwrightValidator.execute(suites);
const failures = await failureAnalyzer.classify(results);

if (failures.length > 0) {
  const repairs = await healer.propose(failures);
  await registry.storeRepairs(repairs);
}
TypeScriptGenerated Page Object example
// Generated by POM Generator agent
export class LoginPage {
  readonly emailInput: Locator;
  readonly passwordInput: Locator;
  readonly submitButton: Locator;
  readonly errorMessage: Locator;

  constructor(private page: Page) {
    this.emailInput = page.locator('#email');
    this.passwordInput = page.locator('#password');
    this.submitButton = page.locator('button[type="submit"]');
    this.errorMessage = page.locator('.error-message');
  }

  async login(email: string, password: string) {
    await this.emailInput.fill(email);
    await this.passwordInput.fill(password);
    await this.submitButton.click();
  }
}

Quick start

Terminal
git clone https://github.com/ErvinAB/aiFramework.git
cd aiFramework && npm install
Ensure Ollama is running locally with a compatible model
cp .env.example .env and configure your model settings
npm run dev to start the agent API server
POST /api/explore with {"target": "http://your-app-url"}

Current functionality

  • Local Ollama models for privacy
  • Per-target isolation
  • Generated Page Objects and fixtures
  • Run history and failure classification
  • MCP knowledge graph integration
  • Real-time dashboard
  • Human approval before applying repairs
  • Suite types: Smoke, API, Regression, Accessibility, Visual

Limitations

  • Generated assertions may need review
  • Test quality depends on application context
  • API tests require documentation or known endpoints
  • Self-healing changes should be reviewed before applying
  • Generated coverage does not replace engineering judgement

Planned improvements

  • Expand supported suite types
  • Improve assertion accuracy
  • Add visual regression comparison
  • Enhance knowledge graph context
  • Add CI/CD integration templates

Technology

PlaywrightTypeScriptNode.jsOllamaMCPExpressFakerAxe

Status

experimental

This project is an active experimental framework. It is not production-ready and should be evaluated for your specific use case.

Interested in this project?

Stagbyte builds practical automation systems. If this project aligns with a problem you are solving, reach out to discuss how it can be adapted or extended.