본문으로 건너뛰기
Skillpedia
API 및 서버 (백엔드)7.6k · #13128

a2a-protocol

하는 일

이 스킬은 Agent-Native 앱들이 A2A 프로토콜을 통해 서로를 등록하고 인증하는 방법을 설명합니다. 한 앱을 다른 앱에 연결하는 방법과, 로그인하지 못하는 원격 에이전트를 디버깅하는 방법을 다룹니다. 앱들을 서로 연결하는 개발자를 위한 스킬입니다.

사용하는 경우

  • ✓한 Agent-Native 앱이 다른 앱의 에이전트를 호출하기를 원할 때.
  • ✓원격 에이전트의 인증이 실패해서 이유를 찾아야 할 때.
  • ✓한 앱의 스킬을 동급 앱에 공개하고 싶을 때.

스킬 링크

https://github.com/BuilderIO/agent-native/blob/main/.agents/skills/a2a-protocol/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/BuilderIO/agent-native/blob/main/.agents/skills/a2a-protocol/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“보고서 앱이 데이터 앱에 수치를 요청할 수 있도록 두 앱을 연결해 주실 수 있나요?”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

이 스킬은 두 단계를 설명합니다. 다른 앱을 원격 에이전트로 등록하고, 서명된 토큰을 확인할 수 있도록 비밀 값을 공유합니다. 호출이 작동하려면 두 단계가 모두 되어 있어야 합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

A2A Protocol (Agent-to-Agent)

Rule

Agents call other agents over A2A, a JSON-RPC protocol for discovery and delegation. Use it only when the user explicitly asks to involve a peer, or the requested outcome requires data, credentials, or a capability owned by that peer and unavailable through the local app's actions. The local app's actions are the default; a peer's availability or ability to enrich a result is not enough. When a peer supplies input, keep authoring and editing artifacts native to the local app here.

When a handoff qualifies under the rule above, preserve the peer boundary: do not have app A generate and execute raw SQL against app B's database, or expose B's internal tools directly to A as a substitute for delegation. The receiving agent has context, skills, and guardrails the caller doesn't. If a justified A2A call is unreliable, fix the delegation path (timeouts, retries, or typed terminal states) instead of bypassing it app by app.

Connecting app A to an Agent-Native app B is two independent things, and both must be true:

  1. B is registered on A as a remote-agents/<id>.json resource.
  2. A and B share a secret, so A's signed JWT verifies on B.

Neither is a code change, and neither is symmetric. Registering B on A does not let B call A. A hosted peer uses provider-specific endpoint and credential metadata in place of the shared Agent-Native secret, but it still does not make the provider's model or SDK an A2A endpoint.

A2A is already mounted

createAgentChatPlugin calls mountA2A for every app, so a generated app already serves:

  • GET /.well-known/agent-card.json — public discovery, with a larger authenticated capability view for verified sibling callers
  • POST /_agent-native/a2a — JSON-RPC, authenticated

Do not add a mountA2A server plugin to enable A2A; it is on. Hand-mounting is only for a bespoke card or a custom handler (see Custom mount below).

The client falls back to POST /a2a for external peers that only expose that path. New agent-native apps should call /_agent-native/a2a.

Registering a remote agent

A remote agent is a row in the resources table, not a file on disk. Path remote-agents/<id>.json, owner SHARED_OWNER, content:

{
  "id": "analytics",
  "name": "Analytics",
  "description": "Queries analytics data across providers",
  "url": "https://analytics.example.com",
  "color": "#6B7280",
  "cardUrl": "https://analytics.example.com/.well-known/agent-card.json",
  "auth": {
    "type": "bearer",
    "credentialRef": "ANALYTICS_A2A_TOKEN"
  }
}

url is the only required endpoint field. cardUrl is the optional discovery URL for providers that do not serve /.well-known/agent-card.json. The client reads the protocol version from the agent card. Pass protocolVersion directly to A2AClient when a provider's card omits it. The optional auth descriptor is non-secret connection metadata. Use { "type": "bearer", "credentialRef": "..." } for a vault-backed bearer credential, or { "type": "oauth-client-credentials", "tokenUrl": "...", "clientId": "...", "clientSecretRef": "...", "scope": "..." } when the peer issues OAuth client-credentials tokens. credentialRef and clientSecretRef are references, never secret values.

Do not add apiKey, env, skills, or token values to a manifest. Resolve credentials server-side from the workspace connection or vault. A direct A2AClient call can pass cardUrl and protocolVersion while a provider adapter is being used, but browser code must never receive the credential.

Four ways to create it, all writing the same row:

Surface Where
Settings → Agent → Sub-agents → Connect agent (owners and admins) any app with the Settings shell
Agent page → Connections apps mounting AgentTabsPage
Dispatch → Agents → Add external agent workspace dispatch
The agent itself resources tool, action: "write", --scope shared

The last one matters for template apps with no Code tab: "connect me to https://analytics.example.com" is a complete instruction. remote-agents/ is whitelisted as a durable control path, so the write is workspace-scoped, and it takes effect on the next discoverAgents() call with no restart.

First-party templates are seeded automatically and overlaid on top of manifests, so Mail, Calendar, and friends appear without registration. In dev they resolve to http://localhost:<devPort>; a manifest pointing at l

자주 묻는 질문

한 앱을 등록하면 다른 앱이 되돌려 호출할 수 있나요?

아니요. 연결은 한 방향으로만 작동하므로 양쪽을 각각 설정해야 합니다.

앱은 언제 동급 앱을 호출해야 하나요?

이 스킬은 사용자가 요청하거나, 동급 앱이 로컬 앱에 없는 데이터나 기능을 가지고 있을 때만 호출하라고 말합니다.

A2A란 무엇인가요?

에이전트가 서로를 찾고 작업을 위임할 수 있게 하는 JSON-RPC 프로토콜입니다.

상세 정보

작성자의 원본 설명

How agent-native apps discover, authenticate with, and call each other over A2A. Use when connecting one app to another, debugging a remote agent that won't authenticate, exposing skills to peers, or calling agents from scripts.

repo: BuilderIO/agent-native

인기도

GitHub 스타
7.6k
순위
#13128
라이선스
MIT
업데이트
2026. 11. 2.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬