AS AgentScopeAPI 手册 / API Reference

EventSource

@Deprecated(since = "2.0.0") @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_NULL) public final class EventSource
源码Source io/agentscope/core/agent/EventSource.java:110–273

事件来源,驱动智能体的推理、工具调用与会话执行。位于 io.agentscope.core.agent 包。核心成员包括 builder、withAppendedPath、getAgentKey、getAgentId、getAgentName、getSessionId。

@deprecated since 2.0.0. Declared in io.agentscope.core.agent.

嵌套类摘要Nested Class Summary

类Class类型Kind说明Description
Builder类class
`EventSource`的构建器。
Builder for `EventSource`.

方法摘要Method Summary

方法Method说明Description
public static Builder builder()
static
返回构建器实例。
Returns the builder.
public EventSource withAppendedPath(String segment)
执行 `withAppendedPath` 方法。
Returns a new `EventSource` with `path` extended by `segment`, and `depth` incremented by one.
public String getAgentKey()
获取智能体键。
Returns the agent key.
public String getAgentId()
获取智能体标识。
Returns the agent id.
public String getAgentName()
获取智能体名称。
Returns the agent name.
public String getSessionId()
获取会话标识。
Returns the session id.
public String getParentSessionId()
获取父级会话标识。
Returns the parent session id.
public String getTaskId()
获取任务标识。
Returns the task id.
public int getDepth()
获取 `getDepth`。
Returns the depth.
public String getPath()
获取路径。
Returns the path.
public String toString()
返回 `toString` 结果。
Returns the to string.

方法详情Method Detail

builder

public static Builder builder()
static

返回构建器实例。

Returns the builder.

返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/core/agent/EventSource.java:156–158

withAppendedPath

public EventSource withAppendedPath(String segment)

执行 withAppendedPath 方法。

Returns a new EventSource with path extended by segment, and depth incremented by one.

参数Parameters
名称Name类型Type说明Description
segmentStringsegment(类型 `String`)。The segment.
返回Returns EventSource
返回EventSource。Returns event source.
源码Source io/agentscope/core/agent/EventSource.java:164–176

getAgentKey

public String getAgentKey()

获取智能体键。

Returns the agent key.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/core/agent/EventSource.java:178–180

getAgentId

public String getAgentId()

获取智能体标识。

Returns the agent id.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/core/agent/EventSource.java:182–184

getAgentName

public String getAgentName()

获取智能体名称。

Returns the agent name.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/core/agent/EventSource.java:186–188

getSessionId

public String getSessionId()

获取会话标识。

Returns the session id.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/core/agent/EventSource.java:190–192

getParentSessionId

public String getParentSessionId()

获取父级会话标识。

Returns the parent session id.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/core/agent/EventSource.java:194–196

getTaskId

public String getTaskId()

获取任务标识。

Returns the task id.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/core/agent/EventSource.java:198–200

getDepth

public int getDepth()

获取 getDepth。

Returns the depth.

返回Returns int
返回数值结果。Returns a numeric result.
源码Source io/agentscope/core/agent/EventSource.java:202–204

getPath

public String getPath()

获取路径。

Returns the path.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/core/agent/EventSource.java:206–208

toString

public String toString()

返回 toString 结果。

Returns the to string.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/core/agent/EventSource.java:210–213

嵌套类详情Nested Class Detail

Builder

public static final class Builder

EventSource的构建器。位于 io.agentscope.core.agent 包。核心成员包括 agentKey、agentId、agentName、sessionId、parentSessionId、taskId。

Builder for EventSource.

基于官方固定版本源码静态生成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.