For the complete documentation index, see llms.txt. Markdown versions of documentation pages are available by appending .md to the page URL.
GPT-Live

Client delegation

In this lesson, we’ll look at client delegation. With client delegation, your application handles the back and forth between GPT-Live and your backend.

This is useful when you want to connect GPT-Live to an agent you’ve already built or control what context your application sends to the backend and what it returns to GPT-Live.

Let’s look at a delivery application that uses client delegation with GPT-Live to follow a standard operating procedure (SOP) and take orders.

SonaRestaurant delivery agent
0:00 / 1:04

Let’s walk through how it works.

Step 1 of 12

Let’s say we already have an order agent that takes delivery orders. Its prompt includes a standard operating procedure (SOP), and it has access to three tools on our server: one to calculate the order total, one to check delivery availability, and one to place an approved order.

Your application

Browser

Server

Order agent
model
gpt-6-luna
instructions
tools
OpenAI

GPT-Live

For more details, see the cookbook on building a voice agent that follows an SOP.

Try it yourself

Use the prompt below to build your own voice agent and follow the delegation as you talk to it.

Build a voice agent with client delegation
@OpenAI Developers, can you build a delivery voice agent for a restaurant using GPT-Live 1.1 and client delegation? Ask me to choose a cuisine first, then build the application around it. Give the backend agent an SOP for taking orders and three server tools: calculate the order total, check delivery availability, and place an approved order. Let me talk to the agent and follow the entire flow, highlighting the key events, the context sent to the backend, tool calls and results, and updates returned to GPT-Live. Lesson 7: https://developers.openai.com/api/training/gpt-live/7-client-delegation.md