billions-market-60739
11/13/2025, 6:37 AMvoice.AgentSession but I am struggling to figure out how to make it work for multiple participants. The docs seem to indicate the AgentSession should work out of the box for multiple participants, but I am not seeing that. The transcription works just for the first user who is joining the room and ends when that user leaves the room. Does anyone have experience with this?billions-market-60739
11/13/2025, 6:39 AMexport default defineAgent({
prewarm: async (proc) => {
console.log('Agent prewarming...');
},
entry: async (ctx: JobContext) => {
console.log(`Agent connected to room: ${ctx.room.name}`);
await ctx.connect();
// Create Deepgram STT instance
const stt = new deepgram.STT({
apiKey: process.env.DEEPGRAM_API_KEY,
model: 'nova-2-meeting',
language: 'en',
smartFormat: true,
interimResults: false,
});
// Create a voice agent session
const session = new voice.AgentSession({
stt: stt,
});
session.on(voice.AgentSessionEventTypes.UserInputTranscribed, (event) => {
console.log(`User input transcribed: ${event.transcript}`);
});
// Start the session
await session.start({
agent: new voice.Agent({
instructions:
'You are a transcription agent. You will transcribe the audio from the participants into text.',
}),
room: ctx.room,
outputOptions: {
transcriptionEnabled: true, // Forward transcriptions to clients
audioEnabled: false, // Agent won't speak back
},
});
console.log('Agent is ready and transcribing...');
},
});lively-winter-88668
11/13/2025, 12:09 PM