AS AgentScopeAPI 手册 / API Reference

SessionEntry

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

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

Internal metadata for a registered managed session (used by SessionAgentManager).

记录组件摘要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.
kindSessionKind
执行种类相关操作。
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` 方法。
routing key used by the gateway to map this session back to a channel context; only populated for `SessionKind#MAIN` sessions (nullable)
userIdString
执行用户标识相关操作。
optional user identity that owns this session; used by HarnessAgent's NamespaceFactory for per-user filesystem isolation (nullable — null means single-tenant)

构造器摘要Constructor Summary

构造器Constructor说明Description
public SessionEntry(String sessionKey, String agentId, String sessionId, String label, SessionKind kind, String spawnedBy, int spawnDepth, long createdAtMs, long lastActivityMs, String sessionFilePath, String spawnRunId)
初始化 `SessionEntry` 实例。
Backwards-compatible constructor without gateKey or userId.
public SessionEntry(String sessionKey, String agentId, String sessionId, String label, SessionKind kind, String spawnedBy, int spawnDepth, long createdAtMs, long lastActivityMs, String sessionFilePath, String spawnRunId, String gateKey)
初始化 `SessionEntry` 实例。
Backwards-compatible constructor with gateKey but without userId.

记录组件详情Record Component Detail

sessionKey

String sessionKey

执行会话键相关操作。

Performs the session key operation.

源码Source io/agentscope/harness/coding/session/SessionEntry.java:26–99

agentId

String agentId

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

Performs the agent id operation.

源码Source io/agentscope/harness/coding/session/SessionEntry.java:26–99

sessionId

String sessionId

执行会话标识相关操作。

Performs the session id operation.

源码Source io/agentscope/harness/coding/session/SessionEntry.java:26–99

label

String label

执行标签相关操作。

Performs the label operation.

源码Source io/agentscope/harness/coding/session/SessionEntry.java:26–99

kind

SessionKind kind

执行种类相关操作。

Performs the kind operation.

源码Source io/agentscope/harness/coding/session/SessionEntry.java:26–99

spawnedBy

String spawnedBy

执行 spawnedBy 方法。

Performs the spawned by operation.

源码Source io/agentscope/harness/coding/session/SessionEntry.java:26–99

spawnDepth

int spawnDepth

执行 spawnDepth 方法。

Performs the spawn depth operation.

源码Source io/agentscope/harness/coding/session/SessionEntry.java:26–99

createdAtMs

long createdAtMs

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

Performs the created at ms operation.

源码Source io/agentscope/harness/coding/session/SessionEntry.java:26–99

lastActivityMs

long lastActivityMs

执行 lastActivityMs 方法。

Performs the last activity ms operation.

源码Source io/agentscope/harness/coding/session/SessionEntry.java:26–99

sessionFilePath

String sessionFilePath

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

Performs the session file path operation.

源码Source io/agentscope/harness/coding/session/SessionEntry.java:26–99

spawnRunId

String spawnRunId

执行 spawnRunId 方法。

Performs the spawn run id operation.

源码Source io/agentscope/harness/coding/session/SessionEntry.java:26–99

gateKey

String gateKey

执行 gateKey 方法。

routing key used by the gateway to map this session back to a channel context; only populated for SessionKind#MAIN sessions (nullable)

源码Source io/agentscope/harness/coding/session/SessionEntry.java:26–99

userId

String userId

执行用户标识相关操作。

optional user identity that owns this session; used by HarnessAgent's NamespaceFactory for per-user filesystem isolation (nullable — null means single-tenant)

源码Source io/agentscope/harness/coding/session/SessionEntry.java:26–99

构造器详情Constructor Detail

SessionEntry

public SessionEntry(String sessionKey, String agentId, String sessionId, String label, SessionKind kind, String spawnedBy, int spawnDepth, long createdAtMs, long lastActivityMs, String sessionFilePath, String spawnRunId)

初始化 SessionEntry 实例。

Backwards-compatible constructor without gateKey or userId.

参数Parameters
名称Name类型Type说明Description
sessionKeyString会话键(类型 `String`)。The session key.
agentIdString智能体标识(类型 `String`)。The agent id.
sessionIdString会话标识(类型 `String`)。The session id.
labelString标签(类型 `String`)。The label.
kindSessionKind种类(类型 `SessionKind`)。The kind.
spawnedByStringspawned 通过(类型 `String`)。The spawned by.
spawnDepthintspawn Depth(类型 `int`)。The spawn depth.
createdAtMslong已创建 At Ms(类型 `long`)。The created at ms.
lastActivityMslong最后 Activity Ms(类型 `long`)。The last activity ms.
sessionFilePathString会话文件路径(类型 `String`)。The session file path.
spawnRunIdStringspawn 运行标识(类型 `String`)。The spawn run id.
源码Source io/agentscope/harness/coding/session/SessionEntry.java:42–68

SessionEntry

public SessionEntry(String sessionKey, String agentId, String sessionId, String label, SessionKind kind, String spawnedBy, int spawnDepth, long createdAtMs, long lastActivityMs, String sessionFilePath, String spawnRunId, String gateKey)

初始化 SessionEntry 实例。

Backwards-compatible constructor with gateKey but without userId.

参数Parameters
名称Name类型Type说明Description
sessionKeyString会话键(类型 `String`)。The session key.
agentIdString智能体标识(类型 `String`)。The agent id.
sessionIdString会话标识(类型 `String`)。The session id.
labelString标签(类型 `String`)。The label.
kindSessionKind种类(类型 `SessionKind`)。The kind.
spawnedByStringspawned 通过(类型 `String`)。The spawned by.
spawnDepthintspawn Depth(类型 `int`)。The spawn depth.
createdAtMslong已创建 At Ms(类型 `long`)。The created at ms.
lastActivityMslong最后 Activity Ms(类型 `long`)。The last activity ms.
sessionFilePathString会话文件路径(类型 `String`)。The session file path.
spawnRunIdStringspawn 运行标识(类型 `String`)。The spawn run id.
gateKeyStringgate 键(类型 `String`)。The gate key.
源码Source io/agentscope/harness/coding/session/SessionEntry.java:71–98
基于官方固定版本源码静态生成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.