diff --git a/packages/client/src/utils/BaseConnection.ts b/packages/client/src/utils/BaseConnection.ts index cbdc3e50..ecf2f4be 100644 --- a/packages/client/src/utils/BaseConnection.ts +++ b/packages/client/src/utils/BaseConnection.ts @@ -65,6 +65,8 @@ export type BaseSessionConfig = { textOnly?: boolean; userId?: string; environment?: string; + /** If set, the ElevenLabs agent workflow will start at this node id instead of the default entry node. */ + startingWorkflowNodeId?: string; }; export type ConnectionType = "websocket" | "webrtc"; diff --git a/packages/client/src/utils/overrides.ts b/packages/client/src/utils/overrides.ts index b67dd67a..ec8f30df 100644 --- a/packages/client/src/utils/overrides.ts +++ b/packages/client/src/utils/overrides.ts @@ -59,5 +59,9 @@ export function constructOverrides( }; } + if (config.startingWorkflowNodeId) { + overridesEvent.starting_workflow_node_id = config.startingWorkflowNodeId; + } + return overridesEvent; }