@@ -11,6 +11,7 @@ import { NetworkPolicy } from './sdk/network-policy';
1111import { GatewayConfig } from './sdk/gateway-config' ;
1212import { McpConfig } from './sdk/mcp-config' ;
1313import { Scenario } from './sdk/scenario' ;
14+ import { ScenarioBuilder } from './sdk/scenario-builder' ;
1415import { Secret } from './sdk/secret' ;
1516
1617// Import types used in this file
@@ -1923,7 +1924,8 @@ export class McpConfigOps {
19231924 *
19241925 * ## Quickstart
19251926 *
1926- * Use `fromId()` to get a {@link Scenario} by ID, or `list()` to retrieve all scenarios.
1927+ * Use `fromId()` to get a {@link Scenario} by ID, `list()` to retrieve all scenarios,
1928+ * or `builder()` to construct a new scenario with a fluent API.
19271929 * Once you have a scenario, call `scenario.run()` to start a {@link ScenarioRun} with
19281930 * your agent mounted.
19291931 *
@@ -1967,6 +1969,26 @@ export class ScenarioOps {
19671969 */
19681970 constructor ( private client : RunloopAPI ) { }
19691971
1972+ /**
1973+ * Create a new {@link ScenarioBuilder} for constructing a scenario with a fluent API.
1974+ *
1975+ * @example
1976+ * ```typescript
1977+ * const runloop = new RunloopSDK();
1978+ * const scenario = await runloop.scenario
1979+ * .builder('my-scenario')
1980+ * .withProblemStatement('Fix the bug in main.py')
1981+ * .addTestCommandScorer('tests', { test_command: 'pytest' })
1982+ * .push();
1983+ * ```
1984+ *
1985+ * @param {string } name - Name for the scenario
1986+ * @returns {ScenarioBuilder } A {@link ScenarioBuilder} instance
1987+ */
1988+ builder ( name : string ) : ScenarioBuilder {
1989+ return new ScenarioBuilder ( name , this . client ) ;
1990+ }
1991+
19701992 /**
19711993 * Get a scenario object by its ID.
19721994 *
0 commit comments