Vapi Squad Creation
Use a Squad only when multiple focused assistants improve the design. Default to a payload or implementation plan unless the user explicitly requests live Vapi mutations.
Decide Whether to Use a Squad
Prefer one assistant when one focused prompt and one compatible tool set can handle the use case reliably. Use a Squad for genuine boundaries such as:
- distinct domains or personas;
- different tool or credential access;
- deliberate context isolation;
- separately maintained specialists.
Do not create one assistant per conversational step. Keep related steps in one member and make each handoff boundary earn its latency and operational cost.
Safety and Source Rules
- Verify squad, member, handoff, context, and version fields against the current public Squads documentation, Handoff tool guide, and OpenAPI schema.
- Never invent assistant IDs, names, tool IDs, destinations, versions, credentials, server URLs, or extracted variables.
- Prompt text does not create a handoff. Configure and attach a documented
handoff tool.
- Keep member order explicit: the first member starts the call.
- Prefer saved assistants, reusable tools, and a saved Squad for production. Use transient members or Squads only when the request is intentionally ephemeral or a prototype.
Persistent Squad Procedure
Determine the execution mode.
- Return JSON or a plan when the user asks for a draft or does not clearly authorize live writes.
- Perform live creates or updates only with explicit intent and an available
VAPI_API_KEY.
Define focused members.
- State each member's responsibility, tools, and handoff boundaries.
- Choose the entry member and place it first.
- Reuse existing assistants by resolving names through
GET /assistant; create missing assistants first with the create-assistant skill.
Create handoff relationships after destinations exist.
- Resolve every destination assistant before building a persistent handoff tool.
- Use
type: "assistant" plus a verified assistantId for saved cross-assistant destinations.
- Use clear descriptions that state when the model should hand off and what should be collected first.
- Create reusable handoff tools through
POST /tool, then attach them to the source assistants with the configuration-preserving procedure in the create-tool skill.
- For OpenAI models, current public guidance recommends one handoff tool per destination. For Anthropic models, one tool with multiple destinations is supported and recommended.
Configure public context controls only when needed.
- Use
contextEngineeringPlan on a handoff destination: all, lastNMessages, userAndAssistantMessages, previousAssistantMessages, or none when supported by the current schema.
- Use
variableExtractionPlan.schema only for specific structured values needed downstream. Do not invent values or claim extraction occurred before a real handoff.
- Keep sensitive tool results out of downstream context when the use case requires isolation.
Create and verify the Squad.
- Build
members from verified assistant IDs in explicit order.
- Optionally set
assistantVersion only to a version returned by the public assistant API when the user wants an immutable pin. Omit it to follow latest.
- Before a production-affecting create or update, recap member order, handoffs, and target and obtain explicit confirmation unless the user's current instruction already unambiguously authorizes that exact mutation now.
- Send
POST /squad only after explicit live-create intent.
- Validate the returned Squad ID, complete member order, entry member, pins, and handoff attachments before reporting success.
Handle failures honestly.
- On a
400, correct a documented field placement or limit before at most one justified retry.
- On
401 or 403, stop for authentication or permission issues. On 404, report the missing assistant, tool, or Squad. On 5xx, report the service failure.
- If a sequence partially succeeds, list the IDs created so the user can review or clean them up. Do not continue creating dependent resources after a fatal error.
Persistent Squad Payload
Use verified IDs only:
{
"name": "Support Squad",
"members": [
{ "assistantId": "<verified-triage-assistant-id>" },
{ "assistantId": "<verified-billing-assistant-id>" },
{ "assistantId": "<verified-technical-assistant-id>" }
]
}
The first member is the entry assistant. Handoff tools belong on the relevant source assistants; Squad membership alone does not define every transition.
Handoff Payload
{
"type": "handoff",
"function": { "name": "handoff_to_billing" },
"destinations": [
{
"type": "assistant",
"assistantId": "<verified-billing-assistant-id>",
"description": "The caller needs billing, invoice, or payment help.",
"contextEngineeringPlan": {
"type": "userAndAssistantMessages"
},
"variableExtractionPlan": {
"schema": {
"type": "object",
"properties": {
"accountNumber": { "type": "string" }
}
}
}
}
]
}
Placeholders are acceptable in templates, never in live requests. Read Squad Configuration for transient Squads, context transfer, version pins, and safe Squad updates. Read Squad API Examples when the user requests TypeScript, Python, or cURL implementation code.
Update Safely
Send only the changed top-level fields to PATCH /squad/{id}. Omit members for a name-only or other non-member update. When the requested change affects member order, membership, version pins, assistant overrides, or handoff destinations:
GET /squad/{id}.
- Copy the complete ordered
members array and current membersOverrides when it must also change.
- Apply only the requested change, preserving each member's
assistantId or inline assistant, assistantVersion, assistantOverrides, and any documented destination fields already present.
- Patch the complete merged
members array plus only the other changed top-level fields.
- Re-fetch and verify order, entry member, pins, overrides, and handoffs.
Public Sources
1---2name: create-squad3description: Design, create, update, and verify Vapi Squads and documented handoff tools through the public API. Use for choosing a single assistant versus a multi-assistant Squad, persistent or transient members, entry-member ordering, specialization boundaries, context engineering, variable extraction, model-specific handoff patterns, assistant-version pins, and safe Squad updates.4license: MIT5---67# Vapi Squad Creation89Use a Squad only when multiple focused assistants improve the design. Default to a payload or implementation plan unless the user explicitly requests live Vapi mutations.1011## Decide Whether to Use a Squad1213Prefer one assistant when one focused prompt and one compatible tool set can handle the use case reliably. Use a Squad for genuine boundaries such as:1415- distinct domains or personas;16- different tool or credential access;17- deliberate context isolation;18- separately maintained specialists.1920Do not create one assistant per conversational step. Keep related steps in one member and make each handoff boundary earn its latency and operational cost.2122## Safety and Source Rules2324- Verify squad, member, handoff, context, and version fields against the current public [Squads documentation](https://docs.vapi.ai/squads), [Handoff tool guide](https://docs.vapi.ai/squads/handoff), and OpenAPI schema.25- Never invent assistant IDs, names, tool IDs, destinations, versions, credentials, server URLs, or extracted variables.26- Prompt text does not create a handoff. Configure and attach a documented `handoff` tool.27- Keep member order explicit: the first member starts the call.28- Prefer saved assistants, reusable tools, and a saved Squad for production. Use transient members or Squads only when the request is intentionally ephemeral or a prototype.2930## Persistent Squad Procedure31321. Determine the execution mode.33 - Return JSON or a plan when the user asks for a draft or does not clearly authorize live writes.34 - Perform live creates or updates only with explicit intent and an available `VAPI_API_KEY`.35362. Define focused members.37 - State each member's responsibility, tools, and handoff boundaries.38 - Choose the entry member and place it first.39 - Reuse existing assistants by resolving names through `GET /assistant`; create missing assistants first with the `create-assistant` skill.40413. Create handoff relationships after destinations exist.42 - Resolve every destination assistant before building a persistent handoff tool.43 - Use `type: "assistant"` plus a verified `assistantId` for saved cross-assistant destinations.44 - Use clear descriptions that state when the model should hand off and what should be collected first.45 - Create reusable handoff tools through `POST /tool`, then attach them to the source assistants with the configuration-preserving procedure in the `create-tool` skill.46 - For OpenAI models, current public guidance recommends one handoff tool per destination. For Anthropic models, one tool with multiple destinations is supported and recommended.47484. Configure public context controls only when needed.49 - Use `contextEngineeringPlan` on a handoff destination: `all`, `lastNMessages`, `userAndAssistantMessages`, `previousAssistantMessages`, or `none` when supported by the current schema.50 - Use `variableExtractionPlan.schema` only for specific structured values needed downstream. Do not invent values or claim extraction occurred before a real handoff.51 - Keep sensitive tool results out of downstream context when the use case requires isolation.52535. Create and verify the Squad.54 - Build `members` from verified assistant IDs in explicit order.55 - Optionally set `assistantVersion` only to a version returned by the public assistant API when the user wants an immutable pin. Omit it to follow latest.56 - Before a production-affecting create or update, recap member order, handoffs, and target and obtain explicit confirmation unless the user's current instruction already unambiguously authorizes that exact mutation now.57 - Send `POST /squad` only after explicit live-create intent.58 - Validate the returned Squad ID, complete member order, entry member, pins, and handoff attachments before reporting success.59606. Handle failures honestly.61 - On a `400`, correct a documented field placement or limit before at most one justified retry.62 - On `401` or `403`, stop for authentication or permission issues. On `404`, report the missing assistant, tool, or Squad. On `5xx`, report the service failure.63 - If a sequence partially succeeds, list the IDs created so the user can review or clean them up. Do not continue creating dependent resources after a fatal error.6465## Persistent Squad Payload6667Use verified IDs only:6869```json70{71 "name": "Support Squad",72 "members": [73 { "assistantId": "<verified-triage-assistant-id>" },74 { "assistantId": "<verified-billing-assistant-id>" },75 { "assistantId": "<verified-technical-assistant-id>" }76 ]77}78```7980The first member is the entry assistant. Handoff tools belong on the relevant source assistants; Squad membership alone does not define every transition.8182## Handoff Payload8384```json85{86 "type": "handoff",87 "function": { "name": "handoff_to_billing" },88 "destinations": [89 {90 "type": "assistant",91 "assistantId": "<verified-billing-assistant-id>",92 "description": "The caller needs billing, invoice, or payment help.",93 "contextEngineeringPlan": {94 "type": "userAndAssistantMessages"95 },96 "variableExtractionPlan": {97 "schema": {98 "type": "object",99 "properties": {100 "accountNumber": { "type": "string" }101 }102 }103 }104 }105 ]106}107```108109Placeholders are acceptable in templates, never in live requests. Read [Squad Configuration](references/squad-configuration.md) for transient Squads, context transfer, version pins, and safe Squad updates. Read [Squad API Examples](references/api-examples.md) when the user requests TypeScript, Python, or cURL implementation code.110111## Update Safely112113Send only the changed top-level fields to `PATCH /squad/{id}`. Omit `members` for a name-only or other non-member update. When the requested change affects member order, membership, version pins, assistant overrides, or handoff destinations:1141151. `GET /squad/{id}`.1162. Copy the complete ordered `members` array and current `membersOverrides` when it must also change.1173. Apply only the requested change, preserving each member's `assistantId` or inline assistant, `assistantVersion`, `assistantOverrides`, and any documented destination fields already present.1184. Patch the complete merged `members` array plus only the other changed top-level fields.1195. Re-fetch and verify order, entry member, pins, overrides, and handoffs.120121## Public Sources122123- [Introduction to Squads](https://docs.vapi.ai/squads)124- [Handoff tool](https://docs.vapi.ai/squads/handoff)125- [Passing data between assistants](https://docs.vapi.ai/squads/passing-data-between-assistants)126- [Squad API reference](https://docs.vapi.ai/api-reference/squads/get)