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
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
DeploymentSettingwith 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
- On import,
StrategyRegistryscansstrategies/directory - Each subdirectory with
selector_instruction.mdANDadapter_instruction.mdis registered - Runner classes are lazy-loaded from
runner.pywhen needed
Next Steps
Strategies Reference
Detailed guide to each deployment strategy
Adding New Strategies
Step-by-step guide to add your own deployment targets