Skip to content

ai-agent: serve the conversation view over a streamed HTTP route, not GraphQL - #167

Merged
wu-sheng merged 1 commit into
masterfrom
ai-agent-view-route
Sep 5, 2026
Merged

ai-agent: serve the conversation view over a streamed HTTP route, not GraphQL#167
wu-sheng merged 1 commit into
masterfrom
ai-agent-view-route

Conversation

@wu-sheng

@wu-sheng wu-sheng commented Sep 5, 2026

Copy link
Copy Markdown
Member

Follow-up to #166.

The asz.view document is as large as the conversation it describes: a session of 136 MB of landed files renders to a 70 MB document. Measured on the OAP, building it takes about six seconds of storage reads plus five of fold and render, so as a GraphQL query it fails on the HTTP server's ten second default timeout, and even when it fits, the whole document has to exist as one JSON string on both sides.

The OAP now serves the document from its own route on the same HTTP server as /graphql, streamed as it is rendered, compressed when the client allows, under its own timeout:

GET /ai-agent/conversations/{conversation}/v1/view?service={serviceName}[&instance={instanceName}]

v1 is the document version. The body is JSON, or YAML on Accept: application/yaml; 400 without a service, 404 when no round of the conversation is stored, 500 on a storage failure, each with {"errorReason": "..."}.

This PR removes the getConversationView query and the ConversationView type, and documents the route in the file header beside the two queries that remain, listConversations and getConversationRawFiles.

OAP side: apache/skywalking, branch feat/ai-agent-conversation, unreleased (11.1.0), so nothing shipped depends on the removed query.

… GraphQL

The asz.view document is as large as the conversation, tens of megabytes
for a long one; the OAP now serves it from
GET /ai-agent/conversations/{conversation}/v1/view on the same server as
/graphql, streamed and compressed, under its own timeout. The
getConversationView query and the ConversationView type are removed; the
route is documented here, beside the two queries that remain.
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.

1 participant