AS AgentScopeAPI 手册 / API Reference

RemoteAgentEvent

@JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_NULL) public class RemoteAgentEvent
源码Source io/agentscope/harness/agent/subagent/protocol/RemoteAgentEvent.java:31–173

远程智能体事件,描述执行过程中的事件。位于 io.agentscope.harness.agent.subagent.protocol 包。核心成员包括 getSeq、setSeq、getType、setType、getTaskId、setTaskId。

Stable Protocol DTO for remote subagent event streaming.

Fields are optional per event type; unknown fields are ignored for forward compatibility.

Besides the flat per-type fields, an event may carry #getPayload() — the source io.agentscope.core.event.AgentEvent serialized in full. Clients that understand it restore the original event (ids, timestamps, metadata and all); older ones keep reading the flat fields.

构造器摘要Constructor Summary

构造器Constructor说明Description
public RemoteAgentEvent()
初始化 `RemoteAgentEvent` 实例。
Creates a new instance.

方法摘要Method Summary

方法Method说明Description
public long getSeq()
获取 `getSeq`。
Returns the seq.
public void setSeq(long seq)
设置 `setSeq`。
Sets the seq.
public RemoteEventType getType()
获取类型。
Returns the type.
public void setType(RemoteEventType type)
设置类型。
Sets the type.
public String getTaskId()
获取任务标识。
Returns the task id.
public void setTaskId(String taskId)
设置任务标识。
Sets the task id.
public String getAgentId()
获取智能体标识。
Returns the agent id.
public void setAgentId(String agentId)
设置智能体标识。
Sets the agent id.
public String getTimestamp()
获取时间戳。
Returns the timestamp.
public void setTimestamp(String timestamp)
设置时间戳。
Sets the timestamp.
public String getText()
获取文本。
Returns the text.
public void setText(String text)
设置文本。
Sets the text.
public String getToolCallId()
获取工具调用标识。
Returns the tool call id.
public void setToolCallId(String toolCallId)
设置工具调用标识。
Sets the tool call id.
public String getToolName()
获取工具名称。
Returns the tool name.
public void setToolName(String toolName)
设置工具名称。
Sets the tool name.
public String getToolInput()
获取工具输入。
Returns the tool input.
public void setToolInput(String toolInput)
设置工具输入。
Sets the tool input.
public List<RemotePendingConfirm> getPendingConfirms()
获取 `getPendingConfirms`。
Returns the pending confirms.
public void setPendingConfirms(List<RemotePendingConfirm> pendingConfirms)
设置 `setPendingConfirms`。
Sets the pending confirms.
public String getStatus()
获取状态。
Returns the status.
public void setStatus(String status)
设置状态。
Sets the status.
public String getError()
获取错误。
Returns the error.
public void setError(String error)
设置错误。
Sets the error.
public String getEventType()
获取事件类型。
Name of the source `io.agentscope.core.event.AgentEventType`, e.g.
public void setEventType(String eventType)
设置事件类型。
Sets the event type.
public String getPayload()
获取负载。
The source `io.agentscope.core.event.AgentEvent` as JSON, or `null` for events the server synthesizes itself (`STATUS`, `RUN_ERROR`) and for events whose serialization failed.
public void setPayload(String payload)
设置负载。
Sets the payload.

构造器详情Constructor Detail

RemoteAgentEvent

public RemoteAgentEvent()

初始化 RemoteAgentEvent 实例。

Creates a new instance.

源码Source io/agentscope/harness/agent/subagent/protocol/RemoteAgentEvent.java:50

方法详情Method Detail

getSeq

public long getSeq()

获取 getSeq。

Returns the seq.

返回Returns long
返回数值结果。Returns a numeric result.
源码Source io/agentscope/harness/agent/subagent/protocol/RemoteAgentEvent.java:52–54

setSeq

public void setSeq(long seq)

设置 setSeq。

Sets the seq.

参数Parameters
名称Name类型Type说明Description
seqlongseq(类型 `long`)。The seq.
源码Source io/agentscope/harness/agent/subagent/protocol/RemoteAgentEvent.java:56–58

getType

public RemoteEventType getType()

获取类型。

Returns the type.

返回Returns RemoteEventType
返回RemoteEventType。Returns remote event type.
源码Source io/agentscope/harness/agent/subagent/protocol/RemoteAgentEvent.java:60–62

setType

public void setType(RemoteEventType type)

设置类型。

Sets the type.

参数Parameters
名称Name类型Type说明Description
typeRemoteEventType类型(类型 `RemoteEventType`)。The type.
源码Source io/agentscope/harness/agent/subagent/protocol/RemoteAgentEvent.java:64–66

getTaskId

public String getTaskId()

获取任务标识。

Returns the task id.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/harness/agent/subagent/protocol/RemoteAgentEvent.java:68–70

setTaskId

public void setTaskId(String taskId)

设置任务标识。

Sets the task id.

参数Parameters
名称Name类型Type说明Description
taskIdString任务标识(类型 `String`)。The task id.
源码Source io/agentscope/harness/agent/subagent/protocol/RemoteAgentEvent.java:72–74

getAgentId

public String getAgentId()

获取智能体标识。

Returns the agent id.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/harness/agent/subagent/protocol/RemoteAgentEvent.java:76–78

setAgentId

public void setAgentId(String agentId)

设置智能体标识。

Sets the agent id.

参数Parameters
名称Name类型Type说明Description
agentIdString智能体标识(类型 `String`)。The agent id.
源码Source io/agentscope/harness/agent/subagent/protocol/RemoteAgentEvent.java:80–82

getTimestamp

public String getTimestamp()

获取时间戳。

Returns the timestamp.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/harness/agent/subagent/protocol/RemoteAgentEvent.java:84–86

setTimestamp

public void setTimestamp(String timestamp)

设置时间戳。

Sets the timestamp.

参数Parameters
名称Name类型Type说明Description
timestampString时间戳(类型 `String`)。The timestamp.
源码Source io/agentscope/harness/agent/subagent/protocol/RemoteAgentEvent.java:88–90

getText

public String getText()

获取文本。

Returns the text.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/harness/agent/subagent/protocol/RemoteAgentEvent.java:92–94

setText

public void setText(String text)

设置文本。

Sets the text.

参数Parameters
名称Name类型Type说明Description
textString文本(类型 `String`)。The text.
源码Source io/agentscope/harness/agent/subagent/protocol/RemoteAgentEvent.java:96–98

getToolCallId

public String getToolCallId()

获取工具调用标识。

Returns the tool call id.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/harness/agent/subagent/protocol/RemoteAgentEvent.java:100–102

setToolCallId

public void setToolCallId(String toolCallId)

设置工具调用标识。

Sets the tool call id.

参数Parameters
名称Name类型Type说明Description
toolCallIdString工具调用标识(类型 `String`)。The tool call id.
源码Source io/agentscope/harness/agent/subagent/protocol/RemoteAgentEvent.java:104–106

getToolName

public String getToolName()

获取工具名称。

Returns the tool name.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/harness/agent/subagent/protocol/RemoteAgentEvent.java:108–110

setToolName

public void setToolName(String toolName)

设置工具名称。

Sets the tool name.

参数Parameters
名称Name类型Type说明Description
toolNameString工具名称(类型 `String`)。The tool name.
源码Source io/agentscope/harness/agent/subagent/protocol/RemoteAgentEvent.java:112–114

getToolInput

public String getToolInput()

获取工具输入。

Returns the tool input.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/harness/agent/subagent/protocol/RemoteAgentEvent.java:116–118

setToolInput

public void setToolInput(String toolInput)

设置工具输入。

Sets the tool input.

参数Parameters
名称Name类型Type说明Description
toolInputString工具输入(类型 `String`)。The tool input.
源码Source io/agentscope/harness/agent/subagent/protocol/RemoteAgentEvent.java:120–122

getPendingConfirms

public List<RemotePendingConfirm> getPendingConfirms()

获取 getPendingConfirms。

Returns the pending confirms.

返回Returns List<RemotePendingConfirm>
返回列出。Returns list.
源码Source io/agentscope/harness/agent/subagent/protocol/RemoteAgentEvent.java:124–126

setPendingConfirms

public void setPendingConfirms(List<RemotePendingConfirm> pendingConfirms)

设置 setPendingConfirms。

Sets the pending confirms.

参数Parameters
名称Name类型Type说明Description
pendingConfirmsList<RemotePendingConfirm>待处理 Confirms(类型 `List`)。The pending confirms.
源码Source io/agentscope/harness/agent/subagent/protocol/RemoteAgentEvent.java:128–130

getStatus

public String getStatus()

获取状态。

Returns the status.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/harness/agent/subagent/protocol/RemoteAgentEvent.java:132–134

setStatus

public void setStatus(String status)

设置状态。

Sets the status.

参数Parameters
名称Name类型Type说明Description
statusString状态(类型 `String`)。The status.
源码Source io/agentscope/harness/agent/subagent/protocol/RemoteAgentEvent.java:136–138

getError

public String getError()

获取错误。

Returns the error.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/harness/agent/subagent/protocol/RemoteAgentEvent.java:140–142

setError

public void setError(String error)

设置错误。

Sets the error.

参数Parameters
名称Name类型Type说明Description
errorString错误(类型 `String`)。The error.
源码Source io/agentscope/harness/agent/subagent/protocol/RemoteAgentEvent.java:144–146

getEventType

public String getEventType()

获取事件类型。

Name of the source io.agentscope.core.event.AgentEventType, e.g.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/harness/agent/subagent/protocol/RemoteAgentEvent.java:153–155

setEventType

public void setEventType(String eventType)

设置事件类型。

Sets the event type.

参数Parameters
名称Name类型Type说明Description
eventTypeString事件类型(类型 `String`)。The event type.
源码Source io/agentscope/harness/agent/subagent/protocol/RemoteAgentEvent.java:157–159

getPayload

public String getPayload()

获取负载。

The source io.agentscope.core.event.AgentEvent as JSON, or null for events the server synthesizes itself (STATUS, RUN_ERROR) and for events whose serialization failed.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/harness/agent/subagent/protocol/RemoteAgentEvent.java:166–168

setPayload

public void setPayload(String payload)

设置负载。

Sets the payload.

参数Parameters
名称Name类型Type说明Description
payloadString负载(类型 `String`)。The payload.
源码Source io/agentscope/harness/agent/subagent/protocol/RemoteAgentEvent.java:170–172
基于官方固定版本源码静态生成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.