You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The goal is to have a SwarmAgent which is responsible for being a self contained unit which invokes a function to provide information to answer a question. This is done by this agent creating its own swarm to have an LLM invoke a function, if the LLM does not invoke the function it is told to invoke the function and the bad message is removed from history. The results of this invocation are validated against provided criteria until it is satisfied.
Notes:
The way the code is written now every function invocation gets directly passed to the validator. Only a single function invocation is passed to the validator. This is specifically so that you can see the exact parameters needed to invoke the function in a way that gives you the result you want. If you let the result validator see the entire message history, it will use many invocations, success or failure, to generate an opinion. This could be a future feature.
Be invoked with a .run("question") method of some sort, and have the result of that .run method be the direct output from the function call. In my opinion this should require that a function return Tuple[Any, str], the Any is returned directly, and the str is what gets passed to the validator for validation.
The function gets additional parameters added to it in the wrapper, which can help with explaining what the agent is doing, or other information. But the pattern of adding parameters to the function that gets registered is pretty cool
I think this code is removed from the PR above, but if the function returns a SwarmAgent, the destination should be captured in the sub_swarm (not mess it up) and change where the main swarm goes afterwards. (I can find how I did this before if it would help)
There may be some stuff in there about "memories" that should be removed for this specific feature, not fully cleaned up yet
The .run method should also be able to be wired up to generate_reply, so if the agent is used in a bigger swarm if it gets sent a question it will respond with the result of the function invocation.
context_variables should be passed through to the inner swarm (not working right now)
results should be saved to context_variables maybe?
async needs to be fixed
Describe the solution you'd like
No response
Additional context
No response
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
The name here is quite confusing, but I couldn't think of anything better.
Demo implementation here: https://github.com/ag2ai/ag2/blob/04e296fd90f5eddfbda3ecb913e2e5bcbb491b1d/autogen/agentchat/contrib/deep_research/reliable_function_swarm.py
The goal is to have a SwarmAgent which is responsible for being a self contained unit which invokes a function to provide information to answer a question. This is done by this agent creating its own swarm to have an LLM invoke a function, if the LLM does not invoke the function it is told to invoke the function and the bad message is removed from history. The results of this invocation are validated against provided criteria until it is satisfied.
Notes:
Describe the solution you'd like
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: