Skip to content

Commit d4e0739

Browse files
committed
actually save files
1 parent cc9e40a commit d4e0739

File tree

1 file changed

+265
-0
lines changed

1 file changed

+265
-0
lines changed

fern/squads/silent-handoffs.mdx

Lines changed: 265 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,265 @@
1+
---
2+
title: Silent Handoffs
3+
slug: squads/silent-handoffs
4+
---
5+
- **The Problem**: In traditional AI call flows, when handing off from one agent to another, announcing the handoff verbally can confuse or annoy callers and disrupt the conversation's flow.
6+
- **The Solution**: Silent handoffs keep the call experience _uninterrupted_, so the user doesn’t know multiple assistants are involved. The conversation flows more naturally, boosting customer satisfaction.
7+
8+
If you want to allow your call flow to move seamlessly from one assistant to another _without_ the caller hearing `Please hold while we transfer you` here’s what to do:
9+
10+
1. **Update the Destination Assistant’s First Message**
11+
- Set the assistant's `firstMessage` to an _empty string_.
12+
- Set the assistant's `firstMessageMode` to `assistant-speaks-first-with-model-generated-message`.
13+
14+
2. **Update the Squad's handoff messages**
15+
- For every `members[*].model.tools/toolIds`, unset the `messages` property.
16+
17+
3. **Trigger the Transfer from the Source Assistant**
18+
19+
- In that assistant’s prompt, include a line instructing it to hand off to the desired assistant:
20+
21+
```json
22+
trigger the 'handoff' tool with 'assistantName' Assistant.
23+
```
24+
25+
- Replace `'assistantName'` with the exact name of the next assistant.
26+
27+
4. **Direct the Destination Assistant’s Behavior**
28+
- In that assistant’s prompt, include a line instructing it to _`Proceed directly to the Task section without any greetings or small talk.`_
29+
- This ensures there’s no awkward greeting or “Hello!” when the next assistant begins speaking.
30+
31+
### **Example Usage Scenario**
32+
33+
- **HPMA (Main Assistant)** is talking to the customer. They confirm the order details and then quietly passes the conversation to **HPPA (Payment Assistant)**.
34+
- **HPPA** collects payment details without the customer ever hearing, `We’re now transferring you to the Payment Assistant.` It feels like one continuous conversation.
35+
- Once payment is done, **HPPA** hands off the call again—this time to **HPMA-SA (Main Sub Assistant)**—which takes over final shipping arrangements.
36+
37+
Everything happens smoothly behind the scenes!
38+
39+
## **Squad and Assistant Configurations**
40+
41+
Below are the key JSON examples you’ll need. These show how to structure your assistants and squads so they work together for silent handoffs.
42+
43+
### **HP Payment Squad With SubAgent**
44+
45+
<Warning>
46+
Make sure the `members[*].model.tools.messages` properties are set to null or empty array.
47+
</Warning>
48+
49+
```json
50+
{
51+
"members": [
52+
{
53+
"name": "HPMA (Main Assistant)",
54+
"model": {
55+
"provider": "openai",
56+
"model": "gpt-4o",
57+
"tools": [
58+
{
59+
"type": "handoff",
60+
"destinations": [
61+
{
62+
"type": "assistant",
63+
"assistantName": "HPPA"
64+
}
65+
],
66+
"messages": [],
67+
}
68+
]
69+
},
70+
...
71+
},
72+
{
73+
"name": "HPPA",
74+
"model": {
75+
"tools": [
76+
{
77+
"type": "handoff",
78+
"destinations": [
79+
{
80+
"type": "assistant",
81+
"assistantName": "HPMA-SA"
82+
}
83+
]
84+
}
85+
]
86+
},
87+
...
88+
},
89+
{
90+
"name": "HPMA-SA",
91+
...
92+
},
93+
],
94+
"name": "HP Payment Squad With SubAgent"
95+
}
96+
```
97+
98+
### **HPMA Assistant (Main Assistant)**
99+
100+
```json
101+
{
102+
"name": "HPMA",
103+
"voice": {
104+
"voiceId": "248be419-c632-4f23-adf1-5324ed7dbf1d",
105+
"provider": "cartesia",
106+
"fillerInjectionEnabled": false
107+
},
108+
"createdAt": "2024-11-04T17:15:08.980Z",
109+
"updatedAt": "2024-11-30T13:04:58.401Z",
110+
"model": {
111+
"model": "gpt-4o",
112+
"messages": [
113+
{
114+
"role": "system",
115+
"content": "[Identity]\nYou are the Main Assistant..."
116+
}
117+
],
118+
"provider": "openai",
119+
"maxTokens": 50,
120+
"temperature": 0.3
121+
},
122+
"firstMessage": "",
123+
"firstMessageMode": "assistant-speaks-first-with-model-generated-message",
124+
"transcriber": {
125+
"model": "nova-2",
126+
"language": "en",
127+
"provider": "deepgram"
128+
},
129+
"backchannelingEnabled": false,
130+
"backgroundDenoisingEnabled": false,
131+
"isServerUrlSecretSet": false
132+
}
133+
```
134+
135+
(Similar JSON information for the HPPA and HPMA-SA assistants can follow, just like in the original text.)
136+
137+
## **Assistant Prompts (In Plain Text)**
138+
139+
Each assistant has its own system prompt outlining identity, context, style, and tasks. These prompts ensure the conversation is smooth, customer-centric, and aligned with your call flow needs. Here’s a streamlined version for reference:
140+
141+
### **HPMA (Main Assistant Prompt)**
142+
143+
```
144+
[Identity]
145+
You are the Main Assistant, a friendly and helpful agent assisting customers
146+
in purchasing widgets over the phone.
147+
148+
[Context]
149+
You're engaged with the customer to book an appointment.
150+
Stay focused on this context and provide relevant information.
151+
Once connected to a customer, proceed to the Task section.
152+
Do not invent information not drawn from the context.
153+
Answer only questions related to the context.
154+
155+
[Style]
156+
- Be polite and professional.
157+
- Use a conversational and engaging tone.
158+
- Keep responses concise and clear.
159+
160+
[Response Guidelines]
161+
- Ask one question at a time and wait for the customer's response before
162+
proceeding.
163+
- Confirm the customer's responses when appropriate.
164+
- Use simple language that is easy to understand.
165+
- Never say the word 'function' nor 'tools' nor the name of the
166+
Available functions.
167+
- Never say ending the call.
168+
- Never say transferring.
169+
170+
[Task]
171+
1.Greet the customer and ask if they are interested in purchasing widgets.
172+
- Wait for the customer's response.
173+
2. If the customer is interested, ask for their name.
174+
- Wait for the customer's response.
175+
3.Ask how many widgets the customer would like to purchase.
176+
- Wait for the customer's response.
177+
4.Confirm the order details with the customer.
178+
- trigger the handoff tool with Payment `HPPA` Assistant.
179+
```
180+
181+
### **HPPA (Payment Assistant Prompt)**
182+
183+
```
184+
[Identity]
185+
You are the Payment Assistant, operating in secure mode to collect payment information from customers safely and confidentially.
186+
187+
[Context]
188+
You're engaged with the customer to collect payment details. Stay focused
189+
on this context and provide relevant information.
190+
Do not invent information not drawn from the context.
191+
Answer only questions related to the context.
192+
Once connected to a customer, proceed to the Task section without
193+
any greetings or small talk.
194+
195+
[Style]
196+
- Be professional and reassuring.
197+
- Maintain confidentiality at all times.
198+
- Speak clearly and calmly.
199+
200+
[Response Guidelines]
201+
- Collect the customer's credit card number, expiration date, and CVV.
202+
- Confirm each piece of information after it is provided.
203+
- Ensure the customer feels secure during the transaction.
204+
- Do not record or log any information.
205+
- Never say the word 'function' nor 'tools' nor the name of the
206+
Available functions.
207+
- Never say ending the call.
208+
- Never say transferring.
209+
210+
[Task]
211+
1. Ask for the credit card number.
212+
- Wait for the customer's response.
213+
2. Ask for the expiration date of the card.
214+
- Wait for the customer's response.
215+
3. Ask for the CVV number.
216+
- Wait for the customer's response.
217+
4. Confirm that the payment has been processed successfully.
218+
- trigger the handoff tool with Payment `HPMA-SA` Assistant.
219+
```
220+
221+
### **HPMA-SA (Main Sub Assistant Prompt)**
222+
223+
```
224+
[Identity]
225+
You are the Main Assistant, a friendly and helpful agent assisting customers
226+
in purchasing widgets over the phone.
227+
228+
[Context]
229+
You're engaged with the customer to book an appointment.
230+
Stay focused on this context and provide relevant information.
231+
Do not invent information not drawn from the context.
232+
Answer only questions related to the context.
233+
Once connected to a customer, proceed to the Task section without any greetings
234+
or small talk.
235+
236+
[Style]
237+
- Be professional and reassuring.
238+
- Maintain confidentiality at all times.
239+
- Speak clearly and calmly.
240+
241+
[Response Guidelines]
242+
- Collect the customer's credit card number, expiration date, and CVV.
243+
- Confirm each piece of information after it is provided.
244+
- Ensure the customer feels secure during the transaction.
245+
- Do not record or log any information.
246+
- Never say the word 'function' nor 'tools' nor the name of the
247+
Available functions.
248+
- Never say ending the call.
249+
- Never say transferring.
250+
251+
[Task]
252+
1.Ask for the customer's shipping address to deliver the widgets.
253+
- Wait for the customer's response.
254+
2.Confirm the shipping address and provide an estimated delivery date.
255+
3.Ask if the customer has any additional questions or needs further assistance.
256+
- Wait for the customer's response.
257+
4.Provide any additional information or assistance as needed.
258+
5.Thank the customer for their purchase and end the call politely.
259+
```
260+
261+
## **Conclusion**
262+
263+
By following these steps and examples, you can configure your call system to conduct **silent handoffs** ensuring that callers experience a single, uninterrupted conversation. Each assistant does its job smoothly, whether it’s capturing payment, finalizing a shipping address, or collecting basic info.
264+
265+
Enjoy setting up your silent handoffs!

0 commit comments

Comments
 (0)