ADK.A2A.AgentCard (ADK v0.0.1-alpha.1)

Copy Markdown View Source

Generates an A2A Agent Card from an ADK agent.

The Agent Card is served at /.well-known/agent.json and describes the agent's capabilities, skills, and endpoint URL.

This module bridges ADK agents to the A2A.AgentCard protocol type from the a2a package.

Summary

Functions

Generate an A2A Agent Card map from an ADK agent.

Build an A2A.AgentCard struct from an ADK agent.

Functions

from_agent(agent, opts \\ [])

@spec from_agent(
  ADK.Agent.t(),
  keyword()
) :: map()

Generate an A2A Agent Card map from an ADK agent.

Options

  • :url — the agent's A2A endpoint URL (required)
  • :version — agent version (default "1.0.0")
  • :provider — provider info map
  • :capabilities — optional capabilities overrides

Examples

iex> agent = ADK.Agent.LlmAgent.new(name: "helper", model: "test", instruction: "Help", description: "A helpful agent", tools: [])
iex> card = ADK.A2A.AgentCard.from_agent(agent, url: "http://localhost:4000/a2a")
iex> card["name"]
"helper"

to_a2a_card(agent, opts \\ [])

@spec to_a2a_card(
  ADK.Agent.t(),
  keyword()
) :: A2A.AgentCard.t()

Build an A2A.AgentCard struct from an ADK agent.