3737from .async_blueprint import AsyncBlueprint
3838from ..lib .context_loader import TarFilter , build_directory_tar
3939from .async_storage_object import AsyncStorageObject
40+ from .async_scenario_builder import AsyncScenarioBuilder
4041from ..types .object_create_params import ContentType
4142from ..types .shared_params .agent_source import Git , Npm , Pip , Object
4243
@@ -773,6 +774,13 @@ class AsyncScenarioOps:
773774 >>> scenario = runloop.scenario.from_id("scn-xxx")
774775 >>> run = await scenario.run()
775776 >>> scenarios = await runloop.scenario.list()
777+
778+ Example using builder:
779+ >>> builder = runloop.scenario.builder("my-scenario")
780+ >>> builder.from_blueprint_id("bp-xxx")
781+ >>> builder.with_problem_statement("Fix the bug")
782+ >>> builder.add_test_scorer("tests", test_command="pytest")
783+ >>> scenario = await builder.push()
776784 """
777785
778786 def __init__ (self , client : AsyncRunloop ) -> None :
@@ -783,6 +791,16 @@ def __init__(self, client: AsyncRunloop) -> None:
783791 """
784792 self ._client = client
785793
794+ def builder (self , name : str ) -> AsyncScenarioBuilder :
795+ """Create a new scenario builder.
796+
797+ :param name: Name for the scenario
798+ :type name: str
799+ :return: A new AsyncScenarioBuilder instance
800+ :rtype: AsyncScenarioBuilder
801+ """
802+ return AsyncScenarioBuilder (self ._client , name )
803+
786804 def from_id (self , scenario_id : str ) -> AsyncScenario :
787805 """Get an AsyncScenario instance for an existing scenario ID.
788806
0 commit comments