AS AgentScopeAPI 手册 / API Reference

AgentscopeConfig

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

用于${cwd}/.agentscope/agentscope.json的根文档。位于 io.agentscope.builder.runtime.config 包。核心成员包括 getSchema、setSchema、getMain、setMain、getAgents、setAgents。

Root document for ${cwd}/.agentscope/agentscope.json.

Shape is intentionally similar to OpenClaw's top-level config: a main entry id, an agents map keyed by agent id, and an optional channels map keyed by channel id.

方法摘要Method Summary

方法Method说明Description
public String getSchema()
获取模式。
Returns the schema.
public void setSchema(String schema)
设置模式。
Sets the schema.
public String getMain()
获取主。
Returns the main.
public void setMain(String main)
设置主。
Sets the main.
public Map<String, AgentConfigEntry> getAgents()
获取智能体。
Returns the agents.
public void setAgents(Map<String, AgentConfigEntry> agents)
设置智能体。
Sets the agents.
public Map<String, ChannelConfigEntry> getChannels()
获取渠道。
Returns the channels.
public void setChannels(Map<String, ChannelConfigEntry> channels)
设置渠道。
Sets the channels.
public SessionLifecycleConfig getSession()
获取会话。
Returns the session.
public void setSession(SessionLifecycleConfig session)
设置会话。
Sets the session.

方法详情Method Detail

getSchema

public String getSchema()

获取模式。

Returns the schema.

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

setSchema

public void setSchema(String schema)

设置模式。

Sets the schema.

参数Parameters
名称Name类型Type说明Description
schemaString模式定义(类型 `String`)。The schema.
源码Source io/agentscope/builder/runtime/config/AgentscopeConfig.java:70–72

getMain

public String getMain()

获取主。

Returns the main.

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

setMain

public void setMain(String main)

设置主。

Sets the main.

参数Parameters
名称Name类型Type说明Description
mainString主(类型 `String`)。The main.
源码Source io/agentscope/builder/runtime/config/AgentscopeConfig.java:78–80

getAgents

public Map<String, AgentConfigEntry> getAgents()

获取智能体。

Returns the agents.

返回Returns Map<String, AgentConfigEntry>
返回映射。Returns map.
源码Source io/agentscope/builder/runtime/config/AgentscopeConfig.java:82–84

setAgents

public void setAgents(Map<String, AgentConfigEntry> agents)

设置智能体。

Sets the agents.

参数Parameters
名称Name类型Type说明Description
agentsMap<String, AgentConfigEntry>智能体(类型 `Map`)。The agents.
源码Source io/agentscope/builder/runtime/config/AgentscopeConfig.java:86–88

getChannels

public Map<String, ChannelConfigEntry> getChannels()

获取渠道。

Returns the channels.

返回Returns Map<String, ChannelConfigEntry>
返回映射。Returns map.
源码Source io/agentscope/builder/runtime/config/AgentscopeConfig.java:90–92

setChannels

public void setChannels(Map<String, ChannelConfigEntry> channels)

设置渠道。

Sets the channels.

参数Parameters
名称Name类型Type说明Description
channelsMap<String, ChannelConfigEntry>渠道(类型 `Map`)。The channels.
源码Source io/agentscope/builder/runtime/config/AgentscopeConfig.java:94–96

getSession

public SessionLifecycleConfig getSession()

获取会话。

Returns the session.

返回Returns SessionLifecycleConfig
返回SessionLifecycleConfig。Returns session lifecycle config.
源码Source io/agentscope/builder/runtime/config/AgentscopeConfig.java:98–100

setSession

public void setSession(SessionLifecycleConfig session)

设置会话。

Sets the session.

参数Parameters
名称Name类型Type说明Description
sessionSessionLifecycleConfig会话(类型 `SessionLifecycleConfig`)。The session.
源码Source io/agentscope/builder/runtime/config/AgentscopeConfig.java:102–104
基于官方固定版本源码静态生成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.