Skip to main content

Logic and structure overview

An overview of logic and structure components for LiveKit Agents.

Overview

LiveKit Agents supports modular components for structuring your agent's logic and behavior. Use sessions, workflows, and tools to build custom logic for handling conversations, automations, and external integrations.

Logic and structure components

Use core components to structure your agent logic, including sessions, workflows, customization points, and external integrations. Build simple single-agent applications, or combine these components for complex, multi-agent workflows.

ComponentDescriptionUse cases
Agent sessionsOrchestrate input collection, pipeline management, and output delivery. The main orchestrator for your voice AI app.Single-agent apps, session lifecycle management, and room I/O configuration.
Tasks & task groupsCreate focused, reusable units that perform specific objectives and return typed results. Tasks run inside agents and take temporary control until completion.Consent collection, structured data capture, and multi-step processes with task groups.
WorkflowsModel repeatable patterns with agents, handoffs, and tasks for complex voice AI systems.Multi-persona systems, conversation phase management, and specialized agent routing.
Tool definition & useExtend agent capabilities with custom functions callable by the LLM for external actions and data access.API integrations, frontend RPC calls, and triggering agent handoffs.
Pipeline nodes & hooksCustomize agent behavior at pipeline processing points with custom STT, LLM, TTS, and lifecycle hooks. Override nodes to modify input, output, or add custom logic.Custom providers, output modification, and pronunciation control.
Turn detection & interruptionsManage conversation flow with turn detection, interruption handling, and manual turn control.Natural conversation timing, interruption management, and push-to-talk interfaces.
Agents & handoffsDefine distinct reasoning behaviors and transfer control between agents when different capabilities are needed.Role-based agents, model specialization, and permission management.
External data & RAGConnect agents to external data sources, databases, and APIs for RAG and data operations. Load initial context, perform RAG lookups, and integrate with external services.Knowledge base search, user profile loading, and database operations.

In this section

Read more about each component.