a2a-protocol
Fungsinya
Skill ini menjelaskan cara aplikasi agent-native mendaftar dan mengautentikasi satu sama lain melalui protokol A2A. Skill ini mencakup menghubungkan satu aplikasi ke aplikasi lain dan men-debug agen jarak jauh yang tidak bisa masuk. Skill ini ditujukan untuk pengembang yang menghubungkan aplikasi.
Kapan dipakai
- βSaat Anda ingin satu aplikasi Agent-Native memanggil agen aplikasi lain.
- βSaat agen jarak jauh gagal melakukan autentikasi dan Anda perlu mencari tahu alasannya.
- βSaat Anda ingin mengekspos skill satu aplikasi ke aplikasi rekan.
Link skill
https://github.com/BuilderIO/agent-native/blob/main/.agents/skills/a2a-protocol/SKILL.mdSalin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.
Cara pakai
Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.
Pesan siap tempel
Untuk Claude Code, Codex, atau Cursor: jalankan di folder proyek, lalu skill langsung terpasang.
Unduh SKILL.md lalu taruh di folder skill agen Anda.
Contoh permintaan ke AI
βBisakah Anda menghubungkan aplikasi pelaporan saya ke aplikasi data saya agar agen pelaporan dapat meminta angkanya?β
5 skill baru setiap minggu. 1 menit baca.
Cara kerjanya
Skill ini menjelaskan dua langkah: mendaftarkan aplikasi lain sebagai agen jarak jauh, dan membagikan rahasia agar token yang ditandatangani dapat diperiksa. Kedua langkah harus sudah ada agar panggilan dapat berfungsi.
Konten teknis (SKILL.md asli)
Teks asli dari pembuat, dalam bahasa Inggris, langsung dari 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:
- B is registered on A as a
remote-agents/<id>.jsonresource. - 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 callersPOST /_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
Pertanyaan umum
Apakah mendaftarkan satu aplikasi memungkinkan yang lain memanggil balik?
Tidak. Koneksi hanya berjalan satu arah, sehingga masing-masing sisi harus diatur sendiri.
Kapan aplikasi sebaiknya memanggil rekannya?
Skill ini menyatakan hanya saat pengguna memintanya atau saat rekan memiliki data atau kemampuan yang tidak dimiliki aplikasi lokal.
Apa itu A2A?
Itu adalah protokol JSON-RPC yang memungkinkan agen saling menemukan dan mendelegasikan tugas.
Detail
Deskripsi asli dari pembuat
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
Popularitas
- Bintang GitHub
- 7.6k
- Peringkat
- #13128
- Lisensi
- MIT
- Diperbarui
- 2/11/2026
Komentar
- β¦
Skill lain dari repositori ini
design-exploration
7.6kMembantu agent Anda mengeksplorasi beberapa arah desain UI secara berdampingan, membiarkan Anda memilih satu, lalu menyempurnakan desain yang dipilih.
visual-edit
7.6kMembantu agent Anda membuka aplikasi lokal yang sedang berjalan di editor visual agar Anda dapat meninjau dan mengedit layar aslinya bersama-sama.
turn-into-app
7.6kMengubah alur kerja, spreadsheet, atau proyek menjadi aplikasi visual yang rapi, dengan layar yang terisi dan agent yang bekerja di balik kontrol.
visual-plan
7.6kMengubah rencana teks biasa menjadi rencana visual interaktif dengan diagram, peta file, cuplikan kode, dan pertanyaan terbuka.
Skill serupa
api-connector-builder
280kMembuat agent Anda membangun koneksi API baru mengikuti pola yang sudah ada. Gunakan saat ingin menambah integrasi lagi tanpa membuat cara baru.
api-design
280kMembantu agent Anda merancang REST API sesuai praktik terbaik. Berguna untuk mengatur cara API berkomunikasi, menampilkan error, dan mengorganisasi data.
backend-patterns
280kMembantu agent Anda dengan pola arsitektur sisi server dan optimasi database. Berguna untuk membangun atau meninjau kode yang berjalan di server.