AS AgentScopeAPI 手册 / API Reference

BindingConfigEntry

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

绑定配置条目,承载智能体的部署、调度与服务化运行。位于 io.agentscope.builder.runtime.config 包。核心成员包括 getAgentId、setAgentId、getPeer、setPeer、getParentPeer、setParentPeer。

JSON-serializable counterpart of ChannelBinding.

Field order corresponds to the OpenClaw routing priority tiers evaluated by io.agentscope.harness.agent.gateway.channel.ChannelRouter:

  • #peer

  • #parentPeer

  • #guild + #roles

  • #guild alone

  • #team

  • #account

  • #channel

The most specific non-null field determines the tier at which this binding is evaluated. #agentId is required; #sessionScope optionally overrides the channel-level DM scope for sessions created by this binding.

Example JSON

`{
"agentId": "support",
"guild": "ws-alpha",
"roles": ["staff"],
"sessionScope": "PER_PEER"
}
`

方法摘要Method Summary

方法Method说明Description
public String getAgentId()
获取智能体标识。
Returns the agent id.
public void setAgentId(String agentId)
设置智能体标识。
Sets the agent id.
public String getPeer()
获取对端。
Returns the peer.
public void setPeer(String peer)
设置对端。
Sets the peer.
public String getParentPeer()
获取父级对端。
Returns the parent peer.
public void setParentPeer(String parentPeer)
设置父级对端。
Sets the parent peer.
public String getGuild()
获取 `getGuild`。
Returns the guild.
public void setGuild(String guild)
设置 `setGuild`。
Sets the guild.
public List<String> getRoles()
获取 `getRoles`。
Returns the roles.
public void setRoles(List<String> roles)
设置 `setRoles`。
Sets the roles.
public String getTeam()
获取团队。
Returns the team.
public void setTeam(String team)
设置团队。
Sets the team.
public String getAccount()
获取 `getAccount`。
Returns the account.
public void setAccount(String account)
设置 `setAccount`。
Sets the account.
public String getChannel()
获取渠道。
Returns the channel.
public void setChannel(String channel)
设置渠道。
Sets the channel.
public String getSessionScope()
获取会话范围。
Returns the session scope.
public void setSessionScope(String sessionScope)
设置会话范围。
Sets the session scope.
public ChannelBinding toBinding()
转换此条目到运行时`ChannelBinding`。
Converts this entry to a runtime `ChannelBinding`.
public static BindingConfigEntry fromBinding(ChannelBinding b)
static
设置来自绑定。
Inverse helper: build a `BindingConfigEntry` from a runtime `ChannelBinding`.

方法详情Method Detail

getAgentId

public String getAgentId()

获取智能体标识。

Returns the agent id.

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

setAgentId

public void setAgentId(String agentId)

设置智能体标识。

Sets the agent id.

参数Parameters
名称Name类型Type说明Description
agentIdString智能体标识(类型 `String`)。The agent id.
源码Source io/agentscope/builder/runtime/config/BindingConfigEntry.java:102–104

getPeer

public String getPeer()

获取对端。

Returns the peer.

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

setPeer

public void setPeer(String peer)

设置对端。

Sets the peer.

参数Parameters
名称Name类型Type说明Description
peerString对端(类型 `String`)。The peer.
源码Source io/agentscope/builder/runtime/config/BindingConfigEntry.java:110–112

getParentPeer

public String getParentPeer()

获取父级对端。

Returns the parent peer.

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

setParentPeer

public void setParentPeer(String parentPeer)

设置父级对端。

Sets the parent peer.

参数Parameters
名称Name类型Type说明Description
parentPeerString父级对端(类型 `String`)。The parent peer.
源码Source io/agentscope/builder/runtime/config/BindingConfigEntry.java:118–120

getGuild

public String getGuild()

获取 getGuild。

Returns the guild.

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

setGuild

public void setGuild(String guild)

设置 setGuild。

Sets the guild.

参数Parameters
名称Name类型Type说明Description
guildStringguild(类型 `String`)。The guild.
源码Source io/agentscope/builder/runtime/config/BindingConfigEntry.java:126–128

getRoles

public List<String> getRoles()

获取 getRoles。

Returns the roles.

返回Returns List<String>
返回列出。Returns list.
源码Source io/agentscope/builder/runtime/config/BindingConfigEntry.java:130–132

setRoles

public void setRoles(List<String> roles)

设置 setRoles。

Sets the roles.

参数Parameters
名称Name类型Type说明Description
rolesList<String>roles(类型 `List`)。The roles.
源码Source io/agentscope/builder/runtime/config/BindingConfigEntry.java:134–136

getTeam

public String getTeam()

获取团队。

Returns the team.

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

setTeam

public void setTeam(String team)

设置团队。

Sets the team.

参数Parameters
名称Name类型Type说明Description
teamString团队(类型 `String`)。The team.
源码Source io/agentscope/builder/runtime/config/BindingConfigEntry.java:142–144

getAccount

public String getAccount()

获取 getAccount。

Returns the account.

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

setAccount

public void setAccount(String account)

设置 setAccount。

Sets the account.

参数Parameters
名称Name类型Type说明Description
accountStringaccount(类型 `String`)。The account.
源码Source io/agentscope/builder/runtime/config/BindingConfigEntry.java:150–152

getChannel

public String getChannel()

获取渠道。

Returns the channel.

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

setChannel

public void setChannel(String channel)

设置渠道。

Sets the channel.

参数Parameters
名称Name类型Type说明Description
channelString渠道(类型 `String`)。The channel.
源码Source io/agentscope/builder/runtime/config/BindingConfigEntry.java:158–160

getSessionScope

public String getSessionScope()

获取会话范围。

Returns the session scope.

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

setSessionScope

public void setSessionScope(String sessionScope)

设置会话范围。

Sets the session scope.

参数Parameters
名称Name类型Type说明Description
sessionScopeString会话范围(类型 `String`)。The session scope.
源码Source io/agentscope/builder/runtime/config/BindingConfigEntry.java:166–168

toBinding

public ChannelBinding toBinding()

转换此条目到运行时ChannelBinding。

Converts this entry to a runtime ChannelBinding.

返回Returns ChannelBinding
返回ChannelBinding。Returns channel binding.
抛出Throws
  • IllegalArgumentException 可能抛出 `IllegalArgumentException`。if `agentId` is missing or blank
源码Source io/agentscope/builder/runtime/config/BindingConfigEntry.java:179–203

fromBinding

public static BindingConfigEntry fromBinding(ChannelBinding b)
static

设置来自绑定。

Inverse helper: build a BindingConfigEntry from a runtime ChannelBinding.

参数Parameters
名称Name类型Type说明Description
bChannelBindingb(类型 `ChannelBinding`)。The b.
返回Returns BindingConfigEntry
返回BindingConfigEntry。Returns binding config entry.
源码Source io/agentscope/builder/runtime/config/BindingConfigEntry.java:206–222
基于官方固定版本源码静态生成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.