AS AgentScopeAPI 手册 / API Reference

Builder

public static class Builder
源码Source io/agentscope/runtime/protocol/a2a/ConfigurableAgentCard.java:151–263

构建器,用于构建并配置目标实例。位于 io.agentscope.runtime.protocol.a2a 包。核心成员包括 name、description、url、provider、version、documentationUrl。

A class in io.agentscope.runtime.protocol.a2a that supports discovery, delegation and collaboration between agents. Declared in io.agentscope.runtime.protocol.a2a.

字段摘要Field Summary

字段Field类型Type说明Description
name
String
名称字段。
The name field.
description
String
`description` 字段。
The description field.
url
String
URL字段。
The url field.
provider
AgentProvider
提供者字段。
The provider field.
version
String
版本字段。
The version field.
documentationUrl
String
`documentationUrl` 字段。
The documentation url field.
defaultInputModes
List<String>
`defaultInputModes` 字段。
The default input modes field.
defaultOutputModes
List<String>
`defaultOutputModes` 字段。
The default output modes field.
skills
List<AgentSkill>
技能字段。
The skills field.
supportsAuthenticatedExtendedCard
boolean
`supportsAuthenticatedExtendedCard` 字段。
The supports authenticated extended card field.
securitySchemes
Map<String, SecurityScheme>
`securitySchemes` 字段。
The security schemes field.
security
List<Map<String, List<String>>>
`security` 字段。
The security field.
iconUrl
String
`iconUrl` 字段。
The icon url field.
additionalInterfaces
List<AgentInterface>
`additionalInterfaces` 字段。
The additional interfaces field.
preferredTransport
String
`preferredTransport` 字段。
The preferred transport field.

方法摘要Method Summary

方法Method说明Description
public Builder name(String name)
设置名称。
Performs the name operation.
public Builder description(String description)
设置该配置项。
Performs the description operation.
public Builder url(String url)
设置URL。
Performs the url operation.
public Builder provider(AgentProvider provider)
设置提供者。
Performs the provider operation.
public Builder version(String version)
设置版本。
Performs the version operation.
public Builder documentationUrl(String documentationUrl)
设置该配置项。
Performs the documentation url operation.
public Builder defaultInputModes(List<String> defaultInputModes)
设置该配置项。
Performs the default input modes operation.
public Builder defaultOutputModes(List<String> defaultOutputModes)
设置该配置项。
Performs the default output modes operation.
public Builder skills(List<AgentSkill> skills)
设置技能。
Performs the skills operation.
public Builder supportsAuthenticatedExtendedCard(boolean supportsAuthenticatedExtendedCard)
设置该配置项。
Performs the supports authenticated extended card operation.
public Builder securitySchemes(Map<String, SecurityScheme> securitySchemes)
设置该配置项。
Performs the security schemes operation.
public Builder security(List<Map<String, List<String>>> security)
设置该配置项。
Performs the security operation.
public Builder iconUrl(String iconUrl)
设置该配置项。
Performs the icon url operation.
public Builder additionalInterfaces(List<AgentInterface> additionalInterfaces)
设置该参数。
Performs the additional interfaces operation.
public Builder preferredTransport(String preferredTransport)
设置该配置项。
Performs the preferred transport operation.
public ConfigurableAgentCard build()
构建并返回最终实例。
Creates and returns an instance.

字段详情Field Detail

name

protected String name

名称字段。声明为 protected String name。

The name field.

源码Source io/agentscope/runtime/protocol/a2a/ConfigurableAgentCard.java:153

description

protected String description

description 字段。声明为 protected String description。

The description field.

源码Source io/agentscope/runtime/protocol/a2a/ConfigurableAgentCard.java:155

url

protected String url

URL字段。声明为 protected String url。

The url field.

源码Source io/agentscope/runtime/protocol/a2a/ConfigurableAgentCard.java:157

provider

protected AgentProvider provider

提供者字段。声明为 protected AgentProvider provider。

The provider field.

源码Source io/agentscope/runtime/protocol/a2a/ConfigurableAgentCard.java:159

version

protected String version

版本字段。声明为 protected String version。

The version field.

源码Source io/agentscope/runtime/protocol/a2a/ConfigurableAgentCard.java:161

documentationUrl

protected String documentationUrl

documentationUrl 字段。声明为 protected String documentationUrl。

The documentation url field.

源码Source io/agentscope/runtime/protocol/a2a/ConfigurableAgentCard.java:163

defaultInputModes

protected List<String> defaultInputModes

defaultInputModes 字段。声明为 protected List defaultInputModes。

The default input modes field.

源码Source io/agentscope/runtime/protocol/a2a/ConfigurableAgentCard.java:165

defaultOutputModes

protected List<String> defaultOutputModes

defaultOutputModes 字段。声明为 protected List defaultOutputModes。

The default output modes field.

源码Source io/agentscope/runtime/protocol/a2a/ConfigurableAgentCard.java:167

skills

protected List<AgentSkill> skills

技能字段。声明为 protected List skills。

The skills field.

源码Source io/agentscope/runtime/protocol/a2a/ConfigurableAgentCard.java:169

supportsAuthenticatedExtendedCard

protected boolean supportsAuthenticatedExtendedCard

supportsAuthenticatedExtendedCard 字段。声明为 protected boolean supportsAuthenticatedExtendedCard。

The supports authenticated extended card field.

源码Source io/agentscope/runtime/protocol/a2a/ConfigurableAgentCard.java:171

securitySchemes

protected Map<String, SecurityScheme> securitySchemes

securitySchemes 字段。声明为 protected Map securitySchemes。

The security schemes field.

源码Source io/agentscope/runtime/protocol/a2a/ConfigurableAgentCard.java:173

security

protected List<Map<String, List<String>>> security

security 字段。声明为 protected List >> security。

The security field.

源码Source io/agentscope/runtime/protocol/a2a/ConfigurableAgentCard.java:175

iconUrl

protected String iconUrl

iconUrl 字段。声明为 protected String iconUrl。

The icon url field.

源码Source io/agentscope/runtime/protocol/a2a/ConfigurableAgentCard.java:177

additionalInterfaces

protected List<AgentInterface> additionalInterfaces

additionalInterfaces 字段。声明为 protected List additionalInterfaces。

The additional interfaces field.

源码Source io/agentscope/runtime/protocol/a2a/ConfigurableAgentCard.java:179

preferredTransport

protected String preferredTransport

preferredTransport 字段。声明为 protected String preferredTransport。

The preferred transport field.

源码Source io/agentscope/runtime/protocol/a2a/ConfigurableAgentCard.java:181

方法详情Method Detail

name

public Builder name(String name)

设置名称。

Performs the name operation.

参数Parameters
名称Name类型Type说明Description
nameString名称(类型 `String`)。The name.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/runtime/protocol/a2a/ConfigurableAgentCard.java:183–186

description

public Builder description(String description)

设置该配置项。

Performs the description operation.

参数Parameters
名称Name类型Type说明Description
descriptionString描述(类型 `String`)。The description.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/runtime/protocol/a2a/ConfigurableAgentCard.java:188–191

url

public Builder url(String url)

设置URL。

Performs the url operation.

参数Parameters
名称Name类型Type说明Description
urlString服务地址(类型 `String`)。The url.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/runtime/protocol/a2a/ConfigurableAgentCard.java:193–196

provider

public Builder provider(AgentProvider provider)

设置提供者。

Performs the provider operation.

参数Parameters
名称Name类型Type说明Description
providerAgentProvider提供者(类型 `AgentProvider`)。The provider.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/runtime/protocol/a2a/ConfigurableAgentCard.java:198–201

version

public Builder version(String version)

设置版本。

Performs the version operation.

参数Parameters
名称Name类型Type说明Description
versionString版本(类型 `String`)。The version.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/runtime/protocol/a2a/ConfigurableAgentCard.java:203–206

documentationUrl

public Builder documentationUrl(String documentationUrl)

设置该配置项。

Performs the documentation url operation.

参数Parameters
名称Name类型Type说明Description
documentationUrlStringdocumentation URL(类型 `String`)。The documentation url.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/runtime/protocol/a2a/ConfigurableAgentCard.java:208–211

defaultInputModes

public Builder defaultInputModes(List<String> defaultInputModes)

设置该配置项。

Performs the default input modes operation.

参数Parameters
名称Name类型Type说明Description
defaultInputModesList<String>默认输入 Modes(类型 `List`)。The default input modes.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/runtime/protocol/a2a/ConfigurableAgentCard.java:213–216

defaultOutputModes

public Builder defaultOutputModes(List<String> defaultOutputModes)

设置该配置项。

Performs the default output modes operation.

参数Parameters
名称Name类型Type说明Description
defaultOutputModesList<String>默认输出 Modes(类型 `List`)。The default output modes.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/runtime/protocol/a2a/ConfigurableAgentCard.java:218–221

skills

public Builder skills(List<AgentSkill> skills)

设置技能。

Performs the skills operation.

参数Parameters
名称Name类型Type说明Description
skillsList<AgentSkill>技能(类型 `List`)。The skills.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/runtime/protocol/a2a/ConfigurableAgentCard.java:223–226

supportsAuthenticatedExtendedCard

public Builder supportsAuthenticatedExtendedCard(boolean supportsAuthenticatedExtendedCard)

设置该配置项。

Performs the supports authenticated extended card operation.

参数Parameters
名称Name类型Type说明Description
supportsAuthenticatedExtendedCardboolean支持 Authenticated Extended 卡片(类型 `boolean`)。The supports authenticated extended card.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/runtime/protocol/a2a/ConfigurableAgentCard.java:228–231

securitySchemes

public Builder securitySchemes(Map<String, SecurityScheme> securitySchemes)

设置该配置项。

Performs the security schemes operation.

参数Parameters
名称Name类型Type说明Description
securitySchemesMap<String, SecurityScheme>security Schemes(类型 `Map`)。The security schemes.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/runtime/protocol/a2a/ConfigurableAgentCard.java:233–236

security

public Builder security(List<Map<String, List<String>>> security)

设置该配置项。

Performs the security operation.

参数Parameters
名称Name类型Type说明Description
securityList<Map<String, List<String>>>security(类型 `List >>`)。The security.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/runtime/protocol/a2a/ConfigurableAgentCard.java:238–241

iconUrl

public Builder iconUrl(String iconUrl)

设置该配置项。

Performs the icon url operation.

参数Parameters
名称Name类型Type说明Description
iconUrlStringicon URL(类型 `String`)。The icon url.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/runtime/protocol/a2a/ConfigurableAgentCard.java:243–246

additionalInterfaces

public Builder additionalInterfaces(List<AgentInterface> additionalInterfaces)

设置该参数。

Performs the additional interfaces operation.

参数Parameters
名称Name类型Type说明Description
additionalInterfacesList<AgentInterface>additional Interfaces(类型 `List`)。The additional interfaces.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/runtime/protocol/a2a/ConfigurableAgentCard.java:248–251

preferredTransport

public Builder preferredTransport(String preferredTransport)

设置该配置项。

Performs the preferred transport operation.

参数Parameters
名称Name类型Type说明Description
preferredTransportStringpreferred 传输层(类型 `String`)。The preferred transport.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/runtime/protocol/a2a/ConfigurableAgentCard.java:253–256

build

public ConfigurableAgentCard build()

构建并返回最终实例。

Creates and returns an instance.

返回Returns ConfigurableAgentCard
返回ConfigurableAgentCard。Returns configurable agent card.
源码Source io/agentscope/runtime/protocol/a2a/ConfigurableAgentCard.java:258–262
基于官方固定版本源码静态生成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.