Docs menu
All MCP tools
MCP tools · Compose flows
flow_setup_agent
Create a voice agent and set it up in one go: the agent (a draft until published in Finn), its handbook, knowledge base documents, voice and speech settings, turning its call flow on, and optionally renting a phone number (costs money; Admins only). Always call it first without run: it answers the full plan and its checks and changes nothing. Show the user that plan; only after they say yes, call again with the same input and run: true. Steps that cost money or reach a person are held for a person in the organization to approve in Finn; the run stops there with the approval link.
- Scope needed
- operator:build
- Acts as
- You, the signed-in member, with your role's permissions.
- Changes data
- Yes
- Held for approval
- Can be. The call returns a pending approval and an approve link, and nothing happens until a person in your organization approves it in Finn.
- Available to
- Switched on per organization (compose flow tools)
Inputs
| Name | Type | Description |
|---|---|---|
| agentrequired | object | The new agent: the same body as creating an agent on /v1 (POST /v1/finns), e.g. { name, ... }. |
| handbook | object | The agent handbook (PATCH /v1/finns/{id}/handbook body). |
| knowledge_base | array of object | Up to 10 knowledge base documents, each { url } or { title, text }. |
| speech_settings | object | Voice and speech settings (PATCH /v1/finns/{id}/speech_settings body), e.g. { voice_id }. |
| enable_flow | boolean | Turn the agent's call flow on at the end. |
| phone_number | object | A number to rent (POST /v1/phone_numbers body). Costs money; held for approval; Admins only. |
| org_id | string | Organization id. Optional when the user belongs to one organization; otherwise the error lists theirs. |
| run | boolean | Leave out (or false) to get the plan only: nothing is changed. Set true only after you have shown the user the plan and they said yes. |
| resume_key | string | With run: true, the resume_key an earlier run returned, to finish it after an approval without repeating done steps. |