fix: port auto context memory to v2#1682
Conversation
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
AgentScopeJavaBot
left a comment
There was a problem hiding this comment.
🤖 AI Review
This PR ports the auto-context memory extension to v2, integrating with AgentState / AgentStateStore. The module adds automatic conversation compression (tool-group compression, large-message offloading, previous-round summarization, and current-round compression) via a Hook + Memory design. The code is well-structured with good separation of concerns and decent test coverage. However, there are several correctness and robustness issues: deleteMessage silently corrupts the original-memory buffer after compression, the LLM summarization call blocks while holding the instance monitor (risking lock-contention during slow model responses), and the config builder accepts any values without validation — all of which should be addressed before merge.
AgentScopeJavaBot
left a comment
There was a problem hiding this comment.
All blocking review comments have been addressed. 3 non-blocking suggestion(s) (minor/nit) remain open and may be addressed in a follow-up.
Port auto context memory to v2.
What changed:
AgentState/AgentStateStorecontext_reloadthrough the hook/tool pathValidation:
mvn -f agentscope-extensions/agentscope-extensions-mem/agentscope-extensions-autocontext-memory/pom.xml test