better-painter-56211
08/30/2025, 9:08 AMtall-airline-16756
08/30/2025, 9:08 AMtall-airline-16756
08/30/2025, 9:09 AMAgentTask in LiveKit as a handy helper that takes care of specific, clear-cut jobs during an agent session and then gives you back the results in a neat, typed format. For example, it can handle things like getting recording consent, gathering structured info like email addresses, or checking if user input is valid. While it’s doing its thing, AgentTask temporarily steps in, pauses the current agent, and once done, hands control back along with the outcome.
Just a heads-up: you can’t run multiple AgentTask instances alongside the main voice pipeline at the same time. Only one task runs at once because it needs to be awaited within an active agent’s context. Trying to juggle several AgentTask instances simultaneously might cause some hiccups.
Also, this feature is still experimental and is currently available only in Python—not in Node.js yet.
Sources: Workflows | LiveKit Docs | livekit-agents/livekit/agents/voice/__init__.py