AS AgentScopeAPI 手册 / API Reference

CopilotKitRuntimeService

@Service public final class CopilotKitRuntimeService
源码Source io/agentscope/examples/copilotkit/service/CopilotKitRuntimeService.java:39–136

CopilotKit 运行时服务,把智能体接入外部消息渠道与企业平台。位于 io.agentscope.examples.copilotkit.service 包。核心成员包括 info、connect、CopilotKitRuntimeService。

CopilotKit Runtime info and multi-route connect handshake with AgentEvent replay.

构造器摘要Constructor Summary

构造器Constructor说明Description
public CopilotKitRuntimeService(AguiAgentRegistry aguiAgentRegistry, AgentEventAguiReplayer eventReplayer)
初始化 `CopilotKitRuntimeService` 实例。
Creates a new instance.

方法摘要Method Summary

方法Method说明Description
public InfoResponse info()
返回信息。
Returns the info.
public Flux<ServerSentEvent<String>> connect(RunAgentInput input)
建立连接并完成初始化。
AG-UI connect: replay persisted AgentEvents through converters, or emit an empty handshake.

构造器详情Constructor Detail

CopilotKitRuntimeService

public CopilotKitRuntimeService(AguiAgentRegistry aguiAgentRegistry, AgentEventAguiReplayer eventReplayer)

初始化 CopilotKitRuntimeService 实例。

Creates a new instance.

参数Parameters
名称Name类型Type说明Description
aguiAgentRegistryAguiAgentRegistryAGUI 智能体注册表(类型 `AguiAgentRegistry`)。The agui agent registry.
eventReplayerAgentEventAguiReplayer事件 Replayer(类型 `AgentEventAguiReplayer`)。The event replayer.
源码Source io/agentscope/examples/copilotkit/service/CopilotKitRuntimeService.java:53–57

方法详情Method Detail

info

public InfoResponse info()

返回信息。

Returns the info.

返回Returns InfoResponse
返回InfoResponse。Returns info response.
源码Source io/agentscope/examples/copilotkit/service/CopilotKitRuntimeService.java:59–86

connect

public Flux<ServerSentEvent<String>> connect(RunAgentInput input)

建立连接并完成初始化。

AG-UI connect: replay persisted AgentEvents through converters, or emit an empty handshake.

参数Parameters
名称Name类型Type说明Description
inputRunAgentInput输入消息(类型 `RunAgentInput`)。The input.
返回Returns Flux<ServerSentEvent<String>>
返回Flux>。Returns flux.
源码Source io/agentscope/examples/copilotkit/service/CopilotKitRuntimeService.java:115–123
基于官方固定版本源码静态生成Generated from pinned official sources · Python 2.0.11 · Java 2.0.4
签名与文档为静态抽取;如有疑问请以源码为准。Signatures and docs are extracted statically; verify against the source when in doubt.