Skip to content

proffesor-for-testing/lionagi-qe-fleet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

48 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

LionAGI QE Fleet

Version License Python Security Tests PRs Welcome Sponsor

Agentic Quality Engineering powered by LionAGI

A Python reimplementation of the Agentic QE Fleet using LionAGI as the orchestration framework. This fleet provides 18 specialized AI agents for comprehensive software testing and quality assurance with production-ready CI/CD integration.

πŸš€ Features

Core Capabilities

  • 18 Specialized Agents: From test generation to deployment readiness
  • Multi-Model Routing: Intelligent model selection for cost optimization (up to 80% theoretical savings)
  • Parallel Execution: Async-first architecture for concurrent test operations
  • Execution Tracking: Foundation for continuous improvement and learning
  • Framework Agnostic: Works with pytest, Jest, Mocha, Cypress, and more

CI/CD Integration (v1.3.0) πŸ†•

  • REST API Server: 40+ FastAPI endpoints for test automation
    • Test generation, execution, coverage analysis
    • Quality gates, security scanning, performance testing
    • WebSocket streaming for real-time progress
    • JWT authentication and rate limiting
  • Python SDK: Async/sync client with fluent API
  • Artifact Storage: Pluggable backends (local, S3, CI-specific)
    • Automatic compression (60-80% reduction)
    • Retention policies and indexing
  • Badge Generation: Shields.io compatible SVG badges
    • Coverage, quality, security badges
    • Smart caching with ETag support
  • CLI Enhancements: CI mode with JSON output and standardized exit codes
  • Contract Testing: Pact-style consumer-driven contracts
  • Chaos Engineering: Resilience testing with fault injection

Advanced Features (v1.0.0)

  • alcall Integration: Automatic retry with exponential backoff (99%+ reliability)
  • Fuzzy JSON Parsing: Robust LLM output handling (95% fewer parse errors)
  • ReAct Reasoning: Multi-step test generation with think-act-observe loops
  • Observability Hooks: Real-time cost tracking with <1ms overhead
  • Streaming Progress: AsyncGenerator-based real-time updates
  • Code Analyzer: AST-based code structure analysis

Security & Quality

  • Security Score: 95/100 (see SECURITY.md)
  • Test Coverage: 82% (128+ comprehensive tests)
  • Code Quality: Refactored for maintainability (CC < 10)
  • Zero Breaking Changes: 100% backward compatible

πŸ“¦ Installation

Using uv (recommended)

uv add lionagi-qe-fleet

Using pip

pip install lionagi-qe-fleet

Development Installation

For contributing to the project:

git clone https://github.com/lionagi/lionagi-qe-fleet.git
cd lionagi-qe-fleet
uv venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate
uv pip install -e ".[dev]"
pytest  # Run tests

See CONTRIBUTING.md for detailed development setup and guidelines.

πŸƒ Quick Start

Basic Usage (Direct Session)

import asyncio
from lionagi import iModel, Session
from lionagi_qe import QETask
from lionagi_qe.agents import TestGeneratorAgent

async def main():
    # Create model and session
    model = iModel(provider="openai", model="gpt-4o-mini")
    session = Session()

    # Create agent
    agent = TestGeneratorAgent("test-gen", model)

    # Create and execute task
    task = QETask(
        task_type="generate_tests",
        context={
            "code": "def add(a, b): return a + b",
            "framework": "pytest"
        }
    )

    result = await agent.execute(task)
    print(result.test_code)

asyncio.run(main())

Using QEOrchestrator (Advanced)

from lionagi_qe import QEOrchestrator

async def orchestrated_workflow():
    # Initialize orchestrator with persistence
    orchestrator = QEOrchestrator(
        memory_backend="postgres",  # or "redis" or "memory"
        enable_learning=True
    )
    await orchestrator.initialize()

    # Execute workflow
    result = await orchestrator.execute_agent("test-generator", task)
    print(result)

Multi-Agent Pipeline

async def quality_pipeline():
    orchestrator = QEOrchestrator()
    await orchestrator.initialize()

    # Execute sequential pipeline
    result = await orchestrator.execute_pipeline(
        pipeline=[
            "test-generator",
            "test-executor",
            "coverage-analyzer",
            "quality-gate"
        ],
        context={
            "code_path": "./src",
            "coverage_threshold": 80
        }
    )

    print(f"Coverage: {result['coverage']}%")
    print(f"Quality Gate: {result['passed']}")

Parallel Agent Execution

async def parallel_analysis():
    orchestrator = QEOrchestrator()
    await orchestrator.initialize()

    # Run multiple agents in parallel
    results = await orchestrator.execute_parallel(
        agents=["test-generator", "security-scanner", "performance-tester"],
        tasks=[
            {"task": "generate_tests", "code": code1},
            {"task": "security_scan", "path": "./src"},
            {"task": "load_test", "endpoint": "/api/users"}
        ]
    )

    for agent_id, result in zip(agents, results):
        print(f"{agent_id}: {result}")

πŸ€– Available Agents

Core Testing (6 agents)

  • test-generator: Generate comprehensive test suites with edge cases
  • test-executor: Execute tests across multiple frameworks in parallel
  • coverage-analyzer: Identify coverage gaps using O(log n) algorithms
  • quality-gate: ML-driven quality validation and pass/fail decisions
  • quality-analyzer: Integrate ESLint, SonarQube, Lighthouse metrics
  • code-complexity: Analyze cyclomatic and cognitive complexity

Performance & Security (2 agents)

  • performance-tester: Load testing with k6, JMeter, Gatling
  • security-scanner: SAST, DAST, dependency scanning

Strategic Planning (3 agents)

  • requirements-validator: Testability analysis with INVEST criteria
  • production-intelligence: Incident replay and anomaly detection
  • fleet-commander: Orchestrate 50+ agents hierarchically

Advanced Testing (4 agents)

  • regression-risk-analyzer: Smart test selection via ML patterns
  • test-data-architect: Generate realistic test data (10k+ records/sec)
  • api-contract-validator: Detect breaking changes in APIs
  • flaky-test-hunter: 100% accuracy flaky test detection

Specialized (3 agents)

  • deployment-readiness: Multi-factor release risk assessment
  • visual-tester: AI-powered UI regression detection
  • chaos-engineer: Fault injection and resilience testing

πŸ“‹ Agent Coordination & Persistence

Memory Backends

Agents coordinate through a shared memory namespace (aqe/*) with multiple backend options:

Development (In-Memory):

orchestrator = QEOrchestrator(memory_backend="memory")

Production (PostgreSQL):

orchestrator = QEOrchestrator(
    memory_backend="postgres",
    postgres_url="postgresql://user:pass@localhost:5432/lionagi_qe"
)

Production (Redis):

orchestrator = QEOrchestrator(
    memory_backend="redis",
    redis_url="redis://localhost:6379/0"
)

Memory Namespace

aqe/
β”œβ”€β”€ test-plan/      # Test requirements and plans
β”œβ”€β”€ coverage/       # Coverage analysis results
β”œβ”€β”€ quality/        # Quality metrics and gates
β”œβ”€β”€ performance/    # Performance test results
β”œβ”€β”€ security/       # Security scan findings
β”œβ”€β”€ patterns/       # Learned test patterns
└── swarm/         # Multi-agent coordination

Setup Persistence

PostgreSQL (Recommended for production):

# Using Docker
docker run -d \
  -e POSTGRES_DB=lionagi_qe \
  -e POSTGRES_USER=qe_user \
  -e POSTGRES_PASSWORD=secure_password \
  -p 5432:5432 \
  postgres:16-alpine

# Initialize schema
python -m lionagi_qe.persistence.init_db

Redis (Fast, ephemeral):

docker run -d -p 6379:6379 redis:7-alpine

πŸ’‘ Advanced Features

Multi-Model Routing

Automatically route tasks to optimal models for cost efficiency:

orchestrator = QEOrchestrator(enable_routing=True)

# Simple tasks β†’ GPT-3.5 ($0.0004)
# Moderate tasks β†’ GPT-4o-mini ($0.0008)
# Complex tasks β†’ GPT-4 ($0.0048)
# Critical tasks β†’ Claude Sonnet 4.5 ($0.0065)

Q-Learning Integration

Agents learn from past executions with persistent storage:

# Enable learning with PostgreSQL backend
orchestrator = QEOrchestrator(
    enable_learning=True,
    memory_backend="postgres"
)

# Agents automatically improve through experience
# Target: 20% improvement over baseline
# Learning data persists across restarts

Custom Workflows with LionAGI Builder

Build complex workflows directly with LionAGI's Builder pattern:

from lionagi import Builder, Session

# Direct LionAGI usage (no wrapper)
session = Session()
builder = Builder("CustomQEWorkflow")

node1 = builder.add_operation("test-generator", context=ctx)
node2 = builder.add_operation("security-scanner", depends_on=[node1])
node3 = builder.add_operation("quality-gate", depends_on=[node1, node2])

result = await session.flow(builder.get_graph())

Or use QEOrchestrator for convenience:

from lionagi_qe import QEOrchestrator

orchestrator = QEOrchestrator()
result = await orchestrator.execute_workflow(builder.get_graph())

πŸ“š Documentation

Getting Started

Core Documentation

Migration Guides

Advanced Features

Reports & Analysis

Security & Quality

πŸ§ͺ Testing

# Run all tests
pytest

# Run with coverage
pytest --cov=src/lionagi_qe --cov-report=html

# Run specific test category
pytest tests/test_agents.py
pytest tests/test_orchestration.py

🀝 Contributing

We welcome contributions from the community! Whether you're fixing bugs, adding features, improving documentation, or helping others, your contributions are valued.

Ways to Contribute:

Please read our Contributing Guide and Code of Conduct before contributing.

πŸ‘₯ Community

  • GitHub Issues: Bug reports and feature requests
  • GitHub Discussions: Questions, ideas, and general discussion
  • Discord: Real-time chat and community support (link TBD)
  • Twitter: Updates and announcements (link TBD)

πŸ’¬ Support

πŸ”’ Security

We take security seriously. If you discover a security vulnerability, please see our Security Policy for reporting instructions.

Current Security Score: 95/100

  • βœ… All critical vulnerabilities fixed (v1.0.0)
  • βœ… Input validation and sanitization
  • βœ… Secure subprocess execution
  • βœ… Safe deserialization (JSON only)
  • βœ… Rate limiting and cost controls

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

Third-Party Licenses

This project builds on LionAGI (Apache 2.0 License).

πŸ“Š Project Status

Version: 1.2.0 (Production Ready) Status: Production Ready Security Score: 95/100 Test Coverage: 82% Performance: 5-10x faster than baseline

See CHANGELOG.md for release notes.

πŸ’– Support This Project

If LionAGI QE Fleet helps your work, consider supporting its development:

Become a Sponsor - $5/month or $50/year

Your support enables continued development, bug fixes, and new features.

πŸ™ Acknowledgments

πŸ”— Links


🦁 Powered by LionAGI - Because quality engineering demands intelligent agents

About

Agentic Quality Engineering Fleet powered by LionAGI

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors