best-battery-56004
02/26/2026, 12:25 AMcomplete() function in an agent task visible and callable by LLM as a tool?tall-airline-16756
02/26/2026, 12:25 AMtall-airline-16756
02/26/2026, 12:25 AMcomplete() function is visible to the LLM and can be called as a tool.
Short answer: No — complete() is not visible or callable by the LLM as a tool.
Why:
• complete() is an internal method the agent task uses to finalize its execution and return a result to the controlling agent. It isn’t exposed to the LLM runtime.
• If you want the LLM to call functionality, you must define explicit tools using @function_tool (Python) or llm.tool() (Node.js). Those tool functions can perform work and — if needed — call complete() internally, but the LLM only sees and invokes the tool function itself, not complete().
If it helps, I can:
• Show a short example of how to wrap task-finalization in a tool function (Python or Node) so the LLM can call it.
• Review a snippet of your current task/tool code and suggest how to expose the behavior you want as a callable tool.
Which would you prefer?
Sources: Tasks and task groups | LiveKit Documentation | Tool definition and use | LiveKit Documentation