AS AgentScopeAPI 手册 / API Reference

AgentRunRegistry

@Component public final class AgentRunRegistry
源码Source io/agentscope/builder/web/managed/AgentRunRegistry.java:25–56

智能体运行注册表,承载智能体的部署、调度与服务化运行。位于 io.agentscope.builder.web.managed 包。核心成员包括 register、find、cancel。

Local execution ownership. Cross-replica routing belongs to the turn coordinator.

方法摘要Method Summary

方法Method说明Description
public void register(String ownerId, String sessionId, AgentRun<?> run)
执行注册相关操作。
Register before subscribing; all terminal outcomes remove the exact entry automatically.
public Optional<AgentRun<?>> find(String ownerId, String sessionId, String runId)
执行查找相关操作。
Performs the find operation.
public boolean cancel(String ownerId, String sessionId, String runId)
执行取消相关操作。
Performs the cancel operation.

方法详情Method Detail

register

public void register(String ownerId, String sessionId, AgentRun<?> run)

执行注册相关操作。

Register before subscribing; all terminal outcomes remove the exact entry automatically.

参数Parameters
名称Name类型Type说明Description
ownerIdString所有者标识(类型 `String`)。The owner id.
sessionIdString会话标识(类型 `String`)。The session id.
runAgentRun<?>运行(类型 `AgentRun`)。The run.
源码Source io/agentscope/builder/web/managed/AgentRunRegistry.java:32–42

find

public Optional<AgentRun<?>> find(String ownerId, String sessionId, String runId)

执行查找相关操作。

Performs the find operation.

参数Parameters
名称Name类型Type说明Description
ownerIdString所有者标识(类型 `String`)。The owner id.
sessionIdString会话标识(类型 `String`)。The session id.
runIdString运行标识(类型 `String`)。The run id.
返回Returns Optional<AgentRun<?>>
返回可选>。Returns optional.
源码Source io/agentscope/builder/web/managed/AgentRunRegistry.java:44–51

cancel

public boolean cancel(String ownerId, String sessionId, String runId)

执行取消相关操作。

Performs the cancel operation.

参数Parameters
名称Name类型Type说明Description
ownerIdString所有者标识(类型 `String`)。The owner id.
sessionIdString会话标识(类型 `String`)。The session id.
runIdString运行标识(类型 `String`)。The run id.
返回Returns boolean
返回布尔值,表示判断结果。Returns a boolean result.
源码Source io/agentscope/builder/web/managed/AgentRunRegistry.java:53–55
基于官方固定版本源码静态生成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.