mirror of
https://github.com/microsoft/autogen.git
synced 2025-08-17 13:11:30 +00:00

## Why are these changes needed? Starting from AutoGen v0.5.5, tools are internally managed through `StaticWorkbench`. However, both tools and workbench were being serialized and deserialized, which caused conflicts during deserialization: • When both are restored, the constructor raises: ``` ValueError: Tools cannot be used with a workbench. ``` The changes address this issue by: 1. Removing tools from serialization/deserialization: • tools are now considered internal state of `StaticWorkbench`, and are no longer serialized. • Only workbench is serialized, ensuring consistency and avoiding duplication. 2. Ensuring logical integrity: • Since tools are not used directly after initialization, persisting them separately serves no functional purpose. • This avoids scenarios where both are populated, violating constructor constraints. Summary: This change prevents tools/workbench conflicts by fully delegating tool management to `StaticWorkbench` and avoiding unnecessary persistence of tools themselves. <!-- Please give a short summary of the change and the problem this solves. --> ## Related issue number Closes #6405 ## Checks - [ ] I've included any doc changes needed for <https://microsoft.github.io/autogen/>. See <https://github.com/microsoft/autogen/blob/main/CONTRIBUTING.md> to build and test documentation locally. - [x] I've added tests (if relevant) corresponding to the changes introduced in this PR. - [x] I've made sure all auto checks have passed. --------- Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>