You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|[voice-providers.md](voice-providers.md)| Per-provider voice block layout (Cartesia vs 11labs vs OpenAI/Azure/Rime/LMNT/Minimax/Neuphonic/SmallestAI) — saves 400s at push time |
Copy file name to clipboardExpand all lines: docs/learnings/squads.md
+61Lines changed: 61 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -169,6 +169,67 @@ Later layers win on conflicts. `variableValues` from all layers are merged separ
169
169
170
170
---
171
171
172
+
## Squad-level post-call extraction via `membersOverrides` (multi-member squads)
173
+
174
+
**What you might expect:** Every squad member that should contribute to post-call KPIs needs its own `analysisPlan.structuredDataPlan` on the assistant file, or you attach standalone structured-output resources via `artifactPlan.structuredOutputIds`.
175
+
176
+
**What actually happens:** Vapi has no separate “squad structured output” resource. For squads, set **`membersOverrides.analysisPlan.structuredDataPlan`** on the squad YAML so the same extraction plan runs once at end-of-call for **all members** — including members that never reached a live conversation (silent classifier, voicemail-only leaver, etc.). The gitops engine pushes this as squad `membersOverrides` on the platform squad object.
177
+
178
+
**Critical companion flag:** If extraction must reason over speech from **more than one member** (e.g. classifier → voicemail leaver → conversational agent), also set:
179
+
180
+
```yaml
181
+
membersOverrides:
182
+
artifactPlan:
183
+
fullMessageHistoryEnabled: true
184
+
analysisPlan:
185
+
structuredDataPlan:
186
+
enabled: true
187
+
messages:
188
+
- role: system
189
+
content: |-
190
+
You will be given the full transcript of a multi-assistant call, the ended reason,
191
+
and context from all squad members.
192
+
193
+
Extract fields based on what was said and how the call ended.
194
+
Include squad-specific rules for voicemail-only or classifier-only endings.
Without `fullMessageHistoryEnabled: true`, structured-data extraction often sees only the **last active member’s** transcript slice. Early voicemail or triage audio is missing from the prompt → empty or wrong KPI fields (`label_not_filled` in QA tooling).
221
+
222
+
**Recommendation:**
223
+
224
+
1. **Single source of truth** — Define the plan once under `membersOverrides`. **Remove** duplicate `analysisPlan.structuredDataPlan` from individual member assistants to avoid drift (two prompts, or assistant-only plan winning on SDR calls but not on VM-only calls).
225
+
2. **Pass `{{endedReason}}`** in the user message when outcomes depend on how the call ended (`voicemail`, silence timeout, transfer, etc.), not only spoken content.
226
+
3. **Squad-specific classification rules** in the system message — e.g. map voicemail-only / never-reached-live-agent paths to `no_answer` (or your enum), and only use `interested` / `not_interested` when a live human had a substantive exchange.
227
+
4. **Standalone structured outputs** (`structuredOutputs/*.yml` + `artifactPlan.structuredOutputIds`) are a different pipeline. You can use both, but do not assume they replace `structuredDataPlan` on squad members unless you link them explicitly.
228
+
229
+
See also [structured-outputs.md → Squad `membersOverrides` vs standalone structured outputs](structured-outputs.md#squad-membersoverrides-vs-standalone-structured-outputs).
230
+
231
+
---
232
+
172
233
## toolIds in assistantOverrides require UUIDs
173
234
174
235
`assistantOverrides.model.toolIds`in squad members must use **Vapi platform UUIDs**, not local filenames. The gitops engine resolves filenames to UUIDs for base assistant `model.toolIds`, but it does **not** resolve them inside squad `assistantOverrides`. If you use a local filename, the push will fail with `each value in toolIds must be a UUID`.
**Tip:** Start with 2–3 boolean KPIs (`call_successful`, `appointment_booked`) before adding more complex extraction. Each additional field increases extraction cost and latency.
88
+
89
+
---
90
+
91
+
## Squad `membersOverrides` vs standalone structured outputs
92
+
93
+
**What you might expect:** Linking structured outputs in `artifactPlan.structuredOutputIds` is enough for every call path in a squad.
94
+
95
+
**What actually happens:** Standalone structured-output resources run against the call transcript when listed on the assistant/squad artifact plan. **`analysisPlan.structuredDataPlan`** (inline schema + messages on the assistant or squad) is a separate end-of-call extraction path. In multi-agent squads, calls that end on an early member (voicemail leaver, silent classifier) often **never had** `structuredDataPlan` on that member — only the final conversational member did — so KPI fields stay empty even when the call succeeded.
96
+
97
+
**Recommendation:** For squad-wide KPIs that must populate on **every** ending (VM-only, classifier-only, and live-agent), use **`squad.membersOverrides.analysisPlan.structuredDataPlan`** plus **`membersOverrides.artifactPlan.fullMessageHistoryEnabled: true`**. Remove per-assistant duplicate plans. Keep standalone structured outputs for evals, dashboard analytics, or schemas you want versioned as separate resources.
98
+
99
+
Full YAML pattern and merge-order notes: [squads.md → Squad-level post-call extraction via `membersOverrides`](squads.md#squad-level-post-call-extraction-via-membersoverrides-multi-member-squads).
0 commit comments