WorkspaceMode
public enum WorkspaceMode
io/agentscope/harness/agent/subagent/WorkspaceMode.java:42–70定义工作区模式相关取值的枚举。位于 io.agentscope.harness.agent.subagent 包。核心成员包括 ISOLATED、SHARED。
Controls how a declared subagent's runtime workspace root is determined.
The five-row decision table:
workspacePath mode runtime-workspace-root
─────────────────────────────────────────────────────────────────────────────
set ISOLATED workspacePath (definition dir is also the runtime root)
set SHARED mainWorkspace (definition skills/knowledge ignored)
null ISOLATED mainWorkspace/agents/<name>/workspace/ (auto-created)
null SHARED mainWorkspace
(general-purpose, always SHARED) mainWorkspace (fully mirrors main agent)
Phase B-0 — persisted session bucketing: ISOLATED-mode subagents bucket their
persisted state by parent (userId,
parentSessionId) when the spawn-time io.agentscope.core.agent.RuntimeContext
carries those fields. The composed key has form
{declarationName}[@{parentSessionId}][#{userId}] and is applied uniformly across
io.agentscope.core.state.AgentStateStore stores (Workspace, Redis, InMemory, custom),
because all of them already partition state by (userId, sessionId). SHARED-mode is unchanged
— those subagents intentionally use the parent's bucket and do not multi-tenant.
枚举常量摘要Enum Constant Summary
| 常量Constant | 说明Description |
|---|---|
ISOLATED | 判断是否OLATED。 The subagent gets its own isolated workspace. |
SHARED | 执行共享相关操作。 The subagent shares the main agent's workspace. |
枚举常量详情Enum Constant Detail
ISOLATED
ISOLATED
判断是否OLATED。
The subagent gets its own isolated workspace.
io/agentscope/harness/agent/subagent/WorkspaceMode.java:55