Skip to content

fix: port auto context memory to v2#1682

Open
guslegend0510 wants to merge 4 commits into
agentscope-ai:mainfrom
guslegend0510:fix/issue-1447-v2
Open

fix: port auto context memory to v2#1682
guslegend0510 wants to merge 4 commits into
agentscope-ai:mainfrom
guslegend0510:fix/issue-1447-v2

Conversation

@guslegend0510

Copy link
Copy Markdown

Port auto context memory to v2.

What changed:

  • moved the auto-context extension to v2 AgentState / AgentStateStore
  • wired context_reload through the hook/tool path
  • added tests for compression, persistence, and offload reload

Validation:

  • mvn -f agentscope-extensions/agentscope-extensions-mem/agentscope-extensions-autocontext-memory/pom.xml test

@guslegend0510 guslegend0510 requested a review from a team June 9, 2026 23:18
@AgentScopeJavaBot AgentScopeJavaBot added bug Something isn't working area/ext/memory Memory/session extension implementations labels Jun 10, 2026

@AgentScopeJavaBot AgentScopeJavaBot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 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.

Comment thread agentscope-distribution/agentscope-bom/pom.xml Outdated

@AgentScopeJavaBot AgentScopeJavaBot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All blocking review comments have been addressed. 3 non-blocking suggestion(s) (minor/nit) remain open and may be addressed in a follow-up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/ext/memory Memory/session extension implementations bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants