Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix issue #1160#1177

Merged
LearningGp merged 3 commits into
agentscope-ai:mainfrom
xuhuafeifei:fix_issue_1160
Apr 28, 2026
Merged

fix issue #1160#1177
LearningGp merged 3 commits into
agentscope-ai:mainfrom
xuhuafeifei:fix_issue_1160

Conversation

@xuhuafeifei
Copy link
Copy Markdown
Contributor

AgentScope-Java Version

io.agentscope:agentscope-parent:pom:1.0.12-SNAPSHOT

Description

LongTermMemory will block the agent when the LLM stops responding. This commit enables the framework to record long term memory asynchronously.

Added longTermMemoryAsyncRecord option to ReActAgent.Builder to support fire-and-forget long-term memory recording in STATIC_CONTROL / BOTH mode.

When enabled, the StaticLongTermMemoryHook performs record() asynchronously without blocking the agent's response, reducing latency in STATIC_CONTROL mode. Agent-controlled recording (AGENT_CONTROL) remains synchronous.

Checklist

Please check the following items before code is ready to be reviewed.

  • ReActAgent.Builder — new longTermMemoryAsyncRecord(boolean) setter

  • StaticLongTermMemoryHook — overloaded constructor accepting asyncRecord flag; handlePostCall() splits sync/async paths

  • StaticLongTermMemoryHookTest — added 3 async recording test cases

  • Code has been formatted with mvn spotless:apply

  • All tests are passing (mvn test)

  • Javadoc comments are complete and follow project conventions

  • Related documentation has been updated (e.g. links, examples, etc.)

  • Code is ready for review

@xuhuafeifei xuhuafeifei requested a review from a team April 9, 2026 11:08
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 9, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Copy link
Copy Markdown
Collaborator

@LearningGp LearningGp left a comment

Choose a reason for hiding this comment

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

LGTM

@LearningGp LearningGp merged commit 0058bff into agentscope-ai:main Apr 28, 2026
5 checks passed
liangxingguang pushed a commit to liangxingguang/agentscope-java that referenced this pull request May 21, 2026
…gentscope-ai#1177)

## AgentScope-Java Version

io.agentscope:agentscope-parent:pom:1.0.12-SNAPSHOT

## Description

LongTermMemory will block the agent when the LLM stops responding. This
commit enables the framework to record long term memory asynchronously.

Added `longTermMemoryAsyncRecord` option to `ReActAgent.Builder` to
support fire-and-forget long-term memory recording in `STATIC_CONTROL` /
`BOTH` mode.

When enabled, the `StaticLongTermMemoryHook` performs `record()`
asynchronously without blocking the agent's response, reducing latency
in `STATIC_CONTROL` mode. Agent-controlled recording (`AGENT_CONTROL`)
remains synchronous.

## Checklist

Please check the following items before code is ready to be reviewed.

- `ReActAgent.Builder` — new `longTermMemoryAsyncRecord(boolean)` setter
- `StaticLongTermMemoryHook` — overloaded constructor accepting
`asyncRecord` flag; `handlePostCall()` splits sync/async paths
- `StaticLongTermMemoryHookTest` — added 3 async recording test cases


- [X]  Code has been formatted with `mvn spotless:apply`
- [X]  All tests are passing (`mvn test`)
- [X]  Javadoc comments are complete and follow project conventions
- [X] Related documentation has been updated (e.g. links, examples,
etc.)
- [X]  Code is ready for review
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants