fix: SocietyOfMindAgent should save its response into context
Why are these changes needed?
Currently SocietyOfMindAgent doesn't save its own response message into context, so in a multi round chat scenario, when this SocietyOfMindAgent is picked by upstream orchestrator (e.g. another GroupChat), its last response message shows in neither task messages nor inner context. This results in message lose. Then its inner team won't get same context as other agents in the upper team.
Related issue number
Checks
- [x] 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.
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 79.77%. Comparing base (
892492f) to head (7848659).
Additional details and impacted files
@@ Coverage Diff @@
## main #6659 +/- ##
==========================================
- Coverage 79.78% 79.77% -0.01%
==========================================
Files 228 228
Lines 17054 17057 +3
==========================================
+ Hits 13606 13608 +2
- Misses 3448 3449 +1
| Flag | Coverage Δ | |
|---|---|---|
| unittests | 79.77% <100.00%> (-0.01%) |
:arrow_down: |
Flags with carried forward coverage won't be shown. Click here to find out more.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
- :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
@microsoft-github-policy-service agree company="Microsoft"
@ekzhu please have a review. While I was using this SocietyOfMindAgent, I found the inner team couldn't get its last response (or a summarized version by this SocietyOfMindAgent), which not meet my expection. maybe this is bug.
I believe this could be an important improvement for SoMA. However, since there is no linked issue for this bug, it’s difficult to assess its severity.
It would be helpful if you could open a clear issue describing the problem and providing steps to reproduce it. While I agree with your bug report in principle, I feel it’s a bit hard to fully validate without a minimal reproducible example.
Thanks for sharing this — just leaving a small suggestion here.