AS AgentScopeAPI 手册 / API Reference

ControlPlaneConfig

public record ControlPlaneConfig( String controlPlane, String controlPlaneHttp, String internalToken, String registrationCredential, String agentId, String bindingId, long generation, String agentKey, String tenant, String namespace, String instanceKey, boolean enableEvents, String eventJournalDir, int contractHttpPort, String contractHttpHost, String publicBaseUrl, String sessionAffinity, boolean startHttp, boolean startGrpc, boolean startHttpRegister)
源码Source io/agentscope/extensions/controlplane/ControlPlaneConfig.java:54–271

承载控制面配置数据的记录类型。位于 io.agentscope.extensions.controlplane 包。核心成员包括 controlPlane、controlPlaneHttp、internalToken、registrationCredential、agentId、bindingId。

Connection and reporting settings for a SessionBridge.

Standalone BYO (recommended locally): set controlPlaneHttp + internalToken, keep startGrpc=false. The bridge serves /agentscope/* and self-registers via POST /api/v1/agent-registrations.

Optional ASDP gRPC: set controlPlane (host:port) and startGrpc=true.

记录组件摘要Record Component Summary

组件Component类型Type说明Description
controlPlaneString
执行控制面相关操作。
service-controlplane ASDP gRPC endpoint, `host:port` (optional)
controlPlaneHttpString
执行控制面 HTTP相关操作。
service-controlplane REST base URL for HTTP self-register, e.g. ` http://localhost:8081`
internalTokenString
执行内部令牌相关操作。
trusted bootstrap/workload token for first registration
registrationCredentialString
执行注册凭证相关操作。
Agent registration credential for an existing logical identity
agentIdString
执行智能体标识相关操作。
stable Catalog Agent UUID when registration is performed out of band
bindingIdString
执行绑定标识相关操作。
stable external Binding UUID when registration is performed out of band
generationlong
执行 `generation` 方法。
registered AgentInstance generation when registration is performed out of band
agentKeyString
执行智能体键相关操作。
stable logical key registered in the control plane
tenantString
执行租户相关操作。
collaboration tenant
namespaceString
执行命名空间相关操作。
collaboration / Kubernetes namespace
instanceKeyString
执行实例键相关操作。
this replica's stable key; defaults to `HOSTNAME` then the local host name
enableEventsboolean
启用事件。
whether to persist and push the Level-2 event stream (on by default when ASDP gRPC is enabled because it is the canonical conversation history used for reconnect and replay)
eventJournalDirString
执行 `eventJournalDir` 方法。
directory for the durable event outbox; empty uses ` ~/.agentscope/service-controlplane/event-journal`
contractHttpPortint
执行 `contractHttpPort` 方法。
port for the in-process `/agentscope/*` contract server; `0` binds an ephemeral port
contractHttpHostString
执行 `contractHttpHost` 方法。
bind address, empty for all interfaces
publicBaseUrlString
执行 `publicBaseUrl` 方法。
URL the control plane should use to reach the contract server; empty derives `http://localhost:<boundPort>`
sessionAffinityString
执行 `sessionAffinity` 方法。
affinity hint the control plane uses when routing session commands
startHttpboolean
判断是否到启动契约服务端。
whether to start the contract server
startGrpcboolean
判断是否到打开 ASDP 上游渠道。
whether to open the ASDP upstream channel
startHttpRegisterboolean
启动HTTP 注册。
whether to POST /api/v1/agent-registrations

嵌套类摘要Nested Class Summary

类Class类型Kind说明Description
Builder类class
用于`ControlPlaneConfig`的可变构建器。
Mutable builder for `ControlPlaneConfig`.

构造器摘要Constructor Summary

构造器Constructor说明Description
public ControlPlaneConfig(String controlPlane, String controlPlaneHttp, String internalToken, String registrationCredential, String agentId, String bindingId, long generation, String agentKey, String tenant, String namespace, String instanceKey, boolean enableEvents, String eventJournalDir, int contractHttpPort, String contractHttpHost, String publicBaseUrl, String sessionAffinity, boolean startHttp, boolean startGrpc, boolean startHttpRegister)
初始化 `ControlPlaneConfig` 实例。
Creates a new instance.

方法摘要Method Summary

方法Method说明Description
public static Builder builder(String agentKey)
static
返回构建器实例。
Performs the builder operation.

记录组件详情Record Component Detail

controlPlane

String controlPlane

执行控制面相关操作。

service-controlplane ASDP gRPC endpoint, host:port (optional)

源码Source io/agentscope/extensions/controlplane/ControlPlaneConfig.java:54–271

controlPlaneHttp

String controlPlaneHttp

执行控制面 HTTP相关操作。

service-controlplane REST base URL for HTTP self-register, e.g. http://localhost:8081

源码Source io/agentscope/extensions/controlplane/ControlPlaneConfig.java:54–271

internalToken

String internalToken

执行内部令牌相关操作。

trusted bootstrap/workload token for first registration

源码Source io/agentscope/extensions/controlplane/ControlPlaneConfig.java:54–271

registrationCredential

String registrationCredential

执行注册凭证相关操作。

Agent registration credential for an existing logical identity

源码Source io/agentscope/extensions/controlplane/ControlPlaneConfig.java:54–271

agentId

String agentId

执行智能体标识相关操作。

stable Catalog Agent UUID when registration is performed out of band

源码Source io/agentscope/extensions/controlplane/ControlPlaneConfig.java:54–271

bindingId

String bindingId

执行绑定标识相关操作。

stable external Binding UUID when registration is performed out of band

源码Source io/agentscope/extensions/controlplane/ControlPlaneConfig.java:54–271

generation

long generation

执行 generation 方法。

registered AgentInstance generation when registration is performed out of band

源码Source io/agentscope/extensions/controlplane/ControlPlaneConfig.java:54–271

agentKey

String agentKey

执行智能体键相关操作。

stable logical key registered in the control plane

源码Source io/agentscope/extensions/controlplane/ControlPlaneConfig.java:54–271

tenant

String tenant

执行租户相关操作。

collaboration tenant

源码Source io/agentscope/extensions/controlplane/ControlPlaneConfig.java:54–271

namespace

String namespace

执行命名空间相关操作。

collaboration / Kubernetes namespace

源码Source io/agentscope/extensions/controlplane/ControlPlaneConfig.java:54–271

instanceKey

String instanceKey

执行实例键相关操作。

this replica's stable key; defaults to HOSTNAME then the local host name

源码Source io/agentscope/extensions/controlplane/ControlPlaneConfig.java:54–271

enableEvents

boolean enableEvents

启用事件。

whether to persist and push the Level-2 event stream (on by default when ASDP gRPC is enabled because it is the canonical conversation history used for reconnect and replay)

源码Source io/agentscope/extensions/controlplane/ControlPlaneConfig.java:54–271

eventJournalDir

String eventJournalDir

执行 eventJournalDir 方法。

directory for the durable event outbox; empty uses ~/.agentscope/service-controlplane/event-journal

源码Source io/agentscope/extensions/controlplane/ControlPlaneConfig.java:54–271

contractHttpPort

int contractHttpPort

执行 contractHttpPort 方法。

port for the in-process /agentscope/* contract server; 0 binds an ephemeral port

源码Source io/agentscope/extensions/controlplane/ControlPlaneConfig.java:54–271

contractHttpHost

String contractHttpHost

执行 contractHttpHost 方法。

bind address, empty for all interfaces

源码Source io/agentscope/extensions/controlplane/ControlPlaneConfig.java:54–271

publicBaseUrl

String publicBaseUrl

执行 publicBaseUrl 方法。

URL the control plane should use to reach the contract server; empty derives http://localhost:<boundPort>

源码Source io/agentscope/extensions/controlplane/ControlPlaneConfig.java:54–271

sessionAffinity

String sessionAffinity

执行 sessionAffinity 方法。

affinity hint the control plane uses when routing session commands

源码Source io/agentscope/extensions/controlplane/ControlPlaneConfig.java:54–271

startHttp

boolean startHttp

判断是否到启动契约服务端。

whether to start the contract server

源码Source io/agentscope/extensions/controlplane/ControlPlaneConfig.java:54–271

startGrpc

boolean startGrpc

判断是否到打开 ASDP 上游渠道。

whether to open the ASDP upstream channel

源码Source io/agentscope/extensions/controlplane/ControlPlaneConfig.java:54–271

startHttpRegister

boolean startHttpRegister

启动HTTP 注册。

whether to POST /api/v1/agent-registrations

源码Source io/agentscope/extensions/controlplane/ControlPlaneConfig.java:54–271

构造器详情Constructor Detail

ControlPlaneConfig

public ControlPlaneConfig(String controlPlane, String controlPlaneHttp, String internalToken, String registrationCredential, String agentId, String bindingId, long generation, String agentKey, String tenant, String namespace, String instanceKey, boolean enableEvents, String eventJournalDir, int contractHttpPort, String contractHttpHost, String publicBaseUrl, String sessionAffinity, boolean startHttp, boolean startGrpc, boolean startHttpRegister)

初始化 ControlPlaneConfig 实例。

Creates a new instance.

参数Parameters
名称Name类型Type说明Description
controlPlaneString控制面(类型 `String`)。The control plane.
controlPlaneHttpString控制面 HTTP(类型 `String`)。The control plane http.
internalTokenString内部令牌(类型 `String`)。The internal token.
registrationCredentialString注册凭证(类型 `String`)。The registration credential.
agentIdString智能体标识(类型 `String`)。The agent id.
bindingIdString绑定标识(类型 `String`)。The binding id.
generationlonggeneration(类型 `long`)。The generation.
agentKeyString智能体键(类型 `String`)。The agent key.
tenantString租户(类型 `String`)。The tenant.
namespaceString命名空间(类型 `String`)。The namespace.
instanceKeyString实例键(类型 `String`)。The instance key.
enableEventsboolean启用事件(类型 `boolean`)。The enable events.
eventJournalDirString事件 Journal 目录(类型 `String`)。The event journal dir.
contractHttpPortint契约 HTTP Port(类型 `int`)。The contract http port.
contractHttpHostString契约 HTTP Host(类型 `String`)。The contract http host.
publicBaseUrlStringpublic 基类 URL(类型 `String`)。The public base url.
sessionAffinityString会话 Affinity(类型 `String`)。The session affinity.
startHttpboolean启动 HTTP(类型 `boolean`)。The start http.
startGrpcboolean启动 gRPC(类型 `boolean`)。The start grpc.
startHttpRegisterboolean启动 HTTP 注册(类型 `boolean`)。The start http register.
源码Source io/agentscope/extensions/controlplane/ControlPlaneConfig.java:76–109

方法详情Method Detail

builder

public static Builder builder(String agentKey)
static

返回构建器实例。

Performs the builder operation.

参数Parameters
名称Name类型Type说明Description
agentKeyString智能体键(类型 `String`)。The agent key.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/extensions/controlplane/ControlPlaneConfig.java:111–113

嵌套类详情Nested Class Detail

Builder

public static final class Builder

用于ControlPlaneConfig的可变构建器。位于 io.agentscope.extensions.controlplane 包。核心成员包括 controlPlane、controlPlaneHttp、internalToken、registrationCredential、registeredIdentity、tenant。

Mutable builder for ControlPlaneConfig.

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