AS AgentScopeAPI 手册 / API Reference

WellKnownAgentCardResolver

public class WellKnownAgentCardResolver implements AgentCardResolver
源码Source io/agentscope/core/a2a/agent/card/WellKnownAgentCardResolver.java:37–121

Well Known 智能体卡片解析器,支持智能体之间的发现、委派与协作。位于 io.agentscope.core.a2a.agent.card 包,实现 AgentCardResolver。核心成员包括 getAgentCard、builder。

Agent Card Producer from well known url.

Following Well-Known URI define. And use A2A#getAgentCard(String, String, Map) to get AgentCard.

  • #baseUrl should be schema://domain:port[/rootPath]

  • #relativeCardPath should be the subPath of well-known URI, default /.well-known/agent-card.json

  • #authHeaders should be the authenticate headers to access agents server to get AgentCard

The whole well-known URI should be combined by #baseUrl and #relativeCardPath

嵌套类摘要Nested Class Summary

类Class类型Kind说明Description
Builder类class
构建器,用于构建并配置目标实例。
A class in io.agentscope.core.a2a.agent.card that supports discovery, delegation and collaboration between agents.

方法摘要Method Summary

方法Method说明Description
public AgentCard getAgentCard(String agentName)
获取智能体卡片。
Returns the agent card.
public static Builder builder()
static
创建新的`Builder`实例用于`WellKnownAgentCardResolver`。
Create a new `Builder` instance for `WellKnownAgentCardResolver`.

方法详情Method Detail

getAgentCard

public AgentCard getAgentCard(String agentName)

获取智能体卡片。

Returns the agent card.

参数Parameters
名称Name类型Type说明Description
agentNameString智能体名称(类型 `String`)。The agent name.
返回Returns AgentCard
返回AgentCard。Returns agent card.
源码Source io/agentscope/core/a2a/agent/card/WellKnownAgentCardResolver.java:52–55

builder

public static Builder builder()
static

创建新的Builder实例用于WellKnownAgentCardResolver。

Create a new Builder instance for WellKnownAgentCardResolver.

返回Returns Builder
返回当前实例,以支持链式调用。new builder instance
源码Source io/agentscope/core/a2a/agent/card/WellKnownAgentCardResolver.java:62–64

嵌套类详情Nested Class Detail

Builder

public static class Builder

构建器,用于构建并配置目标实例。位于 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.

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