Is `complete()` function in an agent task visible ...
# ask-ai
b
Is
complete()
function in an agent task visible and callable by LLM as a tool?
t
Thanks for reaching out, Masayuki. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Thanks — I’m responding to your question about whether an agent task’s
complete()
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