Skip to main content

NAVAI Voice SDK

Build intelligent voice agents with OpenAI Realtime API for web and mobile applications

What is NAVAI?

NAVAI is a comprehensive SDK for building voice-first applications with OpenAI’s Realtime API. It provides:
  • Secure backend integration - Mint ephemeral client secrets and execute server-side tools
  • Smart frontend agents - React hooks for web voice navigation and function execution
  • Native mobile support - React Native integration with WebRTC transport
  • Dynamic tool loading - Automatic discovery and validation of backend and frontend functions
  • Route-aware navigation - Natural language navigation through your app’s routes

Three Packages, One Ecosystem

Backend

Secure OpenAI Realtime client secret generation and server-side function execution for Express applications.

Frontend

React hooks and agent builders for web applications with route navigation and dynamic function loading.

Mobile

React Native integration with WebRTC transport for voice agents on iOS and Android.

Key Features

Secure by Default

Keep your OpenAI API keys on the server. The backend package mints secure, ephemeral client secrets with configurable TTL (10-7200 seconds).

Dynamic Tool Loading

Automatically discover and validate tools from your codebase. Functions, classes, and objects are converted into callable agent tools.

Route Navigation

Natural language navigation through your application. The agent understands routes and can navigate users based on conversational commands.

Framework Agnostic

Works with Express, Next.js, Vite, Expo, and more. Bring your own router and integrate seamlessly with existing applications.

Quick Example

Here’s how easy it is to add voice capabilities to your Express backend:
import express from "express";
import { registerNavaiExpressRoutes } from "@navai/voice-backend";

const app = express();
app.use(express.json());

registerNavaiExpressRoutes(app, {
  backendOptions: {
    openaiApiKey: process.env.OPENAI_API_KEY,
    defaultModel: "gpt-realtime",
    defaultVoice: "marin"
  }
});

app.listen(3000);
And integrate it into your React app:
import { useWebVoiceAgent } from "@navai/voice-frontend";
import { useNavigate } from "react-router-dom";

function VoiceButton() {
  const navigate = useNavigate();
  const agent = useWebVoiceAgent({
    navigate,
    moduleLoaders: NAVAI_WEB_MODULE_LOADERS,
    defaultRoutes: NAVAI_ROUTE_ITEMS
  });

  return (
    <button onClick={() => agent.start()}>
      {agent.isConnected ? "Stop Voice" : "Start Voice"}
    </button>
  );
}
Ready to build your first voice agent? Follow our Quick Start guide to get up and running in minutes.

Framework Compatibility

Express
Backend
React
Frontend
React Native
Mobile
Expo
Mobile

Next Steps

Quick Start

Get your first voice agent running in under 5 minutes

Backend API

Learn about client secret generation and function execution

Frontend Integration

Integrate voice agents into your React applications

Mobile Setup

Add voice capabilities to React Native apps

Build docs developers (and LLMs) love