LiveKit Agent Session
Definition
AgentSession は、LiveKit Agents において 1 回の対話実行中の会話状態、モデル構成、イベント処理、ユーザーとのインタラクションを束ねる中核オブジェクトである。
Why It Matters
Worker や Job が実行基盤と起動要求を表すのに対し、実際の対話体験や音声パイプラインの配線を理解するには AgentSession を中心に見る必要がある。
Current Understanding
AgentSession は STT, LLM, TTS, turn handling, hooks, tools などを束ね、Room 内のユーザーとの対話を継続的に管理する。Job によって開始されるが、Job そのものではなく、対話の実体に近い。
LiveKit のコア実装層では、Logic Overview, Session, Workflows, Nodes, Turns などが AgentSession の振る舞い理解に直結する。Sample code deep dive では、このオブジェクトがどの順で組み立てられるかが重要な読解ポイントになる。
Connections
- LiveKit Worker
- LiveKit Job
- LiveKit Room and Participant
- LiveKit Turn Detection
- LiveKit STT and TTS
- LiveKit Pipeline
- LiveKit で AgentSession と Room はどう関係するか
- Agent Session
- Workflows
- Pipeline Nodes and Hooks
New Insights
- AgentSession は「会話の器」であり、Worker/Job よりも実際の対話理解に近い中核概念
- Nodes, hooks, turns, tools など多くの概念は Session を軸に統合すると見通しが良い
Open Questions
- Front-desk sample で session.start 相当の流れがどう表現されるか
- Session と Room participant state の同期境界はどこか