Making tool calls dynamically and configurable

Hi,

We are currently looking at possibilities to make AgentTasks and Function Tools configurable based on settings.

So instead of having an fully hardcoded AgentTasks, it is configured through JSON settings and loaded up accordingly based on agent/session initiation.

This currently doesn’t seem possible outside of the box, or are there any recommendations on how to best approach this for example?

1 Like

Hi, did you see this docs page? Tool definition and use | LiveKit Documentation, that talks about dynamically adding function_tools.

There is no equivalent way to dynamically define tasks, but you can built task groups at runtime as follows: Tasks and task groups | LiveKit Documentation

Hi @darryncampbell I indeed saw it for function_tools, but interesting approach for Task Groups at runtime. I would than need to add AgentTask, with predefined function tools in there and add them to Task groups at runtime, would that work the same way as having AgentTask with pre defined function tools in it?

I’m not sure I follow. If you are asking about dynamically creating AgentTasks at runtime, I have never tried but I imagine it should work.

Yes, that is the case @darryncampbell I have been able to solve this through making a barebone AgentTask, for which the internal functions are auto-created during start of the session through a configured JSON.

1 Like