Unable to implement squad override or inline squad...
# support
p
I have created a squad of 2 assistants. I need to send dynamic prompts to them each time. I tried 2 approaches, inline squad schema and squad override. Both of them are failing. Can you guys help me out with this issue? can you provide me a inline squad schema or squad override documentation? @User @User https://cdn.discordapp.com/attachments/1448378697202532402/1448378697483554816/image.png?ex=69405147&is=693effc7&hm=8ffd9772f1240e940e73af2674d8b1e69dd9a6db3b848304d74e01f0f7bcdd0b&
v
You can send dynamic prompts to your squad assistants using the
membersOverrides
field in your squad payload. Here’s a concise example for an inline squad schema with dynamic prompt overrides:
Copy code
json
{
  "squad": {
    "members": [
      { "assistantId": "english-hindi-nbt-id" },
      { "assistantId": "kannada-nbt-id" }
    ],
    "membersOverrides": {
      "english-hindi-nbt-id": { "prompt": "Your dynamic prompt here" },
      "kannada-nbt-id": { "prompt": "Another dynamic prompt" }
    }
  }
}
Replace the assistant IDs and prompts as needed. For more details, see the [Squads Example documentation](https://docs.vapi.ai/squads-example). Source: - [Squads Example documentation](https://docs.vapi.ai/squads-example)
I might also need to edit handoff tools, can we override them as well? like add more variables or dynamic description? if yes can you provide me their documentation as well?
@Vapi Support Bot
Web SDK Inline Squad with Dynamic Prompts - 400 Bad Request Hi @User @Vapi Support Bot , I'm trying to use dynamic prompts with a squad via the Web SDK (@Vapi-ai/web) but getting 400 Bad Request errors with all override structures I've tried. What works: javascript vapi.start(undefined, undefined, "1d6dc3f8-5a83-45cd-8473-c1557dbe9301") // ✅ Connects fine What I need: To inject dynamic system prompts into my squad's two assistants: English-Hindi NBT: 6c86c2d7-a42a-49b0-b995-1778fadd0715 Kannada NBT: 6a34a74f-9d16-4f8b-a871-4e7c88cdfdea What I've tried (all return 400): Using membersOverrides (from your earlier response): javascript
Copy code
{
  squad: {
    members: [
      { assistantId: "6c86c2d7-..." },
      { assistantId: "6a34a74f-..." }
    ],
    membersOverrides: {
      "6c86c2d7-...": { model: { messages: [{ role: "system", content: dynamicPrompt }] } }
    }
  }
}
Using assistantOverrides per member (from docs): javascript
Copy code
{
  squad: {
    members: [
      {
        assistantId: "6c86c2d7-...",
        assistantOverrides: { model: { messages: [...] } }
      }
    ]
  }
}
Question: Can you provide the exact Web SDK payload format for vapi.start() that allows dynamic prompt injection into squad members? Is there a difference between API and Web SDK payload structures? Thanks!
c
Hi Prakhar Agrawal, To inject dynamic prompts into your squad's assistants using the Web SDK, you can use the
assistantOverrides
within the squad payload for each assistant. Here's how you can structure your payload:
Copy code
javascript
{
  squad: {
    members: [
      {
        assistantId: "6c86c2d7-a42a-49b0-b995-1778fadd0715",
        assistantOverrides: {
          model: {
            messages: [
              { role: "system", content: "Your dynamic prompt for English-Hindi NBT" }
            ]
          }
        }
      },
      {
        assistantId: "6a34a74f-9d16-4f8b-a871-4e7c88cdfdea",
        assistantOverrides: {
          model: {
            messages: [
              { role: "system", content: "Your dynamic prompt for Kannada NBT" }
            ]
          }
        }
      }
    ]
  }
}
For handoff tools, you can also modify them using
assistantOverrides
. Insert your dynamic descriptions or other required fields in the
tools:append
within the
assistantOverrides
for each assistant. The handoff tools documentation can be found [here](https://docs.vapi.ai/tools/handoff). Ensure you replace the placeholders with your dynamic data, and this structure should help you bypass the 400 errors. If there are further specifics or configuration from the API that differ from the Web SDK, these should generally align unless specified in the docs.
p
Hey guys thanks a-lot. My issue is resolved. I opted for a different approach tho but yeah it's resolved not. @User @Vapi Support Bot
Thanks a-lot praveen!