AS AgentScopeAPI 手册 / API Reference

AguiResume

public class AguiResume
源码Source io/agentscope/core/agui/model/AguiResume.java:33–129

AGUI 恢复,与模型服务通信并返回生成或向量化结果。位于 io.agentscope.core.agui.model 包。核心成员包括 getInterruptId、getStatus、getPayload、isResolved、isCancelled、toString。

Represents one official AG-UI resume response for a previous interrupt.

Resume entries are sent on the next RunAgentInput for the same thread and are correlated with the interrupted run by interruptId.

Important distinction: A user response that explicitly denies the request (e.g., { "approved": false }) is still considered resolved, not cancelled. The cancelled status is reserved for cases where the user provides no meaningful input and the payload is omitted.

字段摘要Field Summary

字段Field类型Type说明Description
STATUS_RESOLVED
staticfinal
String
状态已解析字段。
The STATUS RESOLVED field.
STATUS_CANCELLED
staticfinal
String
状态已取消字段。
The STATUS CANCELLED field.

构造器摘要Constructor Summary

构造器Constructor说明Description
public AguiResume(String interruptId, String status, Object payload)
创建新的AG-UI 恢复条目。
Creates a new AG-UI resume entry.

方法摘要Method Summary

方法Method说明Description
public String getInterruptId()
获取中断标识。
Get the interrupt ID this resume entry answers.
public String getStatus()
获取恢复状态。
Get the resume status.
public Object getPayload()
获取恢复负载。
Get the resume payload.
public boolean isResolved()
判断是否已解析。
Check whether this resume entry resolved the interrupt.
public boolean isCancelled()
判断是否已取消。
Check whether this resume entry cancelled the interrupt.
public String toString()
返回 `toString` 结果。
Returns the to string.
public boolean equals(Object o)
设置该参数。
Performs the equals operation.
public int hashCode()
返回 `hashCode` 结果。
Returns the hash code.

字段详情Field Detail

STATUS_RESOLVED

public static final String STATUS_RESOLVED
staticfinal

状态已解析字段。声明为 public static final String STATUS_RESOLVED。

The STATUS RESOLVED field.

源码Source io/agentscope/core/agui/model/AguiResume.java:35

STATUS_CANCELLED

public static final String STATUS_CANCELLED
staticfinal

状态已取消字段。声明为 public static final String STATUS_CANCELLED。

The STATUS CANCELLED field.

源码Source io/agentscope/core/agui/model/AguiResume.java:36

构造器详情Constructor Detail

AguiResume

public AguiResume(String interruptId, String status, Object payload)

创建新的AG-UI 恢复条目。

Creates a new AG-UI resume entry.

参数Parameters
名称Name类型Type说明Description
interruptIdString中断标识来自`RunFinished.outcome.interrupts[]`。The interrupt ID from `RunFinished.outcome.interrupts[]`
statusString状态(类型 `String`)。The resume status, usually `resolved` or `cancelled`
payloadObject负载(类型 `Object`)。Optional response payload for resolved interrupts
源码Source io/agentscope/core/agui/model/AguiResume.java:49–57

方法详情Method Detail

getInterruptId

public String getInterruptId()

获取中断标识。

Get the interrupt ID this resume entry answers.

返回Returns String
中断标识。The interrupt ID
源码Source io/agentscope/core/agui/model/AguiResume.java:64–66

getStatus

public String getStatus()

获取恢复状态。

Get the resume status.

返回Returns String
状态。The status
源码Source io/agentscope/core/agui/model/AguiResume.java:73–75

getPayload

public Object getPayload()

获取恢复负载。

Get the resume payload.

返回Returns Object
返回对象。The payload, or null if not supplied
源码Source io/agentscope/core/agui/model/AguiResume.java:82–84

isResolved

public boolean isResolved()

判断是否已解析。

Check whether this resume entry resolved the interrupt.

返回Returns boolean
返回布尔值,表示判断结果。true if status is `resolved`
源码Source io/agentscope/core/agui/model/AguiResume.java:91–93

isCancelled

public boolean isCancelled()

判断是否已取消。

Check whether this resume entry cancelled the interrupt.

返回Returns boolean
返回布尔值,表示判断结果。true if status is `cancelled`
源码Source io/agentscope/core/agui/model/AguiResume.java:100–102

toString

public String toString()

返回 toString 结果。

Returns the to string.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/core/agui/model/AguiResume.java:104–113

equals

public boolean equals(Object o)

设置该参数。

Performs the equals operation.

参数Parameters
名称Name类型Type说明Description
oObjecto(类型 `Object`)。The o.
返回Returns boolean
返回布尔值,表示判断结果。Returns a boolean result.
源码Source io/agentscope/core/agui/model/AguiResume.java:115–123

hashCode

public int hashCode()

返回 hashCode 结果。

Returns the hash code.

返回Returns int
返回数值结果。Returns a numeric result.
源码Source io/agentscope/core/agui/model/AguiResume.java:125–128
基于官方固定版本源码静态生成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.