Repository navigation
Description
Summary
Generate and serve an A2A-compliant Agent Card (`/.well-known/agent-card.json`) for each Trinity agent by reading `template.yaml` skills and `CLAUDE.md`. External A2A orchestrators (AWS Bedrock, Azure Copilot, Google ADK) can discover and call Trinity agents without knowing Trinity's internal API. No agent-server changes required — the backend generates and proxies the card.
Context
An Agent Card is the A2A protocol's discovery primitive: a JSON document at `/.well-known/agent-card.json` that describes an agent's capabilities, skills, and auth requirements. Trinity's `template.yaml` already contains the raw material (name, description, skills, credential requirements). Serving a card from that data makes Trinity agents first-class citizens in the A2A ecosystem with zero agent-code changes. See `docs/research/a2a-protocol.md` § 2.2 and § 13.2 Option A/B.
Acceptance Criteria
- New backend endpoint `GET /api/agents/{name}/a2a/agent-card` returns a valid A2A v1.0 Agent Card JSON
- Card fields populated from: `template.yaml` (name, description, version, skills array) + agent ownership (capabilities)
- Backend proxies `GET /.well-known/agent-card.json` for requests with `X-Trinity-Agent: {name}` header (or via subdomain / path convention TBD)
- `skills[]` in card populated from `template.yaml` skills list; each skill includes `id`, `name`, `description`, `tags`, `examples` where available
- `securitySchemes` declares `bearerAuth` (Trinity MCP API key); public card omits sensitive details
- Extended card (requires auth) adds internal endpoint URLs and full skill schemas
- `capabilities.streaming: true` set for all agents (agent-server supports SSE)
- Card cached in Redis with 5-min TTL, invalidated on agent update/restart
- New MCP tool `get_agent_card(agent_name)` returns the card JSON for introspection
- Integration test: fetch card, validate against A2A v1.0 schema
Technical Notes
- A2A Agent Card schema: `docs/research/a2a-protocol.md` § 2.2
- `template.yaml` skills array → A2A `skills[]`: `id`, `name`, `description`, `tags`, `examples`
- Auth declaration: `securitySchemes.bearerAuth = {type: "http", scheme: "bearer"}`; `security: [{bearerAuth: []}]`
- The card's `url` field should point to the A2A JSON-RPC endpoint (to be added in a follow-on issue)
- Related files: `src/backend/routers/agents.py`, `src/backend/services/template_service.py`, `src/mcp-server/src/tools/agents.ts`
Activity
docs(a2a): fix spec URL + add architecture/requirements entries (#737)
feat: A2A v1.0 Agent Card endpoint per agent (#737 Phase 1) (#842)
docs(user-docs): sync to platform state since 2026-04-23
vybe commentedon Jun 1, 2026
Shipped in v0.6.0 (released via #998).
Release: v0.7.0 (#1319)
33 remaining items
docs(a2a): requirements + feature flow for the inbound server, correc…
docs(a2a): use the canonical ✅ Implemented status label; route the in…
feat(mcp): A2A control tools — exposure, card, allow-list, endpoints (#…
test(a2a): update #737 card-service tests for the ent#157 honest card
feat(a2a): A2A config UI — exposure toggle, card URL, skills, allow-l…
docs(a2a): user guide for the A2A feature — expose, consume, GUI scre…
docs(a2a): requirements + feature flow for the inbound server, correc…
docs(a2a): use the canonical ✅ Implemented status label; route the in…
feat(mcp): A2A control tools — exposure, card, allow-list, endpoints (#…
test(a2a): update #737 card-service tests for the ent#157 honest card
feat(a2a): A2A config UI — exposure toggle, card URL, skills, allow-l…
docs(a2a): user guide for the A2A feature — expose, consume, GUI scre…
docs(a2a): requirements + feature flow for the inbound server, correc…
docs(a2a): use the canonical ✅ Implemented status label; route the in…
feat(a2a): A2A interoperability — inbound server (well-known + JSON-R…