AS AgentScopeAPI 手册 / API Reference

AgentDefinition

@JsonInclude(JsonInclude.Include.NON_NULL) public record AgentDefinition( String id, String name, String description, String system, String model, Integer maxIters, List<AgentToolset> tools, List<McpServerSpec> mcpServers, List<SkillRef> skills, MultiagentSpec multiagent, String identityName, String identityEmoji, List<String> groupChatMentionPatterns, Boolean groupChatRequireMention, String scope, String ownerId, long createdAt, long updatedAt, List<AgentShareGrant> shares, String runAs, String forkOf, String workspacePath, String sandboxMode, String sandboxScope, Integer version, Long archivedAt, Map<String, Object> metadata, String tierForCurrentUser)
源码Source io/agentscope/builder/web/catalog/AgentDefinition.java:33–102

承载智能体定义数据的记录类型。位于 io.agentscope.builder.web.catalog 包。核心成员包括 id、name、description、system、model、maxIters。

API representation of an agent definition visible to the current user.

Definition fields (system, tools, mcpServers, skills) are the versioned Agent body — see docs/API_REFACTOR.md.

记录组件摘要Record Component Summary

组件Component类型Type说明Description
idString
执行标识相关操作。
Performs the id operation.
nameString
执行名称相关操作。
Performs the name operation.
descriptionString
执行 `description` 方法。
Performs the description operation.
systemString
执行系统相关操作。
Performs the system operation.
modelString
执行模型相关操作。
Performs the model operation.
maxItersInteger
执行最大迭代次数相关操作。
Performs the max iters operation.
toolsList<AgentToolset>
执行工具相关操作。
Performs the tools operation.
mcpServersList<McpServerSpec>
执行 `mcpServers` 方法。
Performs the mcp servers operation.
skillsList<SkillRef>
执行技能相关操作。
Performs the skills operation.
multiagentMultiagentSpec
执行多智能体相关操作。
Performs the multiagent operation.
identityNameString
执行身份名称相关操作。
Performs the identity name operation.
identityEmojiString
执行 `identityEmoji` 方法。
Performs the identity emoji operation.
groupChatMentionPatternsList<String>
执行 `groupChatMentionPatterns` 方法。
Performs the group chat mention patterns operation.
groupChatRequireMentionBoolean
执行 `groupChatRequireMention` 方法。
Performs the group chat require mention operation.
scopeString
执行范围相关操作。
Performs the scope operation.
ownerIdString
执行所有者标识相关操作。
Performs the owner id operation.
createdAtlong
执行已创建 At相关操作。
Performs the created at operation.
updatedAtlong
执行已更新 At相关操作。
Performs the updated at operation.
sharesList<AgentShareGrant>
执行 `shares` 方法。
Performs the shares operation.
runAsString
运行As。
Runs the as.
forkOfString
执行 `forkOf` 方法。
Performs the fork of operation.
workspacePathString
执行工作区路径相关操作。
Performs the workspace path operation.
sandboxModeString
执行沙箱模式相关操作。
Performs the sandbox mode operation.
sandboxScopeString
执行沙箱范围相关操作。
Performs the sandbox scope operation.
versionInteger
执行版本相关操作。
Performs the version operation.
archivedAtLong
执行 `archivedAt` 方法。
Performs the archived at operation.
metadataMap<String, Object>
执行元数据相关操作。
Performs the metadata operation.
tierForCurrentUserString
执行 `tierForCurrentUser` 方法。
Performs the tier for current user operation.

字段摘要Field Summary

字段Field类型Type说明Description
SCOPE_GLOBAL
staticfinal
String
范围 GLOBAL字段。
The SCOPE GLOBAL field.
SCOPE_USER
staticfinal
String
范围用户字段。
The SCOPE USER field.
RUN_AS_INVOKER
staticfinal
String
运行 AS INVOKER字段。
The RUN AS INVOKER field.
RUN_AS_OWNER
staticfinal
String
运行 AS 所有者字段。
The RUN AS OWNER field.

方法摘要Method Summary

方法Method说明Description
public AgentDefinition withTierForCurrentUser(String tier)
执行 `withTierForCurrentUser` 方法。
Returns a copy with `tierForCurrentUser` replaced.

记录组件详情Record Component Detail

id

String id

执行标识相关操作。

Performs the id operation.

源码Source io/agentscope/builder/web/catalog/AgentDefinition.java:33–102

name

String name

执行名称相关操作。

Performs the name operation.

源码Source io/agentscope/builder/web/catalog/AgentDefinition.java:33–102

description

String description

执行 description 方法。

Performs the description operation.

源码Source io/agentscope/builder/web/catalog/AgentDefinition.java:33–102

system

String system

执行系统相关操作。

Performs the system operation.

源码Source io/agentscope/builder/web/catalog/AgentDefinition.java:33–102

model

String model

执行模型相关操作。

Performs the model operation.

源码Source io/agentscope/builder/web/catalog/AgentDefinition.java:33–102

maxIters

Integer maxIters

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

Performs the max iters operation.

源码Source io/agentscope/builder/web/catalog/AgentDefinition.java:33–102

tools

List<AgentToolset> tools

执行工具相关操作。

Performs the tools operation.

源码Source io/agentscope/builder/web/catalog/AgentDefinition.java:33–102

mcpServers

List<McpServerSpec> mcpServers

执行 mcpServers 方法。

Performs the mcp servers operation.

源码Source io/agentscope/builder/web/catalog/AgentDefinition.java:33–102

skills

List<SkillRef> skills

执行技能相关操作。

Performs the skills operation.

源码Source io/agentscope/builder/web/catalog/AgentDefinition.java:33–102

multiagent

MultiagentSpec multiagent

执行多智能体相关操作。

Performs the multiagent operation.

源码Source io/agentscope/builder/web/catalog/AgentDefinition.java:33–102

identityName

String identityName

执行身份名称相关操作。

Performs the identity name operation.

源码Source io/agentscope/builder/web/catalog/AgentDefinition.java:33–102

identityEmoji

String identityEmoji

执行 identityEmoji 方法。

Performs the identity emoji operation.

源码Source io/agentscope/builder/web/catalog/AgentDefinition.java:33–102

groupChatMentionPatterns

List<String> groupChatMentionPatterns

执行 groupChatMentionPatterns 方法。

Performs the group chat mention patterns operation.

源码Source io/agentscope/builder/web/catalog/AgentDefinition.java:33–102

groupChatRequireMention

Boolean groupChatRequireMention

执行 groupChatRequireMention 方法。

Performs the group chat require mention operation.

源码Source io/agentscope/builder/web/catalog/AgentDefinition.java:33–102

scope

String scope

执行范围相关操作。

Performs the scope operation.

源码Source io/agentscope/builder/web/catalog/AgentDefinition.java:33–102

ownerId

String ownerId

执行所有者标识相关操作。

Performs the owner id operation.

源码Source io/agentscope/builder/web/catalog/AgentDefinition.java:33–102

createdAt

long createdAt

执行已创建 At相关操作。

Performs the created at operation.

源码Source io/agentscope/builder/web/catalog/AgentDefinition.java:33–102

updatedAt

long updatedAt

执行已更新 At相关操作。

Performs the updated at operation.

源码Source io/agentscope/builder/web/catalog/AgentDefinition.java:33–102

shares

List<AgentShareGrant> shares

执行 shares 方法。

Performs the shares operation.

源码Source io/agentscope/builder/web/catalog/AgentDefinition.java:33–102

runAs

String runAs

运行As。

Runs the as.

源码Source io/agentscope/builder/web/catalog/AgentDefinition.java:33–102

forkOf

String forkOf

执行 forkOf 方法。

Performs the fork of operation.

源码Source io/agentscope/builder/web/catalog/AgentDefinition.java:33–102

workspacePath

String workspacePath

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

Performs the workspace path operation.

源码Source io/agentscope/builder/web/catalog/AgentDefinition.java:33–102

sandboxMode

String sandboxMode

执行沙箱模式相关操作。

Performs the sandbox mode operation.

源码Source io/agentscope/builder/web/catalog/AgentDefinition.java:33–102

sandboxScope

String sandboxScope

执行沙箱范围相关操作。

Performs the sandbox scope operation.

源码Source io/agentscope/builder/web/catalog/AgentDefinition.java:33–102

version

Integer version

执行版本相关操作。

Performs the version operation.

源码Source io/agentscope/builder/web/catalog/AgentDefinition.java:33–102

archivedAt

Long archivedAt

执行 archivedAt 方法。

Performs the archived at operation.

源码Source io/agentscope/builder/web/catalog/AgentDefinition.java:33–102

metadata

Map<String, Object> metadata

执行元数据相关操作。

Performs the metadata operation.

源码Source io/agentscope/builder/web/catalog/AgentDefinition.java:33–102

tierForCurrentUser

String tierForCurrentUser

执行 tierForCurrentUser 方法。

Performs the tier for current user operation.

源码Source io/agentscope/builder/web/catalog/AgentDefinition.java:33–102

字段详情Field Detail

SCOPE_GLOBAL

public static final String SCOPE_GLOBAL
staticfinal

范围 GLOBAL字段。声明为 public static final String SCOPE_GLOBAL。

The SCOPE GLOBAL field.

源码Source io/agentscope/builder/web/catalog/AgentDefinition.java:64

SCOPE_USER

public static final String SCOPE_USER
staticfinal

范围用户字段。声明为 public static final String SCOPE_USER。

The SCOPE USER field.

源码Source io/agentscope/builder/web/catalog/AgentDefinition.java:65

RUN_AS_INVOKER

public static final String RUN_AS_INVOKER
staticfinal

运行 AS INVOKER字段。声明为 public static final String RUN_AS_INVOKER。

The RUN AS INVOKER field.

源码Source io/agentscope/builder/web/catalog/AgentDefinition.java:67

RUN_AS_OWNER

public static final String RUN_AS_OWNER
staticfinal

运行 AS 所有者字段。声明为 public static final String RUN_AS_OWNER。

The RUN AS OWNER field.

源码Source io/agentscope/builder/web/catalog/AgentDefinition.java:68

方法详情Method Detail

withTierForCurrentUser

public AgentDefinition withTierForCurrentUser(String tier)

执行 withTierForCurrentUser 方法。

Returns a copy with tierForCurrentUser replaced.

参数Parameters
名称Name类型Type说明Description
tierStringtier(类型 `String`)。The tier.
返回Returns AgentDefinition
返回智能体定义。Returns agent definition.
源码Source io/agentscope/builder/web/catalog/AgentDefinition.java:71–101
基于官方固定版本源码静态生成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.