Skip to main content

resolve_agent_card

Function resolve_agent_card 

Source
pub async fn resolve_agent_card(
    base_url: &str,
) -> Result<AgentCard, ClientError>
Expand description

Fetches the AgentCard from the standard well-known path.

Appends /.well-known/agent-card.json to base_url and performs an HTTP GET with no headers and a 30-second budget; resolve_agent_card_with_options takes both.

Every call fetches: this and the other free functions here are one-shot and keep nothing between calls, so they have no cache to honour the card’s Cache-Control with. A caller that fetches the same card again should hold a CachingCardResolver, which reuses the card while the server says it is fresh and revalidates it after (spec §8.6.2).

§Errors