Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make AgentChat Components Support Declarative Specifications. #4439

Closed
5 tasks done
Tracked by #4006
victordibia opened this issue Dec 1, 2024 · 0 comments · Fixed by #5261
Closed
5 tasks done
Tracked by #4006

Make AgentChat Components Support Declarative Specifications. #4439

victordibia opened this issue Dec 1, 2024 · 0 comments · Fixed by #5261
Labels
needs-design A design needs to be created and agreed upo proj-agentchat
Milestone

Comments

@victordibia
Copy link
Collaborator

victordibia commented Dec 1, 2024

What

Currently components in AgentChat dont have a built-in declarative loading or serialization.
This issue is meant to help discuss and architect a setup where all components can be easily serialized to some declarative spec and runtime objects loaded/instantiated from a declarative spec.

Tasks

Benefits

  • Native serialization of component specs
  • Consistency across all applications using the component spec
  • Responsibility for correctly instantiating and serializing a component is solely held by the developer of the component. As it rightfully should be (apps like AGS should do the bare minimum )
  • The process for creating component specifications is not both consistent and simplified for all applications.
  • The developer experience is greatly improved - easy switching between declarative and python code (a common ask).
    • Create your agentchat team in python code, prototype,
    • Team.dict() .. save to team.yaml or team.json for distribution/deployment/debugging in AGS (with a single command)

How to run team_a in AutoGen studio?

autogenstudio ui --config-dir=configs

Note that this is only focused on serialization - how to return a runtime instance of a component from a declaritive spec and how to obtain that declarative spec from an instance. Now the ability to load/save runtime state is a separate task tracked in #4100 .

Update: Implementation with Component Config

This effort will now build on the collaboratively designed ComponentConfig introduced in core


Related to #3624, #4388
Thoughts welcome @husseinmozannar @ekzhu @afourney @gagb @jackgerrits

@victordibia victordibia added proj-agentchat needs-design A design needs to be created and agreed upo and removed needs-triage labels Dec 1, 2024
@victordibia victordibia added this to the 0.4.1 milestone Dec 1, 2024
@victordibia victordibia changed the title AgentChat component serialization AgentChat component config serialization Dec 15, 2024
@victordibia victordibia changed the title AgentChat component config serialization Make AgentChat Components Support Declarative Specifications. Jan 9, 2025
@jackgerrits jackgerrits modified the milestones: 0.4.1, 0.4.x Jan 13, 2025
victordibia added a commit that referenced this issue Jan 31, 2025
<!-- Thank you for your contribution! Please review
https://microsoft.github.io/autogen/docs/Contribute before opening a
pull request. -->

<!-- Please add a reviewer to the assignee section when you create a PR.
If you don't have the access to it, we will shortly find a reviewer and
assign them to your PR. -->

## Why are these changes needed?

This PR updates AGS to use the declarative config serialization native
to AgentChat.
The effect? You can build your teams/artifacts directly in python, run
`team.dump_component()` and immediately run it in AGS.

Some change details:

- Removes ComponentFactory. Instead TeamManager just loads team specs
directly using `Team.load_component`.
- Some fixes to the UI to simplify drag and drop experience.  
- Improve layout of nodes...


<!-- Please give a short summary of the change and the problem this
solves. -->

## Related issue number

<!-- For example: "Closes #1234" -->
Closes #4439 
Closes #5172

## Checks

- [ ] I've included any doc changes needed for
https://microsoft.github.io/autogen/. See
https://microsoft.github.io/autogen/docs/Contribute#documentation to
build and test documentation locally.
- [ ] I've added tests (if relevant) corresponding to the changes
introduced in this PR.
- [ ] I've made sure all auto checks have passed.


cc @EItanya @nour-bouzid
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-design A design needs to be created and agreed upo proj-agentchat
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants