Skip to content

Show where an AI agent conversation's model call history changed - #14149

Merged
wu-sheng merged 1 commit into
masterfrom
ai-conversation-history-change
Oct 18, 2026
Merged

wu-sheng merged 1 commit into
masterfrom
ai-conversation-history-change

Conversation

@wu-sheng

Copy link
Copy Markdown
Member

Show where an AI agent conversation's model call history changed

  • If this is non-trivial feature, paste the links/URLs to the design doc.
  • Update the documentation to include this new feature.
  • Tests(including UT, IT, E2E) are added to verify the new feature.
  • If it's UI related, attach the screenshots below.

This follows apache/skywalking-ai-sessionizer#77, which the asz.view format defines. The Sessionizer now compares
each model call's history with the call before it in its stream. Where the history changed, it adds a
history.change node just before the call, under the same parent, at the call's first record. The rules are on the
Sessionizer's Session Flow page, "Where a call's history changed".

The OAP mirrors two rules of the document:

  • A card carries no content. It stands on its call's first record, but what it says is in its attrs, so
    ConversationViewBuilder.carriesContent lists history.change beside llm.call. Without it, the card took the
    call's text.
  • A card comes just before its call. At one record, ConversationFold.compare orders a card by the id of the
    call it names, call/ and the card's key, and before that call, as the Sessionizer's Before does. By its own id,
    history/ sorts after call/.

Tests.

  • history-forget is the Sessionizer's scenario of that name, built and parsed by the Sessionizer. The document the
    OAP builds from its files and round equals asz conversation -json, key for key and in order. The test also
    checks the card's place among its siblings and that it carries no text.

  • CardOrderTest mirrors the Sessionizer's own order test: four nodes at one record, given in every rotation.

  • Each rule was proven by reverting it and seeing its test fail.

  • Update the CHANGES log.

The AI Sessionizer now compares each model call's history with the call
before it, and where the history changed it adds a history.change node
just before the call, under the same parent, at the call's first record
(apache/skywalking-ai-sessionizer#77). The document lists that node as a
step that carries no text of the record it stands on, since what it says
is in its attributes, and orders it among the nodes at one record by the
call it names, and before that call, as the Sessionizer orders it.

The new history-forget fixture is the Sessionizer's scenario of that
name, built and parsed by the Sessionizer, and the document the OAP
builds from it equals the Sessionizer's, key for key.
@wu-sheng wu-sheng added this to the 11.1.0 milestone Oct 18, 2026
@wu-sheng wu-sheng added the enhancement Enhancement on performance or codes label Oct 18, 2026
@wu-sheng
wu-sheng merged commit d108173 into master Oct 18, 2026
242 checks passed
@wu-sheng
wu-sheng deleted the ai-conversation-history-change branch October 18, 2026 08:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Enhancement on performance or codes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants