Learn how to create a web application that enables voice conversations with ElevenLabs AI agents
npm
installed on your local system.Create a new Next.js project
Navigate to project directory
Install the ElevenLabs dependency
Test the setup
Create the conversation component
app/components/conversation.tsx
:Update the main page
app/page.tsx
with:(Optional) Authenticate the agents with a signed URL
agentId
in
the startSession
call.Create environment variables
.env.local
file in your project root:.env.local
to your .gitignore
file to prevent accidentally committing sensitive credentials to version control.Create an API route
app/api/get-signed-url/route.ts
:Update the Conversation component
conversation.tsx
to fetch and use the signed URL: