Skip to content

Latest commit

 

History

History
213 lines (176 loc) · 14.3 KB

File metadata and controls

213 lines (176 loc) · 14.3 KB

AutoIT Swarm Architecture

This document describes the system architecture and design of the AutoIT Swarm platform.

🏗️ System Overview

┌─────────────────────────────────────────────────────────────────────────┐
│                           Client Layer                                   │
│  ┌─────────────┐  ┌─────────────┐  ┌─────────────┐  ┌─────────────┐    │
│  │   Web UI    │  │  CLI Tool   │  │  REST API   │  │  Socket.IO  │    │
│  └─────────────┘  └─────────────┘  └─────────────┘  └─────────────┘    │
└─────────────────────────────────────────────────────────────────────────┘
                                    ↓
┌─────────────────────────────────────────────────────────────────────────┐
│                         Application Layer                                │
│  ┌─────────────────────────────────────────────────────────────────┐    │
│  │                      Flask Web Server                            │    │
│  └─────────────────────────────────────────────────────────────────┘    │
│  ┌─────────────────────────────────────────────────────────────────┐    │
│  │                      Task Management Core                        │    │
│  │  ┌──────────┐  ┌──────────┐  ┌──────────┐  ┌──────────┐        │    │
│  │  │  Queue   │  │ Scheduler│  │ Progress │  │  State   │        │    │
│  │  │ Manager  │  │          │  │ Tracker  │  │ Manager  │        │    │
│  │  └──────────┘  └──────────┘  └──────────┘  └──────────┘        │    │
│  └─────────────────────────────────────────────────────────────────┘    │
└─────────────────────────────────────────────────────────────────────────┘
                                    ↓
┌─────────────────────────────────────────────────────────────────────────┐
│                           Agent Layer                                    │
│  ┌─────────────────────────────────────────────────────────────────┐    │
│  │                      Agent Orchestrator                          │    │
│  └─────────────────────────────────────────────────────────────────┘    │
│  ┌─────────────┐  ┌─────────────┐  ┌─────────────┐  ┌─────────────┐    │
│  │  CEO Agent  │  │   Project   │  │  Senior     │  │   Junior    │    │
│  │             │  │  Manager    │  │  Developer  │  │  Developer  │    │
│  └─────────────┘  └─────────────┘  └─────────────┘  └─────────────┘    │
│  ┌─────────────┐  ┌─────────────┐  ┌─────────────┐  ┌─────────────┐    │
│  │  QA Agent   │  │   DevOps    │  │  Security   │  │    DB       │    │
│  │             │  │   Agent     │  │   Agent     │  │   Agent     │    │
│  └─────────────┘  └─────────────┘  └─────────────┘  └─────────────┘    │
│  ┌─────────────┐  ┌─────────────┐  ┌─────────────┐                     │
│  │    UI/UX    │  │  Technical  │  │   Support   │                     │
│  │   Agent     │  │   Writer    │  │   Agent     │                     │
│  └─────────────┘  └─────────────┘  └─────────────┘                     │
│  ┌─────────────────────────────────────────────────────────────────┐    │
│  │              Dynamic Sub-Agent Factory                          │    │
│  └─────────────────────────────────────────────────────────────────┘    │
└─────────────────────────────────────────────────────────────────────────┘
                                    ↓
┌─────────────────────────────────────────────────────────────────────────┐
│                          Intelligence Layer                              │
│  ┌─────────────────────────────────────────────────────────────────┐    │
│  │                      Ollama LLM Backend                          │    │
│  │                    (Local Model Inference)                       │    │
│  └─────────────────────────────────────────────────────────────────┘    │
│  ┌─────────────────────────────────────────────────────────────────┐    │
│  │                    ChromaDB Vector Store                         │    │
│  │                  (Memory & Context Storage)                      │    │
│  └─────────────────────────────────────────────────────────────────┘    │
└─────────────────────────────────────────────────────────────────────────┘
                                    ↓
┌─────────────────────────────────────────────────────────────────────────┐
│                         HITL Layer                                       │
│  ┌─────────────────────────────────────────────────────────────────┐    │
│  │                  Human-in-the-Loop Interface                     │    │
│  │              (Escalation, Review, Approval)                      │    │
│  └─────────────────────────────────────────────────────────────────┘    │
└─────────────────────────────────────────────────────────────────────────┘

🔄 Request Flow

Client Request → CEO Agent → Task Delegation → Specialized Agents → Delivery
                                              ↓
                                    Human-in-the-Loop (if needed)

Detailed Flow

  1. Request Intake

    • Client submits request via Web UI, CLI, or API
    • Request is queued in Task Management Core
  2. CEO Analysis

    • CEO Agent receives the task
    • Analyzes requirements and complexity
    • Determines if dynamic sub-agents are needed
  3. Task Delegation

    • Project Manager creates task breakdown
    • Tasks are assigned to appropriate agents
    • Smart Agent Registry routes to best-fit agents
  4. Execution

    • Specialized agents execute their assigned tasks
    • Progress is tracked in real-time (0-100%)
    • Agents collaborate via shared context
  5. Quality Gates

    • QA Agent validates outputs
    • Security Agent reviews for vulnerabilities
    • Complex decisions escalate to HITL
  6. Delivery

    • Final output is compiled
    • Task marked as completed
    • Results delivered to client

🧩 Core Components

Task Management Core

Component Responsibility
Queue Manager Task prioritization and ordering
Scheduler Task timing and dependencies
Progress Tracker Real-time progress monitoring (0-100%)
State Manager Task state transitions

Agent System

Agent Role
CEO Strategic decisions, task analysis, sub-agent creation
Project Manager Task breakdown, scheduling, coordination
Senior Developer Complex implementation, architecture
Junior Developer Supporting development tasks
UI/UX Designer Interface and experience design
QA Testing Quality assurance and testing
DevOps Deployment and infrastructure
Security Security audits and reviews
Database Admin Database design and optimization
Technical Writer Documentation creation
Support User support and issue resolution

Dynamic Sub-Agent Factory

Creates specialized agents on-demand:

  • Analyzes task requirements
  • Generates appropriate agent capabilities
  • Routes to existing agents when possible
  • Creates temporary agents for unique needs

📦 Data Flow

┌──────────────┐     ┌──────────────┐     ┌──────────────┐
│   Request    │ →   │   Context    │ →   │    Agent     │
│   Input      │     │   Building   │     │   Processing │
└──────────────┘     └──────────────┘     └──────────────┘
                            ↓                      ↓
                     ┌──────────────┐     ┌──────────────┐
                     │   ChromaDB   │     │    Ollama    │
                     │   Vector     │     │    LLM       │
                     │   Store      │     │   Inference  │
                     └──────────────┘     └──────────────┘
                            ↓                      ↓
                     ┌──────────────┐     ┌──────────────┐
                     │   Memory     │     │   Response   │
                     │   Retrieval  │     │  Generation  │
                     └──────────────┘     └──────────────┘

🔌 Integration Points

Ollama Integration

  • Local LLM inference
  • Model configuration via config.yaml
  • Supports all Ollama-compatible models
  • No cloud dependencies

ChromaDB Integration

  • Vector storage for agent memory
  • Context retrieval for conversations
  • Persistent task history
  • Semantic search capabilities

Socket.IO Integration

  • Real-time bidirectional communication
  • Live task updates
  • Progress synchronization
  • Dashboard auto-refresh

🛡️ Security Architecture

  • Local-First: All processing stays on local machine
  • No External APIs: No data sent to cloud services
  • HITL Controls: Human approval for sensitive operations
  • Audit Trail: Complete logging of all actions

📈 Scalability Design

  • Concurrent Processing: Multiple tasks executed in parallel
  • Agent Pooling: Efficient resource utilization
  • Queue Management: Intelligent task prioritization
  • Stateless Design: Easy horizontal scaling (future)

🔗 Related Documentation


Want to learn more? Check out the Agents Guide for detailed agent capabilities.