AS AgentScopeAPI 手册 / API Reference

AgentConfigEntry

@JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonIgnoreProperties(ignoreUnknown = true) public class AgentConfigEntry
源码Source io/agentscope/builder/runtime/config/AgentConfigEntry.java:42–368

智能体配置条目,承载智能体的部署、调度与服务化运行。位于 io.agentscope.builder.runtime.config 包。核心成员包括 getName、setName、getDescription、setDescription、getSysPrompt、setSysPrompt。

Per-agent section in agentscope.json under agents.<agentId>.

After the agent is built, HarnessAgent automatically loads additional workspace-scoped configuration (for example subagents/*.md) from the resolved #workspace directory.

Fields mirror OpenClaw's agent definition schema:

  • #model — override model id (e.g. "anthropic/claude-opus-4-7")

  • #tools — allow/deny lists for built-in tools

  • #identity — display name and emoji override

  • #groupChat — mention gating for group/room channels

  • #skills — skill allowlist/denylist

嵌套类摘要Nested Class Summary

类Class类型Kind说明Description
ToolsConfig类class
工具配置,保存相关配置项。
A class in io.agentscope.builder.runtime.config that deploys, schedules and serves agents.
IdentityConfig类class
身份配置,保存相关配置项。
A class in io.agentscope.builder.runtime.config that deploys, schedules and serves agents.
GroupChatConfig类class
组聊天配置,保存相关配置项。
A class in io.agentscope.builder.runtime.config that deploys, schedules and serves agents.
SkillsConfig类class
技能配置,保存相关配置项。
A class in io.agentscope.builder.runtime.config that deploys, schedules and serves agents.

方法摘要Method Summary

方法Method说明Description
public String getName()
获取名称。
Returns the name.
public void setName(String name)
设置名称。
Sets the name.
public String getDescription()
获取 `getDescription`。
Returns the description.
public void setDescription(String description)
设置 `setDescription`。
Sets the description.
public String getSysPrompt()
获取 `getSysPrompt`。
Returns the sys prompt.
public void setSysPrompt(String sysPrompt)
设置 `setSysPrompt`。
Sets the sys prompt.
public String getWorkspace()
获取工作区。
Returns the workspace.
public void setWorkspace(String workspace)
设置工作区。
Sets the workspace.
public Integer getMaxIters()
获取最大迭代次数。
Returns the max iters.
public void setMaxIters(Integer maxIters)
设置最大迭代次数。
Sets the max iters.
public String getEnvironmentMemory()
获取环境记忆。
Returns the environment memory.
public void setEnvironmentMemory(String environmentMemory)
设置环境记忆。
Sets the environment memory.
public SkillRepositoryConfigEntry getSkillRepository()
deprecated
获取技能仓库。
Returns the skill repository.
public void setSkillRepository(SkillRepositoryConfigEntry skillRepository)
deprecated
设置技能仓库。
Sets the skill repository.
public List<SkillRepositoryConfigEntry> getSkillRepositories()
获取 `getSkillRepositories`。
Returns the skill repositories.
public void setSkillRepositories(List<SkillRepositoryConfigEntry> skillRepositories)
设置 `setSkillRepositories`。
Sets the skill repositories.
public List<SkillRepositoryConfigEntry> effectiveSkillRepositories()
返回 `effectiveSkillRepositories` 结果。
Returns the effective ordered list of skill repository entries, folding the legacy `#skillRepository` value (if any) into the head so older configs continue to load unchanged.
public String getModel()
获取模型。
Returns the model.
public void setModel(String model)
设置模型。
Sets the model.
public ToolsConfig getTools()
获取工具。
Returns the tools.
public void setTools(ToolsConfig tools)
设置工具。
Sets the tools.
public IdentityConfig getIdentity()
获取身份。
Returns the identity.
public void setIdentity(IdentityConfig identity)
设置身份。
Sets the identity.
public GroupChatConfig getGroupChat()
获取组聊天。
Returns the group chat.
public void setGroupChat(GroupChatConfig groupChat)
设置组聊天。
Sets the group chat.
public SkillsConfig getSkills()
获取技能。
Returns the skills.
public void setSkills(SkillsConfig skills)
设置技能。
Sets the skills.

方法详情Method Detail

getName

public String getName()

获取名称。

Returns the name.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/builder/runtime/config/AgentConfigEntry.java:119–121

setName

public void setName(String name)

设置名称。

Sets the name.

参数Parameters
名称Name类型Type说明Description
nameString名称(类型 `String`)。The name.
源码Source io/agentscope/builder/runtime/config/AgentConfigEntry.java:123–125

getDescription

public String getDescription()

获取 getDescription。

Returns the description.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/builder/runtime/config/AgentConfigEntry.java:127–129

setDescription

public void setDescription(String description)

设置 setDescription。

Sets the description.

参数Parameters
名称Name类型Type说明Description
descriptionString描述(类型 `String`)。The description.
源码Source io/agentscope/builder/runtime/config/AgentConfigEntry.java:131–133

getSysPrompt

public String getSysPrompt()

获取 getSysPrompt。

Returns the sys prompt.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/builder/runtime/config/AgentConfigEntry.java:135–137

setSysPrompt

public void setSysPrompt(String sysPrompt)

设置 setSysPrompt。

Sets the sys prompt.

参数Parameters
名称Name类型Type说明Description
sysPromptStringsys 提示词(类型 `String`)。The sys prompt.
源码Source io/agentscope/builder/runtime/config/AgentConfigEntry.java:139–141

getWorkspace

public String getWorkspace()

获取工作区。

Returns the workspace.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/builder/runtime/config/AgentConfigEntry.java:143–145

setWorkspace

public void setWorkspace(String workspace)

设置工作区。

Sets the workspace.

参数Parameters
名称Name类型Type说明Description
workspaceString工作区(类型 `String`)。The workspace.
源码Source io/agentscope/builder/runtime/config/AgentConfigEntry.java:147–149

getMaxIters

public Integer getMaxIters()

获取最大迭代次数。

Returns the max iters.

返回Returns Integer
返回数值结果。Returns a numeric result.
源码Source io/agentscope/builder/runtime/config/AgentConfigEntry.java:151–153

setMaxIters

public void setMaxIters(Integer maxIters)

设置最大迭代次数。

Sets the max iters.

参数Parameters
名称Name类型Type说明Description
maxItersInteger最大迭代次数(类型 `Integer`)。The max iters.
源码Source io/agentscope/builder/runtime/config/AgentConfigEntry.java:155–157

getEnvironmentMemory

public String getEnvironmentMemory()

获取环境记忆。

Returns the environment memory.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/builder/runtime/config/AgentConfigEntry.java:159–161

setEnvironmentMemory

public void setEnvironmentMemory(String environmentMemory)

设置环境记忆。

Sets the environment memory.

参数Parameters
名称Name类型Type说明Description
environmentMemoryString环境记忆(类型 `String`)。The environment memory.
源码Source io/agentscope/builder/runtime/config/AgentConfigEntry.java:163–165

getSkillRepository

public SkillRepositoryConfigEntry getSkillRepository()
deprecated

获取技能仓库。

Returns the skill repository.

返回Returns SkillRepositoryConfigEntry
返回SkillRepositoryConfigEntry。Returns skill repository config entry.
源码Source io/agentscope/builder/runtime/config/AgentConfigEntry.java:167–170

setSkillRepository

public void setSkillRepository(SkillRepositoryConfigEntry skillRepository)
deprecated

设置技能仓库。

Sets the skill repository.

参数Parameters
名称Name类型Type说明Description
skillRepositorySkillRepositoryConfigEntry技能仓库(类型 `SkillRepositoryConfigEntry`)。The skill repository.
源码Source io/agentscope/builder/runtime/config/AgentConfigEntry.java:172–175

getSkillRepositories

public List<SkillRepositoryConfigEntry> getSkillRepositories()

获取 getSkillRepositories。

Returns the skill repositories.

返回Returns List<SkillRepositoryConfigEntry>
返回列出。Returns list.
源码Source io/agentscope/builder/runtime/config/AgentConfigEntry.java:177–179

setSkillRepositories

public void setSkillRepositories(List<SkillRepositoryConfigEntry> skillRepositories)

设置 setSkillRepositories。

Sets the skill repositories.

参数Parameters
名称Name类型Type说明Description
skillRepositoriesList<SkillRepositoryConfigEntry>技能 Repositories(类型 `List`)。The skill repositories.
源码Source io/agentscope/builder/runtime/config/AgentConfigEntry.java:181–183

effectiveSkillRepositories

public List<SkillRepositoryConfigEntry> effectiveSkillRepositories()

返回 effectiveSkillRepositories 结果。

Returns the effective ordered list of skill repository entries, folding the legacy #skillRepository value (if any) into the head so older configs continue to load unchanged.

返回Returns List<SkillRepositoryConfigEntry>
返回列出。Returns list.
源码Source io/agentscope/builder/runtime/config/AgentConfigEntry.java:190–201

getModel

public String getModel()

获取模型。

Returns the model.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/builder/runtime/config/AgentConfigEntry.java:203–205

setModel

public void setModel(String model)

设置模型。

Sets the model.

参数Parameters
名称Name类型Type说明Description
modelString模型实例(类型 `String`)。The model.
源码Source io/agentscope/builder/runtime/config/AgentConfigEntry.java:207–209

getTools

public ToolsConfig getTools()

获取工具。

Returns the tools.

返回Returns ToolsConfig
返回ToolsConfig。Returns tools config.
源码Source io/agentscope/builder/runtime/config/AgentConfigEntry.java:211–213

setTools

public void setTools(ToolsConfig tools)

设置工具。

Sets the tools.

参数Parameters
名称Name类型Type说明Description
toolsToolsConfig工具列表(类型 `ToolsConfig`)。The tools.
源码Source io/agentscope/builder/runtime/config/AgentConfigEntry.java:215–217

getIdentity

public IdentityConfig getIdentity()

获取身份。

Returns the identity.

返回Returns IdentityConfig
返回IdentityConfig。Returns identity config.
源码Source io/agentscope/builder/runtime/config/AgentConfigEntry.java:219–221

setIdentity

public void setIdentity(IdentityConfig identity)

设置身份。

Sets the identity.

参数Parameters
名称Name类型Type说明Description
identityIdentityConfig身份(类型 `IdentityConfig`)。The identity.
源码Source io/agentscope/builder/runtime/config/AgentConfigEntry.java:223–225

getGroupChat

public GroupChatConfig getGroupChat()

获取组聊天。

Returns the group chat.

返回Returns GroupChatConfig
返回GroupChatConfig。Returns group chat config.
源码Source io/agentscope/builder/runtime/config/AgentConfigEntry.java:227–229

setGroupChat

public void setGroupChat(GroupChatConfig groupChat)

设置组聊天。

Sets the group chat.

参数Parameters
名称Name类型Type说明Description
groupChatGroupChatConfig组聊天(类型 `GroupChatConfig`)。The group chat.
源码Source io/agentscope/builder/runtime/config/AgentConfigEntry.java:231–233

getSkills

public SkillsConfig getSkills()

获取技能。

Returns the skills.

返回Returns SkillsConfig
返回SkillsConfig。Returns skills config.
源码Source io/agentscope/builder/runtime/config/AgentConfigEntry.java:235–237

setSkills

public void setSkills(SkillsConfig skills)

设置技能。

Sets the skills.

参数Parameters
名称Name类型Type说明Description
skillsSkillsConfig技能(类型 `SkillsConfig`)。The skills.
源码Source io/agentscope/builder/runtime/config/AgentConfigEntry.java:239–241

嵌套类详情Nested Class Detail

ToolsConfig

@JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonIgnoreProperties(ignoreUnknown = true) public static class ToolsConfig

工具配置,保存相关配置项。位于 io.agentscope.builder.runtime.config 包。核心成员包括 getAllow、setAllow、getDeny、setDeny。

A class in io.agentscope.builder.runtime.config that deploys, schedules and serves agents. Declared in io.agentscope.builder.runtime.config.

IdentityConfig

@JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonIgnoreProperties(ignoreUnknown = true) public static class IdentityConfig

身份配置,保存相关配置项。位于 io.agentscope.builder.runtime.config 包。核心成员包括 getName、setName、getEmoji、setEmoji。

A class in io.agentscope.builder.runtime.config that deploys, schedules and serves agents. Declared in io.agentscope.builder.runtime.config.

GroupChatConfig

@JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonIgnoreProperties(ignoreUnknown = true) public static class GroupChatConfig

组聊天配置,保存相关配置项。位于 io.agentscope.builder.runtime.config 包。核心成员包括 getMentionPatterns、setMentionPatterns、getRequireMention、setRequireMention。

A class in io.agentscope.builder.runtime.config that deploys, schedules and serves agents. Declared in io.agentscope.builder.runtime.config.

SkillsConfig

@JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonIgnoreProperties(ignoreUnknown = true) public static class SkillsConfig

技能配置,保存相关配置项。位于 io.agentscope.builder.runtime.config 包。核心成员包括 getAllow、setAllow、getDeny、setDeny。

A class in io.agentscope.builder.runtime.config that deploys, schedules and serves agents. Declared in io.agentscope.builder.runtime.config.

基于官方固定版本源码静态生成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.