This feature is still in Beta and is only available via Create agent API.

Example agent payload

multi-agent-payload.json
{
    "agent_config": {
        "agent_name": "Recruitment multi agent",
        "agent_welcome_message": "Hey!this is a Recruitment call! please speak now",
        "tasks": [
            {
                "tools_config": {
                    "output": {
                        "provider": "twilio"
                    },
                    "input": {
                        "provider": "twilio"
                    },
                    "synthesizer": {
                        "provider": "polly",
                        "stream": true,
                        "caching": true,
                        "provider_config": {
                            "voice": "Danielle",
                            "engine": "neural",
                            "language": "en-US"
                        },
                        "buffer_size": 100.0
                    },
                    "llm_agent": {
                        "agent_flow_type": "streaming",
                        "agent_type": "graph_agent",
                        "llm_config": {
                            "provider": "openai",
                            "model": "gpt-4o-mini",
                            "agent_information": "recruitment system",
                            "nodes": [
                                {
                                    "id": "root",
                                    "content": "Welcome to our recruitment portal!",
                                    "prompt": "You are an AI assistant helping with recruitment. Greet the user and ask if they're interested in applying for a job, learning about open positions, or seeking general information about the company.",
                                    "edges": [
                                        {
                                            "to_node_id": "open_positions",
                                            "condition": "user wants to learn about open positions"
                                        },
                                        {
                                            "to_node_id": "end",
                                            "condition": "user is not interested"
                                        }
                                    ]
                                },
                                {
                                    "id": "open_positions",
                                    "content": "Here are the current open positions.",
                                    "prompt": "You're providing a list of current open positions. Ask the user if they are interested in a specific role and offer details about job descriptions, qualifications, and application steps.",
                                    "edges": [
                                        {
                                            "to_node_id": "end",
                                            "condition": "user is not interested in applying"
                                        }
                                    ]
                                },
                                {
                                    "id": "end",
                                    "content": "Thank you for your time!",
                                    "prompt": "End the conversation when the user has no further questions or has completed their task, such as submitting an application.",
                                    "edges": []
                                }
                            ],
                            "current_node_id": "root",
                            "context_data": {}
                        }
                    },
                    "transcriber": {
                        "endpointing": 123.0,
                        "stream": true,
                        "provider": "deepgram",
                        "model": "nova2",
                        "language": "en"
                    },
                    "api_tools": null
                },
                "task_config": {
                    "hangup_after_LLMCall": false,
                    "hangup_after_silence": 10.0,
                    "ambient_noise": false,
                    "interruption_backoff_period": 0.0,
                    "backchanneling": false,
                    "backchanneling_start_delay": 5.0,
                    "optimize_latency": true,
                    "incremental_delay": 100.0,
                    "call_cancellation_prompt": null,
                    "number_of_words_for_interruption": 3.0,
                    "backchanneling_message_gap": 5.0,
                    "use_fillers": false,
                    "call_terminate": 300
                },
                "task_type": "conversation",
                "toolchain": {
                    "execution": "parallel",
                    "pipelines": [
                        [
                            "transcriber",
                            "llm",
                            "synthesizer"
                        ]
                    ]
                }
            }
        ],
        "agent_type": "Lead Qualification"
    },
    "agent_prompts": {
        "task_1": {
            "system_prompt": "You're a helpful assistant that books appointments for people."
        }
    }
}