The SDK mirrors the node-and-edge model of the Voice Agent Builder. You create a Workflow, add nodes (startCall, agentNode, endCall, …) with add(), connect them with edge(), and persist the result via save_workflow.
Prerequisites#
- A Menace Voice API key exported as
DOGRAH_API_KEY - An existing agent ID to save drafts against (create one in the Menace Voice UI or via
POST /api/v1/workflow/create)
Build and save#
The example below builds a three-node loan-qualification agent and saves it as a new draft version on an existing agent. Your published agent keeps serving calls until you explicitly publish the draft.
Edit an existing agent#
Load an agent into an editable Workflow, mutate it, then save:
Discover node types#
Each node's type string and required fields come from the backend's node-spec catalog. Fetch it at runtime to validate what you can build:
Note
For a full description of each node type and its fields, see the Nodes section of the Voice Agent Builder docs.