feat(beta): introduce dynamic_agent tool factory#2884
Merged
Conversation
Collaborator
Author
|
@marklysze If the implementation is satisfactory, I will add documentation after approval. |
Lancetnik
reviewed
May 20, 2026
Lancetnik
reviewed
May 20, 2026
Codecov Report❌ Patch coverage is
... and 36 files with indirect coverage changes 🚀 New features to boost your workflow:
|
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.
Summary
Adds a new advanced tool in
autogen.beta.tools.dynamicthat lets an Agent's LLM assemble an agent at runtime from a JSON spec it produces — name, system prompt, a subset of available tools, and an optional response schema — and immediately run it on a single objective.What the parent LLM sees
A single tool with a JSON-schema'd argument:
The tool reuses the existing
AgentSpecmodel as its input, so the parent LLM may also pass aresponse_schemato constrain the child agent's reply to a structured shape:What the developer writes