主题
run-stream
Generated reference page for
spec/v1/api/run-stream.asyncapi.yaml.
Metadata
- Type: AsyncAPI
- Source:
spec/v1/api/run-stream.asyncapi.yaml - Raw: View Raw
Summary
- Title: Agent Service Run Stream Protocol
- Version: v1
- Channels: 4
- Servers: 1
Source
yaml
asyncapi: 2.6.0
info:
title: Agent Service Run Stream Protocol
version: v1
description: >
Run stream 的逻辑模型。实际 transport 可以是 SSE、NDJSON 或 JSON-RPC streaming,
但 cursor、事件 envelope 和 terminal 语义必须一致。
defaultContentType: application/json
servers:
stream:
protocol: https
url: api.agent-service.example.com
description: Logical run stream transport
channels:
run.stream.subscribe.request:
publish:
operationId: subscribeRunStream
message:
$ref: '#/components/messages/RunStreamSubscribeRequest'
run.stream.event:
subscribe:
operationId: receiveRunStreamEvent
message:
$ref: '#/components/messages/SequencedOutputEnvelope'
run.stream.keepalive:
subscribe:
operationId: receiveRunStreamKeepalive
message:
$ref: '#/components/messages/StreamKeepalive'
run.stream.end:
subscribe:
operationId: receiveRunStreamTerminal
message:
$ref: '#/components/messages/RunStreamTerminal'
components:
messages:
RunStreamSubscribeRequest:
name: RunStreamSubscribeRequest
payload:
type: object
additionalProperties: false
required: [runId]
properties:
runId:
$ref: ../schemas/common/identity.json#/$defs/runId
threadId:
$ref: ../schemas/common/identity.json#/$defs/threadId
cursor:
$ref: ../schemas/common/identity.json#/$defs/cursor
transport:
$ref: ../schemas/common/enums.json#/$defs/streamTransport
SequencedOutputEnvelope:
name: SequencedOutputEnvelope
payload:
$ref: ../schemas/events/output-event.json#/$defs/SequencedOutputEnvelope
StreamKeepalive:
name: StreamKeepalive
payload:
$ref: ../schemas/events/output-event.json#/$defs/StreamKeepalive
RunStreamTerminal:
name: RunStreamTerminal
payload:
$ref: ../schemas/events/output-event.json#/$defs/RunStreamTerminal