AS AgentScopeAPI 手册 / API Reference

SessionConstants

public final class SessionConstants
源码Source io/agentscope/harness/coding/session/SessionConstants.java:19–36

会话 Constants,在多次调用之间保存和恢复会话与记忆数据。位于 io.agentscope.harness.coding.session 包。核心成员包括 resolveRequesterKey、MAX_SPAWN_DEPTH、ROOT_REQUESTER_SESSION_KEY。

Shared constants for managed session / subagent flows.

字段摘要Field Summary

字段Field类型Type说明Description
MAX_SPAWN_DEPTH
staticfinal
int
最大 SPAWN DEPTH字段。
Maximum allowed spawn depth to prevent runaway recursion (main=0, sub=1, sub-sub=2…).
ROOT_REQUESTER_SESSION_KEY
staticfinal
String
根 REQUESTER 会话键字段。
Synthetic requester key when the tool owner is the top-level harness (no parent session).

方法摘要Method Summary

方法Method说明Description
public static String resolveRequesterKey(String parentSessionKey)
static
解析 `resolveRequesterKey`。
Resolves the requester key: explicit parent or `#ROOT_REQUESTER_SESSION_KEY`.

字段详情Field Detail

MAX_SPAWN_DEPTH

public static final int MAX_SPAWN_DEPTH
staticfinal

最大 SPAWN DEPTH字段。声明为 public static final int MAX_SPAWN_DEPTH。

Maximum allowed spawn depth to prevent runaway recursion (main=0, sub=1, sub-sub=2…).

源码Source io/agentscope/harness/coding/session/SessionConstants.java:22

ROOT_REQUESTER_SESSION_KEY

public static final String ROOT_REQUESTER_SESSION_KEY
staticfinal

根 REQUESTER 会话键字段。声明为 public static final String ROOT_REQUESTER_SESSION_KEY。

Synthetic requester key when the tool owner is the top-level harness (no parent session).

源码Source io/agentscope/harness/coding/session/SessionConstants.java:25

方法详情Method Detail

resolveRequesterKey

public static String resolveRequesterKey(String parentSessionKey)
static

解析 resolveRequesterKey。

Resolves the requester key: explicit parent or #ROOT_REQUESTER_SESSION_KEY.

参数Parameters
名称Name类型Type说明Description
parentSessionKeyString父级会话键(类型 `String`)。The parent session key.
返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/harness/coding/session/SessionConstants.java:30–35
基于官方固定版本源码静态生成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.