Skip to content

Commit 48041cf

Browse files
committed
Simplify GPT-Live tool and skill guides
1 parent 16c92bc commit 48041cf

11 files changed

Lines changed: 97 additions & 1244 deletions

‎fern/gpt-live/configuration.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ Prerequisites are now in the [Quickstart](/gpt-live/quickstart#before-you-start)
346346

347347
### Create an assistant
348348

349-
See the [Quickstart](/gpt-live/quickstart#create-the-assistant) for a first assistant, and [Build with tools](/gpt-live/tools#step-1-check-availability) for one with tools.
349+
See the [Quickstart](/gpt-live/quickstart#create-the-assistant) for a first assistant, and [Build with tools](/gpt-live/tools) for connecting tools.
350350

351351
### Make a test call
352352

‎fern/gpt-live/design.mdx‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ slug: gpt-live/design
77

88
A GPT-Live assistant keeps listening and speaking while its reasoner looks things up and takes actions. The conversation and the work run side by side, so part of the design is deciding how they fit together: which work to start early, what the conversation can usefully cover while it runs, and how a result rejoins the conversation when it arrives.
99

10-
This page works through one conversation: a caller booking an appointment with a small service business. The same thinking applies to support, intake, and other calls that mix questions with actions. The example matches the test service in [Build with tools](/gpt-live/tools), so you can try each idea on a real call.
10+
This page works through one conversation: a caller booking an appointment with a small service business. The same thinking applies to support, intake, and other calls that mix questions with actions. [Build with tools](/gpt-live/tools) covers the tools behind this example.
1111

1212
The dialogues on this page are illustrations of the behavior to design for. GPT-Live generates its own wording, and results vary between calls, so test your prompts on real calls before relying on a pattern.
1313

@@ -88,7 +88,7 @@ Start each piece of work as soon as its inputs are known, and use the conversati
8888
- A time can be chosen only after the open times are known.
8989
- A booking can be announced only after the booking tool confirms it.
9090

91-
The useful test for any question during a lookup is whether the outstanding work still answers the caller's need after they reply. The test service returns every open time for the requested day and location. So if the caller says "afternoon, ideally after three" while that lookup runs, the result still covers it, and the assistant can filter. If the caller says "Actually, can we do Riverside instead?", the running lookup no longer answers the request, and a new one is needed.
91+
The useful test for any question during a lookup is whether the outstanding work still answers the caller's need after they reply. In this example, the lookup tool returns every open time for the requested day and location. So if the caller says "afternoon, ideally after three" while that lookup runs, the result still covers it, and the assistant can filter. If the caller says "Actually, can we do Riverside instead?", the running lookup no longer answers the request, and a new one is needed.
9292

9393
That's why the example lookup returns the whole day rather than taking a time-of-day argument. When you design your own tools, return enough to answer the likely follow-up questions without another round trip, as long as the result stays short.
9494

@@ -263,15 +263,15 @@ Interrupting the assistant's speech doesn't stop work that's already running. A
263263
>
264264
> **Assistant:** On Thursday downtown I have 9 or 1.
265265
266-
The Friday result may still come back. The speaker should recognize it no longer answers the request and use the Thursday one. Your tools can help by including the date and location in every result, as the test service does, so a stale result is easy to spot.
266+
The Friday result may still come back. The speaker should recognize it no longer answers the request and use the Thursday one. Your tools can help by including the date and location in every result, as the example's tools do, so a stale result is easy to spot.
267267

268268
If the change arrives after an action has completed, the assistant should say so and follow your procedure for changing it:
269269

270270
> **Caller:** Oh wait, can we make that Thursday instead?
271271
>
272272
> **Assistant:** Friday at 2:30 is already booked. I can look at Thursday, and if there's a time you like, move it. Shall I check?
273273
274-
The booking exists until your service cancels or changes it. Tell the reasoner how to change a completed action, and have your service enforce it. In the test service, a move is two separate steps: cancel the Friday booking, then book Thursday. So the procedure finds a Thursday time and gets the caller's agreement first, then cancels and books. If the second step fails, the assistant says what actually happened: Friday was cancelled and Thursday wasn't booked.
274+
The booking exists until your service cancels or changes it. Tell the reasoner how to change a completed action, and have your service enforce it. In this example, a move is two separate steps: cancel the Friday booking, then book Thursday. So the procedure finds a Thursday time and gets the caller's agreement first, then cancels and books. If the second step fails, the assistant says what actually happened: Friday was cancelled and Thursday wasn't booked.
275275

276276
### Questions and changes of topic
277277

@@ -456,7 +456,7 @@ Your service remains responsible for enforcing rules that matter. A prompt that
456456

457457
### Example: split a scheduling prompt
458458

459-
These are the prompts from the test assistant in [Build with tools](/gpt-live/tools). The speaker prompt follows a structure with labeled policy sections, which makes each decision easy to find and adjust:
459+
These are the prompts for the appointment assistant used throughout this page. Its tools are described in [Build with tools](/gpt-live/tools). The speaker prompt follows a structure with labeled policy sections, which makes each decision easy to find and adjust:
460460

461461
```text title="model.speaker.instructions"
462462
You are the booking assistant for Example Service Studio, a fictional business

‎fern/gpt-live/migrate.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ Each specialist's procedure becomes a skill's `content`, and its tools become th
269269
}
270270
```
271271

272-
The `toolIds` are the IDs of the saved tools the scheduling assistant used. Tools that several skills need, or that must always be available, go in the assistant's base tools instead. Here `getServiceInfo`, `endCall`, and any transfer to a person are base tools. See [Reasoner skills](/gpt-live/skills) for a complete, downloadable version.
272+
The `toolIds` are the IDs of the saved tools the scheduling assistant used. Tools that several skills need, or that must always be available, go in the assistant's base tools instead. Here `getServiceInfo`, `endCall`, and any transfer to a person are base tools. See [Reasoner skills](/gpt-live/skills#example-scheduling-and-service-questions) for the full procedure and tool placement.
273273

274274
### 4. Turn handoff conditions into descriptions and triggers
275275

‎fern/gpt-live/quickstart.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,5 +145,5 @@ See [the troubleshooting guide](/gpt-live/testing#said-goodbye-but-the-call-didn
145145
## Next steps
146146

147147
- **[Design conversations](/gpt-live/design):** how to shape a conversation that reaches the caller's goal while work runs in the background.
148-
- **[Build with tools](/gpt-live/tools):** connect a test service and make a real lookup and booking.
148+
- **[Build with tools](/gpt-live/tools):** connect your service so the assistant can look things up and take actions.
149149
- **[Migrate to GPT-Live](/gpt-live/migrate):** move an existing assistant or squad.

‎fern/gpt-live/skills.mdx‎

Lines changed: 38 additions & 91 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ As an assistant takes on more kinds of work, its reasoner prompt fills with proc
99

1010
A **reasoner skill** groups one procedure with the tools it needs. The reasoner sees a short catalog of skills and loads the ones a request calls for. The caller still hears the same assistant throughout: skills change what the reasoner works with, not who the caller is talking to.
1111

12-
The examples add two skills to the appointment assistant built in [Build with tools](/gpt-live/tools), which checks and books times for a fictional business.
12+
The examples on this page use an appointment assistant that checks open times, books and cancels appointments, and answers questions about the business.
1313

1414
## When a skill helps
1515

@@ -39,68 +39,40 @@ Loading a skill is an extra reasoning step before the skill's tools can be used.
3939

4040
The speaker also sees the skill names and descriptions, which helps it recognize when to delegate. Write descriptions in terms of the caller's need, keep them short, and leave out anything the caller shouldn't hear. Callers don't need to hear skill names, and the speaker prompt can say so.
4141

42-
## Add two skills to the appointment assistant
43-
44-
Skills live in `model.reasoner.skills`. Each has a `name`, a `description`, the `content` of its procedure, and optional `tools` or `toolIds`.
45-
46-
In this version, `getServiceInfo` and `endCall` stay as base tools. Both skills can use `getServiceInfo`, since scheduling needs today's date from it, and ending the call shouldn't depend on loading a skill. The three booking tools move into the scheduling skill.
47-
48-
The complete configuration is available to download. The excerpt below abbreviates the tool definitions so the structure is easier to see.
49-
50-
<Download src="../static/gpt-live/appointment-assistant-skills.json">
51-
<Button intent="primary" rightIcon="download">Download appointment-assistant-skills.json</Button>
52-
</Download>
53-
54-
```json title="model (excerpt, tool definitions abbreviated)"
55-
{
56-
"reasoner": {
57-
"instructions": "You handle work for Example Service Studio, a fictional test business. Work from the latest request in the conversation transcript. Transcripts can contain mistakes and later corrections. Load the skill that fits the request. Return short, plain facts the assistant can say, with no Markdown or lists. Never report an action a tool did not confirm. If an outcome is unclear, say so. Call endCall when the caller asks to end the call or says goodbye.",
58-
"skills": [
59-
{
60-
"name": "schedule-appointment",
61-
"description": "Check open times, book a time, or cancel or move a booking made on this call.",
62-
"content": "Get today's date from getServiceInfo if you don't know it, and resolve relative dates against it. Call lookupAvailability when you have the service (consultation or standard-visit), the location (downtown or riverside), and a date as YYYY-MM-DD. If a detail is missing, return a short question for the assistant to ask. The lookup returns every open time for that day and location, so filter by time-of-day preference without another lookup. A different service, location, or date needs a new lookup.\n\nA caller choosing a time is a selection, not agreement to book. Call bookAppointment only when the transcript shows that, after the caller chose a time from the latest lookup, the assistant read back the day, time, location, and name and asked whether to book, and the caller then clearly said yes. If that read-back and clear yes aren't in the transcript, don't book. Instead, return the day, time, location, and name for the assistant to read back, and say that it needs the caller's confirmation. Use that time's slotId. If details changed after the lookup, look up again first.\n\nTo move a booking made on this call, first look up the new time and confirm with the caller that they want to move to it. Then cancel the existing booking with cancelAppointment and book the new time. These are two separate steps. If the new booking fails after the cancellation, say that the original booking was cancelled and the new time wasn't booked, and offer to look again. Report the booking ID after a successful booking.",
63-
"tools": [
64-
{ "type": "function", "function": { "name": "lookupAvailability", "...": "same definition as in Build with tools" } },
65-
{ "type": "function", "function": { "name": "bookAppointment", "...": "same definition as in Build with tools" } },
66-
{ "type": "function", "function": { "name": "cancelAppointment", "...": "same definition as in Build with tools" } }
67-
]
68-
},
69-
{
70-
"name": "answer-service-questions",
71-
"description": "Answer questions about services, how long they take, what to bring, locations, hours, and the change policy.",
72-
"content": "Use getServiceInfo and answer only from its result. Give the specific fact the caller asked for, not the whole policy. If the caller asks about fees or exceptions the result doesn't cover, say you don't have that information. If the caller was in the middle of booking, say so in your result so the assistant can return to it."
73-
}
74-
]
75-
},
76-
"tools": [
77-
{ "type": "function", "function": { "name": "getServiceInfo", "...": "same definition as in Build with tools" } },
78-
{ "type": "endCall" }
79-
]
80-
}
81-
```
42+
## Example: scheduling and service questions
43+
44+
The appointment assistant has two skills. The scheduling skill's procedure, written as plain instructions:
8245

83-
The downloaded file has the full definitions. Point its tools at your running [test service](/gpt-live/tools#run-the-test-service) and update the assistant from Build with tools:
84-
85-
```bash
86-
jq --arg host "$TUNNEL_HOST" --arg cred "$CREDENTIAL_ID" '
87-
def point: if .type == "function"
88-
then .server = {url: ("https://" + $host + "/vapi/tools"), credentialId: $cred}
89-
else . end;
90-
{model: (.model
91-
| .tools |= map(point)
92-
| .reasoner.skills |= map(if .tools then .tools |= map(point) else . end))}
93-
' appointment-assistant-skills.json > skills-model.json
94-
95-
curl --fail-with-body -X PATCH "https://api.vapi.ai/assistant/$ASSISTANT_ID" \
96-
-H "Authorization: Bearer $VAPI_PRIVATE_API_KEY" \
97-
-H "Content-Type: application/json" \
98-
--data-binary @skills-model.json
46+
```text title="schedule-appointment"
47+
Get today's date from getServiceInfo if you don't know it, and resolve
48+
relative dates against it.
49+
50+
Call lookupAvailability when you have the service, location, and date. If a
51+
detail is missing, return a short question for the assistant to ask. The
52+
lookup returns every open time for that day and location, so filter by a
53+
time-of-day preference without another lookup. A different service, location,
54+
or date needs a new lookup.
55+
56+
A caller choosing a time is a selection, not agreement to book. Call
57+
bookAppointment only when the assistant has read back the day, time,
58+
location, and name and the caller has clearly said yes. Otherwise, return
59+
those details for the assistant to read back and confirm.
60+
61+
To move a booking, look up the new time and confirm it with the caller first.
62+
Then cancel the existing booking with cancelAppointment and book the new time.
63+
If the new booking fails after the cancellation, say that the original booking
64+
was cancelled and the new time wasn't booked.
9965
```
10066

101-
To reference saved tools instead of inline definitions, use `toolIds` in the skill.
67+
The service-questions skill is shorter: use `getServiceInfo`, answer only from its result, give the specific fact the caller asked for, and note if a booking was in progress so the assistant can return to it. It has no tools of its own, but it still earns its place: it holds guidance that only matters for that kind of request.
68+
69+
The tools are placed like this:
10270

103-
The service-questions skill has no tools of its own. It still earns its place: it holds guidance that only matters for that kind of request.
71+
- `lookupAvailability`, `bookAppointment`, and `cancelAppointment` belong to the scheduling skill, because they only make sense within that procedure.
72+
- `getServiceInfo` is a base tool, because both skills use it.
73+
- `endCall` is a base tool, so ending the call never depends on loading a skill.
74+
75+
In the assistant's configuration, skills live in `model.reasoner.skills`. Each skill has a `name`, a `description`, and its procedure as `content`. Attach saved tools by their IDs in `toolIds`, or include inline definitions in `tools`. See [Settings and compatibility](/gpt-live/configuration#reasoner-skills) for the field details and limits.
10476

10577
## Write descriptions the reasoner can select
10678

@@ -130,7 +102,7 @@ Skills organize instructions and tools for the reasoner. Some things stay the sa
130102

131103
- **One assistant.** A skill doesn't create another assistant, hand the call off, or change the voice or model.
132104
- **No workflow engine.** Loading a skill doesn't track which steps are done, enforce their order, or remember task state between requests. The reasoner works from the conversation and earlier tool results.
133-
- **No enforcement.** Skills don't prevent duplicate actions, check approvals, or keep one skill's information separate from another's. Your service enforces the rules that matter, as the test service does for bookings.
105+
- **No enforcement.** Skills don't prevent duplicate actions, check approvals, or keep one skill's information separate from another's. Your service enforces the rules that matter, as described in [Actions that change state](/gpt-live/tools#actions-that-change-state).
134106
- **One copy per assistant.** Skills are saved with the assistant. Copying an assistant copies its skills, and there's no shared skill library to update across assistants.
135107

136108
## Create and edit skills
@@ -139,20 +111,7 @@ Skills organize instructions and tools for the reasoner. Some things stay the sa
139111

140112
**Through the API**, set `model.reasoner.skills` when you create or update the assistant. Inline tool definitions in a skill's `tools` are available through the API and assistant JSON.
141113

142-
**From Markdown**, import a file whose frontmatter holds the name and description, with the procedure as the body:
143-
144-
```markdown title="schedule-appointment.md"
145-
---
146-
name: schedule-appointment
147-
description: Check open times, book a time, or cancel or move a booking made on this call.
148-
---
149-
150-
Get today's date from getServiceInfo if you don't know it, and resolve
151-
relative dates against it. Call lookupAvailability when you have the
152-
service, location, and a date as YYYY-MM-DD...
153-
```
154-
155-
Other frontmatter fields are ignored, and tools aren't imported. Attach them to the skill after importing.
114+
**From Markdown**, you can import an existing skill with `name` and `description` in its frontmatter and the procedure in its body. Other frontmatter fields are ignored, and tools aren't imported. Attach them to the skill after importing.
156115

157116
**With Composer**, ask in plain language. Composer can read, create, rename, edit, and remove skills, and attach saved tools, through the assistant's normal draft and publish flow. For example:
158117

@@ -164,25 +123,13 @@ Every saved tool a skill references must exist. A missing tool reference stops c
164123

165124
## Test a detour and return
166125

167-
The case that shows whether skills are working is a request that moves between them. During a booking, ask a service question, then carry on:
168-
169-
> **Caller:** Friday downtown, a consultation. Actually, what if I need to change it later?
170-
>
171-
> **Assistant:** You can change or cancel up to 24 hours ahead at no charge. Friday downtown I have 10:30, 2:30, or 4.
172-
>
173-
> **Caller:** 2:30, under Sam Lee.
174-
>
175-
> **Assistant:** That's Friday at 2:30, downtown, under Sam Lee. Shall I book it?
176-
>
177-
> **Caller:** Yes.
178-
179-
Check three things together:
126+
Skills matter most when a call moves between them. Test a caller who asks a service question in the middle of booking, then carries on, and a caller who comes back to a booking that's already been made.
180127

181-
- **The call's messages** show the skill loads and tool calls. You should see the scheduling skill loaded for the lookup and booking, and the service-questions skill, or `getServiceInfo`, for the question.
182-
- **The service state** shows one booking, for the time the caller confirmed.
183-
- **The recording** shows the assistant answered the question and returned to the booking without asking for the details again.
128+
For each, check three things together:
184129

185-
Try a detour after a booking is complete too, and check that the assistant doesn't book again when the caller returns to the topic.
130+
- **The call's messages** show which skills loaded and which tools ran. The scheduling skill should load for the lookup and booking, and the service-questions skill, or `getServiceInfo`, for the question.
131+
- **Your service's records** show one booking, for the time the caller confirmed, and no second booking when the caller returns to the topic.
132+
- **The recording** shows the assistant answered the question and returned to the booking without asking for details again.
186133

187134
### When skills misbehave
188135

0 commit comments

Comments
 (0)