RunControl
public final class RunControl
源码Source
io/agentscope/core/agent/RunControl.java:28–122运行 Control,驱动智能体的推理、工具调用与会话执行。位于 io.agentscope.core.agent 包。核心成员包括 status、interruption、cancel、interrupt、termination、RunControl。
Runtime-only control for one execution; never stored in conversation state.
构造器摘要Constructor Summary
| 构造器Constructor | 说明Description |
|---|---|
public RunControl(String agentId) | 初始化 `RunControl` 实例。 Creates a new instance. |
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public AgentRun.Status status() | 返回状态。 Returns the status. |
public InterruptControl interruption() | 返回中断。 Returns the interruption. |
public boolean cancel() | 返回取消。 Cancel this execution immediately, including before subscription or while queued. |
public boolean interrupt(InterruptSource source, Msg message) | 请求中断当前执行。 Running calls interrupt cooperatively; calls not yet admitted are cancelled. |
public Mono<AgentRun.Status> termination() | 返回 `termination` 结果。 Returns the termination. |
构造器详情Constructor Detail
RunControl
public RunControl(String agentId)
初始化 RunControl 实例。
Creates a new instance.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
agentId | String | 智能体标识(类型 `String`)。The agent id. |
源码Source
io/agentscope/core/agent/RunControl.java:36–38方法详情Method Detail
status
public AgentRun.Status status()
返回状态。
Returns the status.
AgentRun.Status返回AgentRun.状态。Returns agent run status.
源码Source
io/agentscope/core/agent/RunControl.java:44–46interruption
public InterruptControl interruption()
返回中断。
Returns the interruption.
InterruptControl返回InterruptControl。Returns interrupt control.
源码Source
io/agentscope/core/agent/RunControl.java:48–50cancel
public boolean cancel()
返回取消。
Cancel this execution immediately, including before subscription or while queued.
boolean返回布尔值,表示判断结果。Returns a boolean result.
源码Source
io/agentscope/core/agent/RunControl.java:69–79interrupt
public boolean interrupt(InterruptSource source, Msg message)
请求中断当前执行。
Running calls interrupt cooperatively; calls not yet admitted are cancelled.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
source | InterruptSource | 来源(类型 `InterruptSource`)。The source. |
message | Msg | 消息(类型 `Msg`)。The message. |
boolean返回布尔值,表示判断结果。Returns a boolean result.
源码Source
io/agentscope/core/agent/RunControl.java:82–93termination
public Mono<AgentRun.Status> termination()
返回 termination 结果。
Returns the termination.
Mono<AgentRun.Status>返回Mono。Returns mono.
源码Source
io/agentscope/core/agent/RunControl.java:119–121