Repository navigation
Autogen adapter - #112
Open
Shahid-Musabbar wants to merge 2 commits into
Open
Autogen adapter#112Shahid-Musabbar wants to merge 2 commits into
Shahid-Musabbar wants to merge 2 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
##What
Adds an AutoGen adapter (autogen-agentchat >= 0.4), following the pattern of the existing adapters.
opengap export -f autogengenerates a standalone Python script.opengap run -a autogengenerates the script and runs it with the local Python interpreter (python3,pythonorpy). It also works through thegitrunner.AssistantAgent.agents:becomeAssistantAgents in aSelectorGroupChat. The main agent owns the request and consults specialists. The run ends when a message containsTERMINATEor atruntime.max_turns(default 20).agents/<name>/agent.yaml) or lightweight ones (a description plus an optionalSOUL.md). Each uses its own model if it sets one.tools/*.yamlbecomeFunctionTools. The function bodies are placeholders, since tool yamls only describe the interface.provider/modelprefix: openai, azure, anthropic, ollama, gemini or llama. Clients are imported lazily, so only the extra for the provider in use needs installing.export,runand the git runner. README, docs and thepackage.jsonkeywords are updated.src/adapters/autogen.test.ts, which covers the single-agent and team output, sub-agent descriptions and souls, selector prompt placeholders, tools, model default, the prompt override and identifier sanitising.Why
AutoGen is a widely used multi-agent framework, and gitagent's sub-agent definitions map cleanly onto
SelectorGroupChat.The selector prompt and coordinator instructions are deliberately general. The main agent is treated as the owner of the task, and sub-agents are helpers it consults, not a planner handing out assignments. Specialists are chosen by their descriptions, so a main agent that does one job and uses other agents as tools also works.
I tried this with a hotel-helpdesk agent and a reservations sub-agent. A check-in/check-out question was routed to the sub-agent instead of being answered by the main agent directly.
Note: a description under the parent's
agents:map overrides the sub-agent's ownagent.yamldescription. This is existing behaviour that other adapters share, not something this PR changes.Closes the Autogen part of the issue #3
How Tested
npm run buildpassesgitagent validatepasses on example agentsAdded autogen.test.ts file with the tests conducted.
Checklist