Back to articles
Hands-on Tutorial

How to Write an Agent Card
Practical Tutorial

April 2, 202610 min read

An Agent Card is the "business card" of an agent in the A2A Protocol. It describes the information that other agents need to discover your agent and understand its capabilities. For the basic concepts, see "What is an A2A Agent Card? Complete Guide". This article walks through how to actually write an Agent Card.

Minimal Agent Card

Here are the minimum required fields for a working Agent Card. Start with this structure.

minimal-agent-card.json
{
  "name": "my_first_agent",
  "description": "My first A2A agent",
  "version": "1.0.0",
  "defaultInputModes": ["text/plain"],
  "defaultOutputModes": ["text/plain"],
  "capabilities": {
    "streaming": false,
    "pushNotifications": false
  },
  "supportedInterfaces": [
    {
      "url": "https://example.com/a2a",
      "protocolBinding": "JSONRPC",
      "protocolVersion": "1.0"
    }
  ],
  "skills": [
    {
      "id": "hello",
      "name": "Greet",
      "description": "Return a greeting to the user",
      "tags": ["greeting", "basic"]
    }
  ]
}

Field Guide with Examples

name / description

name is the unique identifier for the agent. snake_case or kebab-case is recommended.

Good
booking_agent

Clear function, snake_case

Bad
My Agent v2 Final

Contains spaces, version mixed in

version

Use semantic versioning (semver) format: MAJOR.MINOR.PATCH — three numbers.

version examples
"1.0.0"  // Initial release
"1.1.0"  // Backward-compatible feature addition
"2.0.0"  // Breaking change (e.g. skill ID change)

supportedInterfaces

Defines how to connect to the agent. Choose from three protocol bindings.

BindingCharacteristicsBest for
JSONRPCStandard, most widely supportedGeneral web services
GRPCFast, type-safe, binary transferHigh-performance scenarios
HTTP+JSONSimple, easy to debugPrototyping, small scale

capabilities

Declares the agent's communication capabilities.

capabilities
"capabilities": {
  "streaming": true,        // Can respond in real-time
  "pushNotifications": true, // Async task completion notifications
  "extendedAgentCard": false // Support for extended spec
}
  • streaming: Set to true for chatbots or interactive agents
  • pushNotifications: Set to true for long-running tasks (e.g. report generation)

skills

Defines the skills (actions) the agent offers.

skills example
"skills": [
  {
    "id": "search_products",
    "name": "Product Search",
    "description": "Search products by keyword or condition",
    "tags": ["search", "product", "e-commerce"],
    "examples": [
      "Find red sneakers",
      "Wireless earphones under $100"
    ]
  }
]

id naming convention: snake_case recommended. Use verb+noun format (e.g. send_email, create_booking)

tags tip: Mix general and specific keywords. Aim for 3-5 tags.

Writing examples: Write as actual user utterances. Natural language, 2-3 examples.

Use Presets to Get Started Quickly

The AgentJUKU Generator provides 5 preset templates. Instead of writing from scratch, pick the closest preset and customize it — the fastest approach.

  • Booking AgentSpecialized in reservations and schedule management
  • Customer Support2-skill structure: FAQ answers and ticket management
  • Sales & QuotesQuote generation and product recommendations
  • Data AnalysisReport generation and query execution
  • Empty TemplateFor when you want to fill in everything manually

Deployment

Place your Agent Card at /.well-known/agent-card.json. Here are instructions per platform.

Vercel

public/.well-known/agent-card.json
// Just place it in the public/.well-known/ directory
// Vercel automatically serves it as a static file

project/
  public/
    .well-known/
      agent-card.json  ← place here

Nginx

nginx.conf
location /.well-known/agent-card.json {
    alias /var/www/html/agent-card.json;
    default_type application/json;
    add_header Access-Control-Allow-Origin "*";
}

Express

server.js
const express = require('express');
const app = express();

app.get('/.well-known/agent-card.json', (req, res) => {
  res.json(require('./agent-card.json'));
});

Common Mistakes

Wrong version format
NG

"version": "v1"

OK

"version": "1.0.0"

Use semver format (MAJOR.MINOR.PATCH)

Duplicate skill IDs
NG

Two skills with the same "id": "search"

OK

Distinguish as "search_products" and "search_docs"

Skill IDs must be unique within an Agent Card

Missing interface URL
NG

"url": ""

OK

"url": "https://api.example.com/a2a"

Specify an actually accessible endpoint URL

Empty tags array
NG

"tags": []

OK

"tags": ["email", "communication", "notification"]

Tags are important for other agents to discover your skills

Summary

Creating an Agent Card is not difficult once you understand the naming conventions and field structure. Start from the minimal config, use presets, and add fields as needed — the most efficient approach.

Create Your Agent Card

With the AgentJUKU Generator, create an Agent Card via GUI. Start from a preset and download instantly.

Create with AgentJUKU Generator