red-agent-48266
09/11/2025, 4:36 PMtall-airline-16756
09/11/2025, 4:36 PMtall-airline-16756
09/11/2025, 4:38 PM@livekit/agents
and @livekit/agents-plugin-openai
is actually tailored for OpenAI’s Realtime API, so it won’t work directly with Gemini.
To get things working smoothly with Gemini, here’s what you’ll want to do:
• Use the @livekit/agents-plugin-google
package instead.
• Swap out the model for google.beta.realtime.RealtimeModel
.
Here’s a little example to guide you on updating your code for Gemini:
import { defineAgent, JobContext } from '@livekit/agents';
import * as google from '@livekit/agents-plugin-google';
export default defineAgent({
entry: async (ctx: JobContext) => {
await ctx.connect();
const participant = await ctx.waitForParticipant();
const model = new google.beta.realtime.RealtimeModel({
instructions: 'You are a helpful assistant.',
});
const agent = new multimodal.MultimodalAgent({ model });
await agent.start(ctx.room, participant);
},
});
If you have any questions or need a hand with this, please don’t hesitate to reach out. I’m here to help!
Sources: plugins/openai/src/models.ts | LiveKit integration guides | LiveKit Docs | Large language model (LLM) integrations | LiveKit Docs | packages/sip--make-a-call/src/agent.ts | package.json