@@ -12,6 +12,7 @@ import { NetworkPolicy } from './sdk/network-policy';
1212import { GatewayConfig } from './sdk/gateway-config' ;
1313import { McpConfig } from './sdk/mcp-config' ;
1414import { Scenario } from './sdk/scenario' ;
15+ import { ScenarioBuilder } from './sdk/scenario-builder' ;
1516import { Secret } from './sdk/secret' ;
1617
1718// Import types used in this file
@@ -2012,7 +2013,8 @@ export class McpConfigOps {
20122013 *
20132014 * ## Quickstart
20142015 *
2015- * Use `fromId()` to get a {@link Scenario} by ID, or `list()` to retrieve all scenarios.
2016+ * Use `fromId()` to get a {@link Scenario} by ID, `list()` to retrieve all scenarios,
2017+ * or `builder()` to construct a new scenario with a fluent API.
20162018 * Once you have a scenario, call `scenario.run()` to start a {@link ScenarioRun} with
20172019 * your agent mounted.
20182020 *
@@ -2056,6 +2058,26 @@ export class ScenarioOps {
20562058 */
20572059 constructor ( private client : RunloopAPI ) { }
20582060
2061+ /**
2062+ * Create a new {@link ScenarioBuilder} for constructing a scenario with a fluent API.
2063+ *
2064+ * @example
2065+ * ```typescript
2066+ * const runloop = new RunloopSDK();
2067+ * const scenario = await runloop.scenario
2068+ * .builder('my-scenario')
2069+ * .withProblemStatement('Fix the bug in main.py')
2070+ * .addTestCommandScorer('tests', { test_command: 'pytest' })
2071+ * .push();
2072+ * ```
2073+ *
2074+ * @param {string } name - Name for the scenario
2075+ * @returns {ScenarioBuilder } A {@link ScenarioBuilder} instance
2076+ */
2077+ builder ( name : string ) : ScenarioBuilder {
2078+ return new ScenarioBuilder ( name , this . client ) ;
2079+ }
2080+
20592081 /**
20602082 * Get a scenario object by its ID.
20612083 *
0 commit comments