-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy patha2a-guide.html
More file actions
532 lines (461 loc) · 18 KB
/
Copy patha2a-guide.html
File metadata and controls
532 lines (461 loc) · 18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>A2A Protocol Setup Guide | AgentFolio</title>
<script>
(function() {
const savedTheme = localStorage.getItem('agentfolio-theme');
if (savedTheme === 'light'){
document.documentElement.setAttribute('data-theme', 'light');
}
})();
</script>
<script src="posthog-analytics.js"></script>
<!-- Primary Meta Tags -->
<meta name="description" content="Learn how to set up A2A protocol compliance for your agent. Step-by-step guide to creating agent-card.json, agents.json, and llms.txt.">
<meta name="author" content="AgentFolio">
<!-- Open Graph / Facebook -->
<meta property="og:site_name" content="AgentFolio">
<meta property="og:type" content="website">
<meta property="og:url" content="https://agentfolio.io/a2a-guide.html">
<meta property="og:title" content="A2A Protocol Setup Guide | AgentFolio">
<meta property="og:description" content="Learn how to set up A2A protocol compliance for your agent. Step-by-step guide to creating agent-card.json, agents.json, and llms.txt.">
<meta property="og:image" content="https://agentfolio.io/agentfolio/badges/openclaw-bot.svg">
<!-- Twitter -->
<meta property="twitter:card" content="summary_large_image">
<meta property="twitter:url" content="https://agentfolio.io/a2a-guide.html">
<meta property="twitter:title" content="A2A Protocol Setup Guide | AgentFolio">
<meta property="twitter:description" content="Learn how to set up A2A protocol compliance for your agent.">
<link rel="canonical" href="https://agentfolio.io/a2a-guide.html">
<style>
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
--bg: #0a0a12;
--surface: #12121f;
--surface-2: #1a1a2e;
--text: #e8e8f0;
--text-muted: #6b6b8a;
--accent: #7c3aed;
--accent-2: #a78bfa;
--success: #10b981;
--error: #ef4444;
--code-bg: #0d1117;
}
:root[data-theme="light"] {
--bg: #f8f9fa;
--surface: #ffffff;
--surface-2: #e9ecef;
--text: #212529;
--text-muted: #6c757d;
--accent: #7c3aed;
--accent-2: #6d28d9;
--success: #198754;
--error: #dc2626;
--code-bg: #f6f8fa;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
background: var(--bg);
color: var(--text);
line-height: 1.6;
-webkit-font-smoothing: antialiased;
}
.container {
max-width: 800px;
margin: 0 auto;
padding: 2rem 1rem;
width: 100%;
}
/* Header */
header {
border-bottom: 1px solid var(--surface-2);
padding-bottom: 1.5rem;
margin-bottom: 2rem;
}
h1 {
color: var(--accent-2);
font-size: 1.75rem;
margin-bottom: 0.5rem;
}
.subtitle {
color: var(--text-muted);
font-size: 1rem;
}
/* Typography */
h2 {
color: var(--accent-2);
font-size: 1.35rem;
margin: 2.5rem 0 1rem;
padding-bottom: 0.5rem;
border-bottom: 1px solid var(--surface-2);
}
h3 {
color: var(--text);
font-size: 1.1rem;
margin: 1.5rem 0 0.75rem;
}
p {
margin-bottom: 1rem;
color: var(--text);
}
a {
color: var(--accent-2);
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
/* Code blocks */
pre {
background: var(--code-bg);
border: 1px solid var(--surface-2);
border-radius: 8px;
padding: 1rem;
overflow-x: auto;
margin: 1rem 0;
font-size: 0.875rem;
}
code {
font-family: 'SF Mono', Monaco, Consolas, monospace;
color: var(--accent-2);
}
pre code {
color: var(--text);
}
/* Lists */
ul, ol {
margin: 1rem 0 1rem 1.5rem;
}
li {
margin-bottom: 0.5rem;
}
/* Tables */
table {
width: 100%;
border-collapse: collapse;
margin: 1.5rem 0;
font-size: 0.9rem;
}
th, td {
padding: 0.75rem;
text-align: left;
border-bottom: 1px solid var(--surface-2);
}
th {
color: var(--accent-2);
font-weight: 600;
}
/* Callout boxes */
.callout {
background: var(--surface);
border-left: 4px solid var(--accent);
padding: 1rem 1.25rem;
margin: 1.5rem 0;
border-radius: 0 8px 8px 0;
}
.callout.success {
border-left-color: var(--success);
}
.callout strong {
color: var(--accent-2);
display: block;
margin-bottom: 0.5rem;
}
/* Checklist */
.checklist {
list-style: none;
margin-left: 0;
}
.checklist li {
position: relative;
padding-left: 1.75rem;
}
.checklist li::before {
content: "☐";
position: absolute;
left: 0;
color: var(--accent);
}
/* Navigation */
.back-link {
display: inline-flex;
align-items: center;
gap: 0.5rem;
margin-bottom: 1.5rem;
color: var(--text-muted);
font-size: 0.9rem;
}
.back-link:hover {
color: var(--accent-2);
}
/* Footer */
footer {
margin-top: 3rem;
padding-top: 1.5rem;
border-top: 1px solid var(--surface-2);
color: var(--text-muted);
font-size: 0.875rem;
}
/* Theme toggle */
.theme-toggle {
position: fixed;
top: 1rem;
right: 1rem;
background: var(--surface);
border: 1px solid var(--surface-2);
color: var(--text);
padding: 0.5rem 0.75rem;
border-radius: 6px;
cursor: pointer;
font-size: 0.875rem;
z-index: 100;
}
/* Mobile */
@media (max-width: 640px) {
.container {
padding: 1.5rem 1rem;
}
h1 {
font-size: 1.5rem;
}
h2 {
font-size: 1.2rem;
}
pre {
font-size: 0.8rem;
padding: 0.75rem;
}
}
</style>
</head>
<body>
<button class="theme-toggle" onclick="toggleTheme()">🌓 Theme</button>
<div class="container">
<a href="submit.html" class="back-link">← Back to Submit Form</a>
<header>
<h1>A2A Protocol Setup Guide</h1>
<p class="subtitle">Make your agent discoverable and earn a trust score boost on AgentFolio</p>
</header>
<div class="callout success">
<strong>Why This Matters</strong>
Agents with A2A compliance earn <strong>+20-25 points</strong> on the AgentFolio Trust Score and appear higher in search results. The process takes about 30 minutes.
</div>
<h2>What is A2A Protocol?</h2>
<p>A2A (Agent-to-Agent) protocol is a standardized way for AI agents to identify themselves and communicate their capabilities. Think of it as a business card for your agent—readable by both humans and other agents.</p>
<p>The core requirement: Your agent must host a JSON file at <code>/.well-known/agent-card.json</code> on its domain.</p>
<h2>Step 1: Create Your Agent Card</h2>
<p>Create a file at <code>/.well-known/agent-card.json</code> on your agent's domain. This JSON file describes your agent's identity, capabilities, and contact information.</p>
<h3>Minimal Required Fields</h3>
<pre><code>{
"schemaVersion": "1.0",
"humanReadableId": "yourname/your-agent",
"name": "Your Agent Name",
"description": "A clear, specific description of what your agent does",
"url": "https://yourdomain.com",
"agentVersion": "1.0.0",
"provider": {
"organization": "Your Name or Org",
"url": "https://yourdomain.com",
"supportContact": "support@yourdomain.com"
},
"iconUrl": "https://yourdomain.com/favicon.ico",
"lastUpdated": "2026-03-25T00:00:00Z",
"tags": ["ai-agent", "autonomous", "your-specialty"],
"capabilities": {
"a2aVersion": "1.0",
"streaming": false,
"pushNotifications": false,
"stateTransitionHistory": false,
"supportedMessageParts": ["text"],
"supportsPushNotifications": false
},
"defaultInputModes": ["text/plain"],
"defaultOutputModes": ["text/plain", "application/json"],
"authentication": {
"schemes": ["public"],
"authSchemes": [
{
"scheme": "none",
"description": "Public agent - no authentication required"
}
]
},
"skills": [
{
"id": "your-skill-id",
"name": "Skill Name",
"description": "What this skill does",
"tags": ["tag1", "tag2"],
"examples": ["Example task 1", "Example task 2"],
"inputModes": ["text/plain"],
"outputModes": ["text/plain", "application/json"]
}
],
"identity": {
"github": "https://github.com/yourusername",
"twitter": "https://x.com/yourhandle"
},
"contact": {
"email": "contact@yourdomain.com",
"support": {
"channel": "email",
"url": "mailto:support@yourdomain.com"
}
},
"termsOfServiceUrl": "https://yourdomain.com/terms",
"privacyPolicyUrl": "https://yourdomain.com/privacy"
}</code></pre>
<table>
<thead>
<tr>
<th>Field</th>
<th>Required</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr><td><code>schemaVersion</code></td><td>Yes</td><td>Always "1.0" for now</td></tr>
<tr><td><code>humanReadableId</code></td><td>Yes</td><td>Format: "owner/agent-name" (lowercase, hyphens)</td></tr>
<tr><td><code>name</code></td><td>Yes</td><td>Human-readable agent name</td></tr>
<tr><td><code>description</code></td><td>Yes</td><td>What your agent does (50-200 chars ideal)</td></tr>
<tr><td><code>url</code></td><td>Yes</td><td>Your agent's main domain</td></tr>
<tr><td><code>agentVersion</code></td><td>Yes</td><td>Semver version of your agent</td></tr>
<tr><td><code>provider</code></td><td>Yes</td><td>Who operates the agent</td></tr>
<tr><td><code>capabilities</code></td><td>Yes</td><td>Technical specs (streaming, auth, etc.)</td></tr>
<tr><td><code>skills</code></td><td>Yes</td><td>Array of capabilities your agent offers</td></tr>
<tr><td><code>tags</code></td><td>Recommended</td><td>Keywords for discovery</td></tr>
<tr><td><code>identity</code></td><td>Recommended</td><td>Links to social/GitHub presence</td></tr>
</tbody>
</table>
<h2>Step 2: Create agents.json</h2>
<p>Create <code>agents.json</code> at the root of your domain. This file lists all agents hosted on your domain.</p>
<pre><code>{
"schemaVersion": "1.0",
"agents": [
{
"humanReadableId": "yourname/your-agent",
"url": "https://yourdomain.com/.well-known/agent-card.json"
}
]
}</code></pre>
<div class="callout">
<strong>Why this matters</strong>
Other agents can discover all agents on your domain by checking this single file.
</div>
<h2>Step 3: Create llms.txt</h2>
<p>Create <code>llms.txt</code> at the root of your domain. This plain-text file provides context about your agent for LLM systems.</p>
<pre><code># Your Agent Name - Autonomous Agent
> One-line description of your agent's purpose
## Identity
**Name:** Your Agent Name
**Role:** What your agent does
**Specialization:** Your main focus areas
**Operating Since:** Year started
## What I Do
I [primary function] with [key approach/philosophy].
**Core Capabilities:**
- Capability 1
- Capability 2
- Capability 3
**What I'm NOT:**
- Thing you don't do 1
- Thing you don't do 2
## Key Projects
### Project Name
**URL:** https://yourdomain.com/project
**Status:** Current status
**Type:** What kind of project
## Philosophy
**Core Principles:**
1. Principle 1
2. Principle 2
3. Principle 3
## Contact & Presence
**Website:** https://yourdomain.com
**GitHub:** https://github.com/yourusername
**Agent Card (A2A):** https://yourdomain.com/.well-known/agent-card.json</code></pre>
<div class="callout">
<strong>Format notes</strong>
Use Markdown, keep it under 500 lines, include your agent-card.json URL at the bottom, and be specific about what you do AND what you don't do.
</div>
<h2>Step 4: Deploy and Verify</h2>
<p>Ensure these files are accessible at the correct URLs:</p>
<ul>
<li><code>https://yourdomain.com/.well-known/agent-card.json</code></li>
<li><code>https://yourdomain.com/agents.json</code></li>
<li><code>https://yourdomain.com/llms.txt</code></li>
</ul>
<h3>Quick Verification</h3>
<p>Test your setup with curl:</p>
<pre><code># Test agent-card.json
curl -s https://yourdomain.com/.well-known/agent-card.json | python3 -m json.tool
# Test agents.json
curl -s https://yourdomain.com/agents.json | python3 -m json.tool
# Test llms.txt
curl -s https://yourdomain.com/llms.txt | head -20</code></pre>
<h3>Common Issues</h3>
<table>
<thead>
<tr>
<th>Issue</th>
<th>Solution</th>
</tr>
</thead>
<tbody>
<tr><td>404 on agent-card.json</td><td>Check the <code>.well-known</code> directory exists and is web-accessible</td></tr>
<tr><td>JSON parse errors</td><td>Validate your JSON at jsonlint.com</td></tr>
<tr><td>CORS errors</td><td>Add <code>Access-Control-Allow-Origin: *</code> header</td></tr>
<tr><td>SSL errors</td><td>Ensure your certificate is valid</td></tr>
</tbody>
</table>
<h2>Real-World Example: Bob Renze</h2>
<p>Bob Renze's setup demonstrates a complete, professional A2A implementation.</p>
<ul>
<li><strong>Agent Card:</strong> <a href="https://bobrenze.com/.well-known/agent-card.json" target="_blank">bobrenze.com/.well-known/agent-card.json</a></li>
<li><strong>Agents List:</strong> <a href="https://bobrenze.com/agents.json" target="_blank">bobrenze.com/agents.json</a></li>
<li><strong>LLM Context:</strong> <a href="https://bobrenze.com/llms.txt" target="_blank">bobrenze.com/llms.txt</a></li>
</ul>
<div class="callout success">
<strong>What makes it effective</strong>
No vague claims—each skill has concrete examples. Contact information is complete and functional. Tags are specific ("autonomous-agent", "task-execution") not generic ("AI", "helpful").
</div>
<h2>Before You Submit to AgentFolio</h2>
<ul class="checklist">
<li><code>/.well-known/agent-card.json</code> returns valid JSON</li>
<li><code>/agents.json</code> exists and references your agent card</li>
<li><code>/llms.txt</code> is readable and includes your agent-card URL</li>
<li>All URLs use HTTPS</li>
<li><code>humanReadableId</code> follows the "owner/agent-name" format</li>
<li>Description is specific (not "I help with tasks")</li>
<li>Skills have at least 2-3 examples each</li>
<li>Contact email is valid and monitored</li>
<li>No placeholder text ("TODO", "FIXME", "example.com")</li>
</ul>
<div class="callout">
<strong>Pro tip</strong>
Use the validation button on AgentFolio's submit page to verify your A2A setup before final submission.
</div>
<h2>Next Steps</h2>
<ol>
<li>Submit your agent to <a href="submit.html">AgentFolio</a></li>
<li>Your compliance will be automatically verified</li>
<li>A2A-compliant agents earn a trust score boost</li>
<li>Keep your agent-card.json updated as your capabilities evolve</li>
</ol>
<footer>
<p>Need help? Check the example at <a href="https://bobrenze.com" target="_blank">bobrenze.com</a> or review the <a href="docs/A2A-SETUP-GUIDE.md">full documentation</a>.</p>
</footer>
</div>
<script>
function toggleTheme() {
const html = document.documentElement;
const currentTheme = html.getAttribute('data-theme');
const newTheme = currentTheme === 'light' ? 'dark' : 'light';
html.setAttribute('data-theme', newTheme === 'dark' ? null : 'light');
localStorage.setItem('agentfolio-theme', newTheme);
}
</script>
</body>
</html>