Warning
This example uses an outdated version of LiveKit Agents. See the agent-starter-node repository for the latest example.
Deploy a sandbox app • LiveKit Agents Docs • LiveKit Cloud • Blog
A basic example of a multimodal voice agent using LiveKit and the Node.js Agents Framework.
Clone the repository and install dependencies:
pnpm installSet up the environment by copying .env.example to .env.local and filling in the required values:
LIVEKIT_URLLIVEKIT_API_KEYLIVEKIT_API_SECRETOPENAI_API_KEY
You can also do this automatically using the LiveKit CLI:
lk app envTo run the agent, first build the TypeScript project, then execute the output with the dev or start commands:
pnpm build
node dist/agent.js dev # see agents-js for more info on subcommandsThis agent requires a frontend application to communicate with. You can use one of our example frontends in livekit-examples, create your own following one of our client quickstarts, or test instantly against one of our hosted Sandbox frontends.