AS AgentScopeAPI 手册 / API Reference

SessionView

public record SessionView( String sessionKey, String agentId, String sessionId, String label, String kind, String spawnedBy, int spawnDepth, long createdAtMs, long lastActivityMs, String sessionFilePath, String spawnRunId, String gateKey)
源码Source io/agentscope/harness/coding/session/SessionView.java:22–51

承载会话 View数据的记录类型。位于 io.agentscope.harness.coding.session 包。核心成员包括 sessionKey、agentId、sessionId、label、kind、spawnedBy。

Public view of a managed session. Returned by SessionAgentManager#list and SessionAgentManager#viewSession to expose session information without internal mutable state.

记录组件摘要Record Component Summary

组件Component类型Type说明Description
sessionKeyString
执行会话键相关操作。
Performs the session key operation.
agentIdString
执行智能体标识相关操作。
Performs the agent id operation.
sessionIdString
执行会话标识相关操作。
Performs the session id operation.
labelString
执行标签相关操作。
Performs the label operation.
kindString
执行种类相关操作。
Performs the kind operation.
spawnedByString
执行 `spawnedBy` 方法。
Performs the spawned by operation.
spawnDepthint
执行 `spawnDepth` 方法。
Performs the spawn depth operation.
createdAtMslong
执行已创建 At Ms相关操作。
Performs the created at ms operation.
lastActivityMslong
执行 `lastActivityMs` 方法。
Performs the last activity ms operation.
sessionFilePathString
执行会话文件路径相关操作。
Performs the session file path operation.
spawnRunIdString
执行 `spawnRunId` 方法。
Performs the spawn run id operation.
gateKeyString
执行 `gateKey` 方法。
Performs the gate key operation.

方法摘要Method Summary

方法Method说明Description
public static SessionView from(SessionEntry e)
static
创建并返回实例。
Creates and returns an instance.

记录组件详情Record Component Detail

sessionKey

String sessionKey

执行会话键相关操作。

Performs the session key operation.

源码Source io/agentscope/harness/coding/session/SessionView.java:22–51

agentId

String agentId

执行智能体标识相关操作。

Performs the agent id operation.

源码Source io/agentscope/harness/coding/session/SessionView.java:22–51

sessionId

String sessionId

执行会话标识相关操作。

Performs the session id operation.

源码Source io/agentscope/harness/coding/session/SessionView.java:22–51

label

String label

执行标签相关操作。

Performs the label operation.

源码Source io/agentscope/harness/coding/session/SessionView.java:22–51

kind

String kind

执行种类相关操作。

Performs the kind operation.

源码Source io/agentscope/harness/coding/session/SessionView.java:22–51

spawnedBy

String spawnedBy

执行 spawnedBy 方法。

Performs the spawned by operation.

源码Source io/agentscope/harness/coding/session/SessionView.java:22–51

spawnDepth

int spawnDepth

执行 spawnDepth 方法。

Performs the spawn depth operation.

源码Source io/agentscope/harness/coding/session/SessionView.java:22–51

createdAtMs

long createdAtMs

执行已创建 At Ms相关操作。

Performs the created at ms operation.

源码Source io/agentscope/harness/coding/session/SessionView.java:22–51

lastActivityMs

long lastActivityMs

执行 lastActivityMs 方法。

Performs the last activity ms operation.

源码Source io/agentscope/harness/coding/session/SessionView.java:22–51

sessionFilePath

String sessionFilePath

执行会话文件路径相关操作。

Performs the session file path operation.

源码Source io/agentscope/harness/coding/session/SessionView.java:22–51

spawnRunId

String spawnRunId

执行 spawnRunId 方法。

Performs the spawn run id operation.

源码Source io/agentscope/harness/coding/session/SessionView.java:22–51

gateKey

String gateKey

执行 gateKey 方法。

Performs the gate key operation.

源码Source io/agentscope/harness/coding/session/SessionView.java:22–51

方法详情Method Detail

from

public static SessionView from(SessionEntry e)
static

创建并返回实例。

Creates and returns an instance.

参数Parameters
名称Name类型Type说明Description
eSessionEntrye(类型 `SessionEntry`)。The e.
返回Returns SessionView
返回SessionView。Returns session view.
源码Source io/agentscope/harness/coding/session/SessionView.java:36–50
基于官方固定版本源码静态生成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.