接口 CardResolver

所有已知实现类:
HttpCardResolver

public interface CardResolver
Interface for resolving and discovering AgentCard information in the A2A protocol ecosystem. The CardResolver is a critical component that enables agent discovery and capability resolution within the A2A protocol. It abstracts the process of obtaining AgentCard information, which contains essential metadata about an agent's capabilities, endpoints, and communication requirements. Key responsibilities: - Discover and retrieve AgentCard information from various sources - Parse and validate agent capability metadata - Handle different agent identification schemes (URLs, DIDs, custom identifiers) - Provide caching and optimization for repeated lookups - Support various discovery mechanisms and protocols Discovery mechanisms may include: - HTTP-based discovery via well-known endpoints (/.well-known/agent.json) - Decentralized Identifier (DID) resolution - Registry-based lookups - Direct configuration or injection - DNS-based service discovery The AgentCard contains crucial information such as: - Agent capabilities (streaming, push notifications, etc.) - Supported communication endpoints and protocols - Authentication and security requirements - Available skills and services - Version and compatibility information Implementation considerations: - Error handling for network failures and invalid responses - Caching strategies to minimize repeated network calls - Security validation of retrieved agent information - Support for different agent identifier formats - Graceful degradation when discovery fails Implementations should be thread-safe and handle concurrent resolution requests efficiently, particularly in high-throughput scenarios.
  • 方法概要

    修饰符和类型
    方法
    说明
    Resolves the AgentCard for the configured agent.
  • 方法详细资料

    • resolveCard

      AgentCard resolveCard()
      Resolves the AgentCard for the configured agent. This method retrieves and returns the AgentCard containing the agent's capabilities, endpoints, and metadata. The resolution process depends on the specific implementation and the agent identification mechanism used.
      返回:
      AgentCard containing agent information, or null if resolution fails