openai-voice-agent-sdk-sample

Report Abuse

Basic Information

This repository contains a sample application that demonstrates how to build voice agents using the Agents SDK and Python. The backend is implemented with FastAPI and exposes a websocket endpoint while the frontend uses Next.js to connect to that websocket. It is intended as a starting point and reference for developers who want to add voice, streaming and function-calling capabilities to conversational assistants. The sample highlights multi-turn conversation handling, a push-to-talk audio mode, function calling, and streaming responses and tool calls. It requires an OpenAI API key and local tools such as Node.js, npm and uv. The README includes setup steps to set the OPENAI_API_KEY, clone the repository, install dependencies via make sync, and run the app via make serve. The app runs locally at localhost:3000 and is distributed under the MIT License.

Links

App Details

Features
The project demonstrates multi-turn conversation handling, a push-to-talk audio mode, function calling support, and streaming responses and tool calls. It combines an Agents SDK-based Python backend using FastAPI with a websocket endpoint and a Next.js frontend that connects to the server. The repository documents environment configuration for the OPENAI_API_KEY and provides a .env example. It uses make targets to install front-end and server dependencies and to start the service. The sample emphasizes realtime streaming, tool integration, and function calling patterns for conversational assistants. The codebase is organized as a runnable template intended for customization and local experimentation.
Use Cases
This sample app helps developers prototype and learn patterns for voice-enabled conversational agents by providing a runnable end-to-end example that combines frontend and backend components. It illustrates realtime websocket communication, managing multi-turn dialogues, enabling push-to-talk audio capture, and incorporating function calling and streaming tool responses. The repository includes concrete setup instructions, dependency installation steps and make targets so developers can run and adapt the example locally. As a template it reduces integration effort when adding voice, streaming and tool call support to an assistant built on the Agents SDK and the OpenAI API. The MIT license and clear examples make it easy to customize for specific voice assistant projects.

Please fill the required fields*