thankful-musician-96745
12/22/2025, 4:33 AMtall-airline-16756
12/22/2025, 4:33 AMtall-airline-16756
12/22/2025, 4:33 AMthankful-musician-96745
12/22/2025, 4:34 AMtall-airline-16756
12/22/2025, 4:35 AMfrom livekit.agents import AgentSession
from livekit.plugins import openai
session = AgentSession(
llm=openai.LLM.with_azure(
azure_deployment="<your-deployment-name>",
azure_endpoint="https://<your-resource>.<http://openai.azure.com/|openai.azure.com/>",
api_key="<your-api-key>",
api_version="2024-10-01-preview",
)
)
# use `session` to run agent tasks, prompts, etc.
Node.js example
import { AgentSession } from "livekit-agents";
import { openai } from "livekit-plugins";
const session = new AgentSession({
llm: openai.LLM.withAzure({
azure_deployment: "<your-deployment-name>",
azure_endpoint: "https://<your-resource>.<http://openai.azure.com/|openai.azure.com/>",
api_key: "<your-api-key>",
api_version: "2024-10-01-preview",
}),
});
// use `session` to run agent tasks, prompts, etc.
Next steps I can help with
• Sample prompt/agent flow for your use case (moderation, transcription, summarization, etc.)
• How to provide credentials securely on your self‑hosted server
• Debug steps if you hit authentication or network errors
Which would you like next?thankful-musician-96745
12/22/2025, 4:36 AMtall-airline-16756
12/22/2025, 4:36 AMazure_endpoint, azure_deployment, and credentials (API key or Microsoft Entra token).
• Ensure your Voice Agent flow sends audio (or transcriptions) to the LLM as text prompts and receives text responses to convert to speech. LiveKit Agents handles the LLM integration; text-to-speech (TTS) must be implemented separately (you can use Azure TTS or another TTS service).
• Securely provide credentials on your self-hosted server (environment variables or secret store).
Would you like:
• a concrete example that includes audio → transcription → LLM prompt → TTS, or
• a minimal code snippet showing how to wire Azure OpenAI into a Voice Agent session?