boundless-truck-87206
07/28/2025, 4:08 PMtall-airline-16756
07/28/2025, 4:08 PMtall-airline-16756
07/28/2025, 4:09 PMAgentSession acts as a container that runs one or more Agent instances.
• Each session requires at least one Agent to orchestrate.
• Typically, you create an Agent (defining AI behavior), then an AgentSession (setting up the technical infrastructure), and start the session with the agent.
This separation allows you to focus on the AI logic in the Agent class while letting AgentSession handle the complex real-time media processing and coordination.
Sources: livekit-agents/livekit/agents/__init__.py | Building voice agents | LiveKit Docs | Workflows | LiveKit Docs | Agents Core Architecture | livekit/livekit_composite | DeepWiki