AS AgentScopeAPI 手册 / API Reference

SubagentDescriptor

public record SubagentDescriptor( String name, String description, String source, String workspaceMode, String workspacePath, String model, int maxIters, List<String> toolAllowlist)
源码Source io/agentscope/spring/boot/admin/subagent/SubagentDescriptor.java:38–81

承载子智能体描述符数据的记录类型。位于 io.agentscope.spring.boot.admin.subagent 包。核心成员包括 name、description、source、workspaceMode、workspacePath、model。

Wire view of a registered subagent — flattens whichever projection (a SubagentEntry from a built agent, or a SubagentDeclaration loaded from a yaml/markdown spec) the inventory adapter happens to hold.

记录组件摘要Record Component Summary

组件Component类型Type说明Description
nameString
执行名称相关操作。
unique subagent name / agent-id
descriptionString
执行 `description` 方法。
used by the orchestrator agent to decide when to delegate
sourceString
执行来源相关操作。
where this entry came from: `spring-bean` / `declaration`
workspaceModeString
执行工作区模式相关操作。
`WorkspaceMode#ISOLATED` or `WorkspaceMode#SHARED`; may be null
workspacePathString
执行工作区路径相关操作。
optional path to the on-disk subagent definition
modelString
执行模型相关操作。
optional override model id
maxItersint
执行最大迭代次数相关操作。
per-call iteration cap, 0 if unspecified
toolAllowlistList<String>
执行 `toolAllowlist` 方法。
when non-empty, only inherited parent tools whose names are listed are visible to the subagent

方法摘要Method Summary

方法Method说明Description
public static SubagentDescriptor of(SubagentEntry e)
static
创建并返回实例。
Creates and returns an instance.
public static SubagentDescriptor of(SubagentDeclaration d)
static
创建并返回实例。
Creates and returns an instance.

记录组件详情Record Component Detail

name

String name

执行名称相关操作。

unique subagent name / agent-id

源码Source io/agentscope/spring/boot/admin/subagent/SubagentDescriptor.java:38–81

description

String description

执行 description 方法。

used by the orchestrator agent to decide when to delegate

源码Source io/agentscope/spring/boot/admin/subagent/SubagentDescriptor.java:38–81

source

String source

执行来源相关操作。

where this entry came from: spring-bean / declaration

源码Source io/agentscope/spring/boot/admin/subagent/SubagentDescriptor.java:38–81

workspaceMode

String workspaceMode

执行工作区模式相关操作。

WorkspaceMode#ISOLATED or WorkspaceMode#SHARED; may be null

源码Source io/agentscope/spring/boot/admin/subagent/SubagentDescriptor.java:38–81

workspacePath

String workspacePath

执行工作区路径相关操作。

optional path to the on-disk subagent definition

源码Source io/agentscope/spring/boot/admin/subagent/SubagentDescriptor.java:38–81

model

String model

执行模型相关操作。

optional override model id

源码Source io/agentscope/spring/boot/admin/subagent/SubagentDescriptor.java:38–81

maxIters

int maxIters

执行最大迭代次数相关操作。

per-call iteration cap, 0 if unspecified

源码Source io/agentscope/spring/boot/admin/subagent/SubagentDescriptor.java:38–81

toolAllowlist

List<String> toolAllowlist

执行 toolAllowlist 方法。

when non-empty, only inherited parent tools whose names are listed are visible to the subagent

源码Source io/agentscope/spring/boot/admin/subagent/SubagentDescriptor.java:38–81

方法详情Method Detail

of

public static SubagentDescriptor of(SubagentEntry e)
static

创建并返回实例。

Creates and returns an instance.

参数Parameters
名称Name类型Type说明Description
eSubagentEntrye(类型 `SubagentEntry`)。The e.
返回Returns SubagentDescriptor
返回SubagentDescriptor。Returns subagent descriptor.
源码Source io/agentscope/spring/boot/admin/subagent/SubagentDescriptor.java:48–51

of

public static SubagentDescriptor of(SubagentDeclaration d)
static

创建并返回实例。

Creates and returns an instance.

参数Parameters
名称Name类型Type说明Description
dSubagentDeclarationd(类型 `SubagentDeclaration`)。The d.
返回Returns SubagentDescriptor
返回SubagentDescriptor。Returns subagent descriptor.
源码Source io/agentscope/spring/boot/admin/subagent/SubagentDescriptor.java:53–64
基于官方固定版本源码静态生成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.