autogen icon indicating copy to clipboard operation
autogen copied to clipboard

Ability to select serial or parallel execution of multiple function calls [Feature Request]:

Open deepak-akkil opened this issue 1 year ago • 3 comments

Is your feature request related to a problem? Please describe.

Its fantastic that Autogen supports parallel function calling with the newer OAI updates.

However, not all usecases involve parallelizable functions. In some cases while it will benefit from LLM returning multiple function in one (to save tokens, reduce latency etc), the application need to have control over how these functions are executed.

For example: We are working on web automation project based on primitive skills such as (enter text, press specific keys. click on selector etc). Lets take a simple example where you are on google homepage and you want to perform a search. It is perfectly reasonable for the LLM to return two functions: a. Enter text : search keyword b. Click element to click

Here the expectation is that these will be executed in series (and not parallel).

It would be beneficial to have a mechanism to select how the parallel function calls returned by LLM will be executed (either in parallel or serial in the order it was received)

Describe the solution you'd like

A finegrained control over how the function execution takes place.

Additional context

No response

deepak-akkil avatar Jun 04 '24 12:06 deepak-akkil

Good observation. I think you can always implement a user proxy like agent that executes these functions in the fashion that you'd like!

gagb avatar Aug 28 '24 06:08 gagb

Yup, thats how we worked around it for now, with an own implementation of UserProxyAgent. I think this might be a common scenario that is better handled at the framework level. Thanks again!

deepak-akkil avatar Aug 28 '24 12:08 deepak-akkil

Yup that makes sense! Thanks!

gagb avatar Aug 28 '24 16:08 gagb

Parallel vs serial function calling can be selected in 0.4, see here https://microsoft.github.io/autogen/stable/user-guide/agentchat-user-guide/tutorial/agents.html#parallel-tool-calls

jackgerrits avatar Feb 03 '25 17:02 jackgerrits