Skip to main content

Module Exports


DeploymentFactory

Factory for creating deployed Software instances.

Methods

create()

Create a deployed Software instance.
Parameters: Returns: Software instance with unified interface Raises:
  • ValueError if strategy not in allowed list
  • RuntimeError if adaptation fails
Example:

list_strategies()

List all available deployment strategies.
Returns: List of strategy names Example:

explain_strategy()

Get explanation of a deployment strategy.
Parameters: Returns: One-line description from selector instruction Example:

Print information about all deployment strategies.
Example:

DeployStrategy

Enum of available deployment strategies. Auto-generated from strategies/ directory.
Usage:

DeployConfig

Configuration for deploying software.
Fields: Properties: Example:

Software (Abstract Base Class)

Unified interface for deployed software. Users interact with this class.

Methods

run()

Execute the software with given inputs.
Parameters: Returns: Normalized response dictionary Response Format:
Example:

stop()

Stop the software and cleanup resources.
Behavior by Strategy: Example:

start()

Start or restart a stopped deployment.
Behavior by Strategy: Example:

logs()

Get execution logs.
Returns: Log content as string Example:

is_healthy()

Check if software is running and healthy.
Returns: True if healthy, False otherwise Example:

name (property)

Return the deployment strategy name.
Example:

Convenience Methods

call()

Shorthand for run().

run_batch()

Run multiple inputs in sequence.
Example:

Context Manager Support


DeployedSoftware

Concrete implementation of Software. Wraps any runner with unified interface.

Additional Methods

get_adapted_path()

Get path to the adapted code.
Example:

get_endpoint()

Get HTTP endpoint if applicable.
Returns: Endpoint URL or None Example:

get_deployment_info()

Get full deployment metadata.
Returns:

get_strategy()

Get the deployment strategy name.

get_provider()

Get the cloud provider name.

Data Classes

DeploymentSetting

Result of strategy selection.

AdaptationResult

Result of code adaptation.

DeploymentInfo

Metadata about the deployment.

SelectorAgent

LLM-based strategy selection agent.

Methods

select()

Select deployment configuration for a solution.

explain()

Get human-readable explanation of selection.
Example:

AdapterAgent

Code transformation and deployment agent.

Methods

adapt()

Adapt a solution for deployment.
Note: Creates a copy of the solution at {code_path}_adapted_{strategy}. Original is never modified.

StrategyRegistry

Auto-discovery system for deployment strategies.

Methods

get()

Get singleton registry instance.

list_strategies()

List available strategy names.

get_strategy()

Get strategy config by name.

get_selector_instruction()

Get selector instruction content.

get_adapter_instruction()

Get adapter instruction content.

get_runner_class()

Get the runner class for a strategy.

get_default_run_interface()

Get default run interface from config.yaml.

Runner (Abstract Base Class)

Base class for strategy-specific runners.

Lifecycle

Runners follow this lifecycle:
  1. __init__() → Ready state
  2. run() → Execute (can be called multiple times)
  3. stop() → Stopped state (resources cleaned up)
  4. start() → Ready state (can run again)

Abstract Methods


Complete Usage Example


Error Handling


Environment Variables