Skip to main content

Function: voiceNode()

voiceNode(id, config): VoiceNodeBuilder

Defined in: packages/agentos/src/orchestration/builders/VoiceNodeBuilder.ts:72

Create a new VoiceNodeBuilder for a voice pipeline graph node.

This is the primary entry point for the voice node DSL. Use the returned builder's .on() method to add exit-reason routes and .build() to produce the GraphNode IR object.

Parameters​

id​

string

Unique node identifier within the parent graph. Must be unique across all nodes in the graph to avoid collision in the edge map and checkpoint scratch keys.

config​

VoiceNodeConfig

Voice pipeline configuration for this node (mode, STT/TTS overrides, turn limits, exit conditions).

Returns​

VoiceNodeBuilder

A fluent builder; call .on() to add exit-reason routes and .build() to produce the GraphNode IR object.

Example​

const node = voiceNode('greet', { mode: 'conversation' })
.on('completed', 'process')
.on('hangup', 'cleanup')
.build();

See​

VoiceNodeBuilder -- the returned builder class.