---
title: "Discover Agent Card"
method: POST
path: "/v1/a2a/discover"
tags: ["a2a_registration"]
---

# Discover Agent Card

`POST /v1/a2a/discover`

Fetch the upstream agent's well-known card so the UI can show the admin
which skills/capabilities the agent exposes.

Only proxy admins can call this — the UI uses it during agent registration,
and we don't want arbitrary keys probing internal URLs.

Example:
```bash
curl -X POST "http://localhost:4000/v1/a2a/discover" \
    -H "Authorization: Bearer <admin_key>" \
    -H "Content-Type: application/json" \
    -d '{"url": "https://upstream-agent.example.com"}'
```

## Request body

- DiscoverAgentRequest
  - `discovery_mode` 'well_known_fallback' | 'langgraph_platform' — How to locate the upstream agent card. String-valued so it serializes cleanly over JSON / Pydantic.
  - `params` object, nullable — Mode-specific parameters. ``langgraph_platform`` requires ``{'assistant_id': <id>}``. ``well_known_fallback`` ignores this.
  - `url` string, required — Base URL of the upstream agent. Behavior depends on ``discovery_mode``: ``well_known_fallback`` (default) tries /.well-known/agent-card.json, /.well-known/agent.json, /agent.json under this URL in order; ``langgraph_platform`` hits ``/.well-known/agent-card.json?assistant_id=<id>`` instead.

## Response `200`

Successful Response

- DiscoverAgentResponse
  - `agent_card` object, required
  - `url` string, required

## Other responses

- `422` — Validation Error

## Changes

- **2026-09-18** `082b5fabd909` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/flock/apis/litellm-api/changes/v1/a2a/discover/post.md)

---

[API](https://skmtc.dev/flock/apis/litellm-api.md) · [All operations](https://skmtc.dev/flock/apis/litellm-api/llms.txt) · [OpenAPI document](https://skmtc.dev/flock/apis/litellm-api/revisions/3b2b241e4b0b?raw)
