What is the main use case for AgentTask or can I r...
# ask-ai
b
What is the main use case for AgentTask or can I run multiple AgentTask instances in parallel to the main voice pipeline?
t
Thanks for reaching out, Serhii. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Think of
AgentTask
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