Skip to main content

System Architecture

The deployment system uses a plugin-based architecture where strategies are self-contained packages that can be added without modifying core code.

Module Breakdown

Directory Structure


Core Components

DeploymentFactory (factory.py)

The orchestrator that manages the full deployment pipeline. Responsibilities:
  • Coordinate selection, adaptation, and runner creation
  • Handle strategy validation
  • Create unified Software instances
Flow:

SelectorAgent (selector/agent.py)

LLM-based strategy selection that analyzes code and chooses the optimal deployment target. Responsibilities:
  • Gather selector instructions from all strategies
  • Query coding agent to analyze repository
  • Return DeploymentSetting with chosen strategy

AdapterAgent (adapter/agent.py)

Code transformation and deployment using coding agents. Responsibilities:
  • Create adapted workspace (copy of original)
  • Load adapter instructions for target strategy
  • Run coding agent to transform code
  • Extract endpoint URL and run interface from output
Key Output Extraction: The adapter looks for special XML tags in the coding agent’s output:

StrategyRegistry (strategies/base.py)

Auto-discovery system for deployment strategies. Responsibilities:
  • Scan strategies/ directory on startup
  • Load configuration and instructions for each strategy
  • Provide access to strategy metadata and runner classes

Runner (Abstract Base Class)

Infrastructure-specific execution handler.

DeployedSoftware (software.py)

Unified wrapper that users interact with.

Data Models

DeployConfig

DeploymentSetting

AdaptationResult


Strategy Plugin Architecture

Each strategy is a self-contained directory:

config.yaml Structure

How Strategies Are Discovered

  1. On import, StrategyRegistry scans strategies/ directory
  2. Each subdirectory with selector_instruction.md AND adapter_instruction.md is registered
  3. Runner classes are lazy-loaded from runner.py when needed
Adding a new strategy is just adding a directory - no code changes required in the core system.

Next Steps

Strategies Reference

Detailed guide to each deployment strategy

Adding New Strategies

Step-by-step guide to add your own deployment targets