Add the ai-agent commands for the conversations the AI Sessionizer lands - #234
Merged
Conversation
wu-sheng
force-pushed
the
ai-agent-conversation
branch
3 times, most recently
from
September 5, 2026 02:54
b4afd1d to
fe36f39
Compare
kezhenxu94
previously approved these changes
Sep 5, 2026
The OAP (11.1.0) stores the conversations of long-lived AI agents that
the AI Sessionizer pushes under the AI_AGENT layer, and serves them
through two GraphQL queries and one streamed HTTP route. swctl gains:
ai-agent list one row per conversation of a service, newest first
ai-agent files the raw files as stored, or --export DIR to rebuild
a storage root that asz verify and asz view read
ai-agent view the whole conversation as one asz.view document,
from GET /ai-agent/conversations/{id}/v1/view on the
--base-url host, streamed to stdout or --output,
JSON or --yaml, with the route's problem document
turned into the error
The view route lives on the query host beside /graphql, not on the
admin host, and its body can be tens of megabytes, so it has its own
small streaming client rather than the admin REST client.
goapi is bumped to the regeneration that carries the conversation
types. That regeneration also dropped MenuItem, since the protocol
retired getMenuItems; the menu command keeps the shape locally for the
backends before 11.0.0.
The e2e builds three sessions with the Sessionizer's scenario tool,
pushes them to an OAP, and checks every command, the export included.
wu-sheng
force-pushed
the
ai-agent-conversation
branch
from
September 5, 2026 03:00
fe36f39 to
e68a410
Compare
kezhenxu94
approved these changes
Sep 5, 2026
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The OAP (apache/skywalking 11.1.0, branch
feat/ai-agent-conversation, not yet merged) stores the conversations of long-lived AI agents that the AI Sessionizer pushes under theAI_AGENTlayer, and serves them through two GraphQL queries and one streamed HTTP route. swctl gains a command group for them:ai-agent list--limitlistConversationsai-agent files--export DIRwrites each body to its id path, a storage rootasz verifyandasz viewreadgetConversationRawFiles,body @includeon exportai-agent viewasz.view1.0 document, JSON or--yaml, streamed to stdout or--outputGET /ai-agent/conversations/{id}/v1/viewon the--base-urlhostWhy the view is not a GraphQL query
A long conversation renders to tens of megabytes (a 136 MB session folds to a 70 MB document), so the OAP serves it from a streamed route on the query host beside
/graphql, withContent-Type: application/vnd.skywalking.asz.view+json; version=1.0(or+yaml) and errors asapplication/problem+json.pkg/aiagent/viewis therefore a small streaming client of its own rather than a use of the admin REST client, which is bound to the admin host and buffers bodies: it derives the host from--base-url, shares TLS and basic auth throughpkg/transport, copies the body through, and turns a problem document into the error.Other changes
dist/LICENSEfollows.MenuItem, because the query protocol retiredgetMenuItems; themenucommand keeps the shape locally for backends before 11.0.0.Dependencies
metrics sampled-record#167 (merged): the queries and the route; Bump up text module #168 (open, comment-only): the media-type wording.Verification
swctl ai-agent list,filesandview. It passed 10/10 locally with this branch's binary; once this PR merges, the OAP e2e pins the merged commit asSW_CTL_COMMITand runs it in CI.