AgentRuntimeSource
public interface AgentRuntimeSource
io/agentscope/extensions/controlplane/adapter/AgentRuntimeSource.java:29–65定义智能体运行时来源契约的接口。位于 io.agentscope.extensions.controlplane.adapter 包。核心成员包括 listSubagents、listWorkspaces、listSubagentTasks、cancelSubagentTask、enrichAgentConfig、readPlanExcerpt。
Optional harness-/app-specific hooks kept out of agentscope-extensions-controlplane so the
extension stays free of an agentscope-harness dependency. Wire from the host app (e.g.
paw) after the AgentScopeAdapter bean is created.
方法摘要Method Summary
方法详情Method Detail
listSubagents
default public List<Inventory.SubagentInfo> listSubagents(Agent agent)
列出 listSubagents。
Lists the subagents.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
agent | Agent | 智能体(类型 `Agent`)。The agent. |
List<Inventory.SubagentInfo>io/agentscope/extensions/controlplane/adapter/AgentRuntimeSource.java:31–33listWorkspaces
default public List<Inventory.WorkspaceInfo> listWorkspaces(Agent agent)
列出 listWorkspaces。
Lists the workspaces.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
agent | Agent | 智能体(类型 `Agent`)。The agent. |
List<Inventory.WorkspaceInfo>io/agentscope/extensions/controlplane/adapter/AgentRuntimeSource.java:35–37listSubagentTasks
default public List<Map<String, Object>> listSubagentTasks(Agent agent, String sessionId, String userId)
列出子智能体任务。
Lists the subagent tasks.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
agent | Agent | 智能体(类型 `Agent`)。The agent. |
sessionId | String | 会话标识(类型 `String`)。The session id. |
userId | String | 用户标识(类型 `String`)。The user id. |
List<Map<String, Object>>io/agentscope/extensions/controlplane/adapter/AgentRuntimeSource.java:39–42cancelSubagentTask
default public boolean cancelSubagentTask(Agent agent, String sessionId, String userId, String taskId)
执行取消子智能体任务相关操作。
Performs the cancel subagent task operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
agent | Agent | 智能体(类型 `Agent`)。The agent. |
sessionId | String | 会话标识(类型 `String`)。The session id. |
userId | String | 用户标识(类型 `String`)。The user id. |
taskId | String | 任务标识(类型 `String`)。The task id. |
booleanio/agentscope/extensions/controlplane/adapter/AgentRuntimeSource.java:44–47enrichAgentConfig
default public void enrichAgentConfig(Agent agent, Map<String, Object> agentConfig)
执行 enrichAgentConfig 方法。
Enrich the Definition snapshot (GET /agentscope/info → agentConfig).
| 名称Name | 类型Type | 说明Description |
|---|---|---|
agent | Agent | 智能体(类型 `Agent`)。The agent. |
agentConfig | Map<String, Object> | 智能体配置(类型 `Map`)。The agent config. |
io/agentscope/extensions/controlplane/adapter/AgentRuntimeSource.java:50readPlanExcerpt
default public Optional<String> readPlanExcerpt(Agent agent, String sessionId, String userId, String planFile)
执行 readPlanExcerpt 方法。
Optional plan-file excerpt for Context frameworkState.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
agent | Agent | 智能体(类型 `Agent`)。The agent. |
sessionId | String | 会话标识(类型 `String`)。The session id. |
userId | String | 用户标识(类型 `String`)。The user id. |
planFile | String | 计划文件(类型 `String`)。The plan file. |
Optional<String>io/agentscope/extensions/controlplane/adapter/AgentRuntimeSource.java:53–56setPlanMode
default public boolean setPlanMode(Agent agent, String sessionId, String userId, boolean active)
设置计划模式。
Enter/exit plan mode for a session.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
agent | Agent | 智能体(类型 `Agent`)。The agent. |
sessionId | String | 会话标识(类型 `String`)。The session id. |
userId | String | 用户标识(类型 `String`)。The user id. |
active | boolean | active(类型 `boolean`)。The active. |
booleanio/agentscope/extensions/controlplane/adapter/AgentRuntimeSource.java:62–64