voice.AgentSession vs voice.Agent ?
# ask-ai
r
voice.AgentSession vs voice.Agent ?
t
Thanks for reaching out, simo.dev. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Thanks — you're asking for the difference between
voice.AgentSession
and
voice.Agent
. Here's the short, practical answer. •
voice.Agent
— Defines the agent's AI behavior: instructions, reasoning, tools, and how it decides responses or hands off to other agents. Think "what the AI says and why." •
voice.AgentSession
— Orchestrates the real‑time voice pipeline: connects to the LiveKit room, handles audio I/O, STT, LLM calls, TTS, VAD, emits lifecycle events (listening/thinking/speaking), and runs an active
Agent
. Think "how the AI interacts in real time." In other words: an
AgentSession
uses one or more
Agent
instances to manage the end‑to‑end voice interaction. Would you like an example of creating an Agent and starting a session (TypeScript or Python)? Sources: Agents and handoffs | LiveKit docs | Agent session | LiveKit docs