AS AgentScopeAPI 手册 / API Reference

Builder

public static class Builder
源码Source io/agentscope/runtime/protocol/a2a/A2aProtocolConfig.java:58–87

构建器,用于构建并配置目标实例。位于 io.agentscope.runtime.protocol.a2a 包。核心成员包括 agentCard、agentCompletionTimeoutSeconds、consumptionCompletionTimeoutSeconds、build。

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
agentCard
ConfigurableAgentCard
智能体卡片字段。
The agent card field.
agentCompletionTimeoutSeconds
int
智能体补全超时秒字段。
The agent completion timeout seconds field.
consumptionCompletionTimeoutSeconds
int
`consumptionCompletionTimeoutSeconds` 字段。
The consumption completion timeout seconds field.

方法摘要Method Summary

方法Method说明Description
public Builder agentCard(ConfigurableAgentCard agentCard)
设置智能体卡片。
Performs the agent card operation.
public Builder agentCompletionTimeoutSeconds(int agentCompletionTimeoutSeconds)
设置智能体补全超时秒。
Performs the agent completion timeout seconds operation.
public Builder consumptionCompletionTimeoutSeconds(int consumptionCompletionTimeoutSeconds)
设置该配置项。
Performs the consumption completion timeout seconds operation.
public A2aProtocolConfig build()
构建并返回最终实例。
Creates and returns an instance.

字段详情Field Detail

agentCard

protected ConfigurableAgentCard agentCard

智能体卡片字段。声明为 protected ConfigurableAgentCard agentCard。

The agent card field.

源码Source io/agentscope/runtime/protocol/a2a/A2aProtocolConfig.java:60

agentCompletionTimeoutSeconds

protected int agentCompletionTimeoutSeconds

智能体补全超时秒字段。声明为 protected int agentCompletionTimeoutSeconds。

The agent completion timeout seconds field.

源码Source io/agentscope/runtime/protocol/a2a/A2aProtocolConfig.java:62

consumptionCompletionTimeoutSeconds

protected int consumptionCompletionTimeoutSeconds

consumptionCompletionTimeoutSeconds 字段。声明为 protected int consumptionCompletionTimeoutSeconds。

The consumption completion timeout seconds field.

源码Source io/agentscope/runtime/protocol/a2a/A2aProtocolConfig.java:64

方法详情Method Detail

agentCard

public Builder agentCard(ConfigurableAgentCard agentCard)

设置智能体卡片。

Performs the agent card operation.

参数Parameters
名称Name类型Type说明Description
agentCardConfigurableAgentCard智能体卡片(类型 `ConfigurableAgentCard`)。The agent card.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/runtime/protocol/a2a/A2aProtocolConfig.java:66–69

agentCompletionTimeoutSeconds

public Builder agentCompletionTimeoutSeconds(int agentCompletionTimeoutSeconds)

设置智能体补全超时秒。

Performs the agent completion timeout seconds operation.

参数Parameters
名称Name类型Type说明Description
agentCompletionTimeoutSecondsint智能体补全超时秒(类型 `int`)。The agent completion timeout seconds.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/runtime/protocol/a2a/A2aProtocolConfig.java:71–74

consumptionCompletionTimeoutSeconds

public Builder consumptionCompletionTimeoutSeconds(int consumptionCompletionTimeoutSeconds)

设置该配置项。

Performs the consumption completion timeout seconds operation.

参数Parameters
名称Name类型Type说明Description
consumptionCompletionTimeoutSecondsintconsumption 补全超时秒(类型 `int`)。The consumption completion timeout seconds.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/runtime/protocol/a2a/A2aProtocolConfig.java:76–79

build

public A2aProtocolConfig build()

构建并返回最终实例。

Creates and returns an instance.

返回Returns A2aProtocolConfig
返回A2aProtocolConfig。Returns a 2 a protocol config.
源码Source io/agentscope/runtime/protocol/a2a/A2aProtocolConfig.java:81–86
基于官方固定版本源码静态生成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.