LearnNewsExamplesServices
Frontmatter
id7660
titleRefine Memory Protocol: Define a "Turn" and Consolidate Sub-Turns
stateClosed
labels
documentationenhancementairefactoring
assigneestobiu
createdAtOct 26, 2025, 11:20 AM
updatedAtOct 26, 2025, 11:23 AM
githubUrlhttps://github.com/neomjs/neo/issues/7660
authortobiu
commentsCount0
parentIssue7604
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtOct 26, 2025, 11:23 AM

Refine Memory Protocol: Define a "Turn" and Consolidate Sub-Turns

Closed v11.0.0 documentationenhancementairefactoring
tobiu
tobiu commented on Oct 26, 2025, 11:20 AM

This ticket is a follow-up to #7658.

While the current protocol mandates saving every turn, it doesn't clearly define what constitutes a "turn". This leads to a problem of "sub-turns", where an agent's multiple attempts to use a tool for a single user prompt are saved as separate, noisy memories.

We need to refine the protocol with a clearer definition.

Proposed Definition of a "Turn": A single "turn" encompasses the entire agent process from receiving a user's PROMPT to delivering the final RESPONSE that awaits the next user prompt. All intermediate steps (tool calls, self-corrections, errors, and retries) are considered part of this single turn.

Proposed Protocol Refinement:

  1. The agent must internally accumulate its thought process, including all tool attempts and self-corrections, throughout its entire process for a given prompt.
  2. The add_memory tool must only be called once per turn, at the very end, just before delivering the final response to the user.
  3. The thought parameter for the add_memory call should be a consolidated summary of the entire internal monologue for that turn.
  4. The response parameter should be a consolidated log of all responses generated during the turn, including self-corrections, error messages, and the final response to the user.

This change will significantly increase the signal-to-noise ratio of the stored memories. It also acknowledges the current limitation of not having agent lifecycle hooks and places the responsibility of consolidating the turn on the agent itself.

tobiu added the documentation label on Oct 26, 2025, 11:20 AM
tobiu added the enhancement label on Oct 26, 2025, 11:20 AM
tobiu added the ai label on Oct 26, 2025, 11:20 AM
tobiu added the refactoring label on Oct 26, 2025, 11:20 AM
tobiu assigned to @tobiu on Oct 26, 2025, 11:20 AM
tobiu added parent issue #7604 on Oct 26, 2025, 11:21 AM
tobiu referenced in commit 7918d8b - "Refine Memory Protocol: Define a "Turn" and Consolidate Sub-Turns #7660" on Oct 26, 2025, 11:23 AM
tobiu closed this issue on Oct 26, 2025, 11:23 AM
tobiu cross-referenced by #7661 on Oct 26, 2025, 11:33 AM