Qiao-yq commented on issue #1539:
URL: https://github.com/apache/dubbo-admin/issues/1539#issuecomment-5772194186

   The current context-window problem is that, although the Agent already 
injects messages before each model call through ai.WithMessages, 
WindowMemoryForTurn returns only the current active turn. Previously completed 
turns are therefore excluded from the model context, effectively reducing 
multi-turn conversations to single-turn interactions and incorrectly relying on 
the Memory Tool to recover history. The fix should build one stable context 
snapshot at the beginning of each interaction, containing the most recent N 
completed turns in chronological order followed by the selected active turn, 
while excluding all other concurrent active turns. Subsequent tool results 
should be persisted to the Store and appended to the in-memory snapshot for the 
next ReAct model call. MemoryStore and GormStore must implement identical 
window semantics, with tests covering message ordering, window limits, 
concurrent-turn isolation, snapshot stability, and cleanup on failure. This 
change is limited to 
 restoring short-term context within one Session and does not include prompt 
templates, context summarization, cross-session long-term memory, or generic 
hooks and middleware.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to