AS AgentScopeAPI 手册 / API Reference

Builder

public static class Builder
源码Source io/agentscope/core/a2a/agent/card/WellKnownAgentCardResolver.java:66–120

构建器,用于构建并配置目标实例。位于 io.agentscope.core.a2a.agent.card 包。核心成员包括 baseUrl、relativeCardPath、authHeaders、build。

A class in io.agentscope.core.a2a.agent.card that supports discovery, delegation and collaboration between agents. Declared in io.agentscope.core.a2a.agent.card.

方法摘要Method Summary

方法Method说明Description
public Builder baseUrl(String baseUrl)
设置基类 URL 用于智能体卡片解析器。
Set the base URL for the agent card resolver.
public Builder relativeCardPath(String relativeCardPath)
设置该配置项。
Set the relative card path for the agent card resolver.
public Builder authHeaders(Map<String, String> authHeaders)
设置认证请求头。
Set the authentication headers for the agent card resolver.
public WellKnownAgentCardResolver build()
构建WellKnownAgentCardResolver 实例。
Build the WellKnownAgentCardResolver instance.

方法详情Method Detail

baseUrl

public Builder baseUrl(String baseUrl)

设置基类 URL 用于智能体卡片解析器。

Set the base URL for the agent card resolver.

参数Parameters
名称Name类型Type说明Description
baseUrlString基类 URL 到设置。the base URL to set
返回Returns Builder
返回当前实例,以支持链式调用。the current Builder instance for method chaining
源码Source io/agentscope/core/a2a/agent/card/WellKnownAgentCardResolver.java:85–88

relativeCardPath

public Builder relativeCardPath(String relativeCardPath)

设置该配置项。

Set the relative card path for the agent card resolver.

参数Parameters
名称Name类型Type说明Description
relativeCardPathStringrelative 卡片路径(类型 `String`)。the relative card path to set
返回Returns Builder
返回当前实例,以支持链式调用。the current Builder instance for method chaining
源码Source io/agentscope/core/a2a/agent/card/WellKnownAgentCardResolver.java:96–99

authHeaders

public Builder authHeaders(Map<String, String> authHeaders)

设置认证请求头。

Set the authentication headers for the agent card resolver.

参数Parameters
名称Name类型Type说明Description
authHeadersMap<String, String>认证请求头(类型 `Map`)。the authentication headers to set
返回Returns Builder
返回当前实例,以支持链式调用。the current Builder instance for method chaining
源码Source io/agentscope/core/a2a/agent/card/WellKnownAgentCardResolver.java:107–110

build

public WellKnownAgentCardResolver build()

构建WellKnownAgentCardResolver 实例。

Build the WellKnownAgentCardResolver instance.

返回Returns WellKnownAgentCardResolver
内置 WellKnownAgentCardResolver 实例。the built WellKnownAgentCardResolver instance
源码Source io/agentscope/core/a2a/agent/card/WellKnownAgentCardResolver.java:117–119
基于官方固定版本源码静态生成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.