AS AgentScopeAPI 手册 / API Reference

StoreBackedSubagentRegistry

public final class StoreBackedSubagentRegistry implements SubagentRegistry
源码Source io/agentscope/harness/agent/gateway/StoreBackedSubagentRegistry.java:42–131

存储 Backed 子智能体注册表,承载智能体的部署、调度与服务化运行。位于 io.agentscope.harness.agent.gateway 包,实现 SubagentRegistry。核心成员包括 register、find、revoke、revokeByParentSession、StoreBackedSubagentRegistry。

Distributed SubagentRegistry backed by a BaseStore. Because the store is supplied by a io.agentscope.harness.agent.DistributedStore (Redis / OSS / MySQL), exposure records become visible to every node, so any replica can resolve a subagentId and re-materialize the subagent.

Records are stored under the namespace ["subagents", "exposed"] keyed by subagentId. TTL is enforced lazily on #find: an elapsed record is deleted and reported as absent.

This registry deliberately stores only routing/identity metadata. Concurrency safety for the subagent's mutable conversation state is the responsibility of the distributed io.agentscope.core.state.AgentStateStore (and BaseStore#putIfVersion where explicit optimistic guarding is desired), not of this registry.

构造器摘要Constructor Summary

构造器Constructor说明Description
public StoreBackedSubagentRegistry(BaseStore store)
初始化 `StoreBackedSubagentRegistry` 实例。
Creates a new instance.

方法摘要Method Summary

方法Method说明Description
public void register(SubagentRecord record)
设置注册。
Performs the register operation.
public Optional<SubagentRecord> find(String subagentId)
设置查找。
Performs the find operation.
public void revoke(String subagentId)
设置该参数。
Performs the revoke operation.
public void revokeByParentSession(String parentSessionId)
设置该参数。
Performs the revoke by parent session operation.

构造器详情Constructor Detail

StoreBackedSubagentRegistry

public StoreBackedSubagentRegistry(BaseStore store)

初始化 StoreBackedSubagentRegistry 实例。

Creates a new instance.

参数Parameters
名称Name类型Type说明Description
storeBaseStore存储实例(类型 `BaseStore`)。The store.
源码Source io/agentscope/harness/agent/gateway/StoreBackedSubagentRegistry.java:51–53

方法详情Method Detail

register

public void register(SubagentRecord record)

设置注册。

Performs the register operation.

参数Parameters
名称Name类型Type说明Description
recordSubagentRecord记录(类型 `SubagentRecord`)。The record.
源码Source io/agentscope/harness/agent/gateway/StoreBackedSubagentRegistry.java:55–68

find

public Optional<SubagentRecord> find(String subagentId)

设置查找。

Performs the find operation.

参数Parameters
名称Name类型Type说明Description
subagentIdString子智能体标识(类型 `String`)。The subagent id.
返回Returns Optional<SubagentRecord>
返回可选。Returns optional.
源码Source io/agentscope/harness/agent/gateway/StoreBackedSubagentRegistry.java:70–94

revoke

public void revoke(String subagentId)

设置该参数。

Performs the revoke operation.

参数Parameters
名称Name类型Type说明Description
subagentIdString子智能体标识(类型 `String`)。The subagent id.
源码Source io/agentscope/harness/agent/gateway/StoreBackedSubagentRegistry.java:96–106

revokeByParentSession

public void revokeByParentSession(String parentSessionId)

设置该参数。

Performs the revoke by parent session operation.

参数Parameters
名称Name类型Type说明Description
parentSessionIdString父级会话标识(类型 `String`)。The parent session id.
源码Source io/agentscope/harness/agent/gateway/StoreBackedSubagentRegistry.java:108–130
基于官方固定版本源码静态生成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.