Skip to main content
Below is a clearer, more structured explanation of the core elements used in A2A (agent-to-agent) communication. The sequence follows discovery → messaging → long-running work → deliverables so you can map each technical diagram to the corresponding definitions and examples. Agent Card An Agent Card is essentially a “business card” for an AI agent. It tells other agents:
  • Who the agent is (name, description, provider)
  • Where to reach it (URL / endpoint)
  • What it can do (capabilities and skills)
  • How to authenticate (security requirements)
Capabilities can include features like streaming, push notifications, or state transition history. Skills are detailed entries that list name, id, description, tags, examples, and supported input/output modes — effectively the agent’s advertised abilities.
A slide titled "Fundamental Communication Elements" showing an "Agent Card" described as "like a business card for an AI agent." Below it are four colored boxes listing: Who the agent is (name/description/provider), Where to find it (URL/endpoint), What it can do (skills/capabilities), and How to authenticate (security requirements).
Example Agent Card (Kubernetes-focused agent):
{
  "name": "k8s_a2a_agent",
  "description": "An example A2A agent that knows how to use Kubernetes tools.",
  "url": "http://127.0.0.1:8083/api/a2a/kagent/k8s-a2a-agent/",
  "capabilities": {
    "streaming": true,
    "pushNotifications": false,
    "stateTransitionHistory": true
  },
  "skills": [
    {
      "id": "get-resources-skill",
      "name": "Get Resources",
      "description": "Get resources in the Kubernetes cluster",
      "tags": ["k8s", "resources"],
      "examples": [
        "Get all resources in the Kubernetes cluster",
        "Get the pods in the default namespace"
      ],
      "inputModes": ["text"],
      "outputModes": ["text"]
    }
  ]
}
Agent discovery returns the Agent Card so other agents know how to connect, which capabilities are available, and what authentication is required. Exposing accurate capabilities and skill metadata improves automated routing and orchestration in multi-agent systems.
Messages and Parts Messages are the basic units that agents exchange. Each message typically includes metadata (sender, unique ID) and a list of parts. A part contains the actual content and can be one of:
  • text (plain user or system text)
  • file (binary content encoded as Base64 with a MIME type)
  • structured data (JSON payloads)
Example message parts:
{
  "type": "text",
  "text": "Get the pods in default namespace"
}
{
  "type": "file",
  "mimeType": "application/json",
  "data": "base64-encoded-content"
}
{
  "type": "data",
  "data": {
    "namespace": "default",
    "resourceType": "pods"
  }
}
Artifacts Artifacts are the tangible outputs produced by agents. Unlike messages (which are transient communication), artifacts are deliverables: reports, structured results, files, images, or any persistent output. Artifacts have unique IDs, names, and parts (using the same parts schema as messages).
A presentation slide titled "Fundamental Communication Elements" highlighting element 03 labeled "Artifact." It defines an artifact as "actual results or deliverables from an agent" and includes a blue note that it's a real output, not just a message.
Example artifact (pod listing):
{
  "taskId": "task-001",
  "status": { "state": "completed" },
  "artifacts": [
    {
      "artifactId": "artifact-001",
      "name": "Pod List",
      "parts": [
        {
          "type": "text",
          "text": "Found 3 pods:\n- pod-1\n- pod-2\n- pod-3"
        }
      ]
    }
  ]
}
Common artifact types and examples:
Artifact TypeTypical Use CaseExample
Text artifactHuman-readable reportsFinished analysis: 12 issues found
Data artifactStructured output for machine consumption{"reservationId":"abc123","status":"confirmed"}
File artifactImages, documents, or binary outputsBase64-encoded image bytes
Mixed (Text/Data)Aggregated outputs (e.g., list of resources)["pod-1","pod-2","pod-3"]
A presentation slide titled "Real-World Examples" showing four rounded cards labeled Text Artifact, Data Artifact, File Artifact, and Text/Data Artifact. Each card lists an example: a completed report, a booking confirmation, a generated image, and a list of Kubernetes resources.
Artifacts can also be streamed incrementally as they are produced (useful for large or long-running tasks). Tasks Tasks model long-running or multi-step work that originates from a message. Tasks have well-defined lifecycles (submitted → working → completed/failed/canceled). While a task executes, it may stream status updates and partial artifacts before delivering final artifacts. Example task lifecycle with streaming partial results then final results:
// Initial task submission
{
  "taskId": "task-789",
  "status": { "state": "submitted" }
}

// Update while working (streaming partial artifact)
{
  "taskId": "task-789",
  "status": { "state": "working", "message": "Processing your request..." },
  "artifacts": [
    {
      "artifactId": "artifact-1",
      "name": "Partial Results",
      "parts": [{"type": "text", "text": "Found 2 pods so far..."}]
    }
  ]
}

// Final result
{
  "taskId": "task-789",
  "status": { "state": "completed" },
  "artifacts": [
    {
      "artifactId": "artifact-2",
      "name": "Final Results",
      "parts": [{"type": "text", "text": "Found 3 pods total"}]
    }
  ]
}
End-to-end Example This short flow demonstrates discovery → message → task updates → artifact results.
# Step 1: Discover Agent Card (Agent discovery endpoint)
GET http://127.0.0.1:8083/api/a2a/kagent/k8s-a2a-agent/.well-known/agent-card
# Server → Returns the Agent Card JSON shown earlier
# Step 2: Send Message
{
  "messageId": "msg-001",
  "role": "user",
  "parts": [
    {
      "type": "text",
      "text": "Get all pods in the default namespace"
    }
  ]
}
# Step 3: Agent responds with a Task update (working)
{
  "taskId": "task-001",
  "status": {
    "state": "working",
    "message": "Querying Kubernetes cluster..."
  }
}
# Step 4: Agent sends final Artifact (result)
{
  "taskId": "task-001",
  "status": { "state": "completed" },
  "artifacts": [
    {
      "artifactId": "artifact-001",
      "name": "Pod List",
      "parts": [
        {
          "type": "text",
          "text": "Found 3 pods:\n- pod-1\n- pod-2\n- pod-3"
        }
      ]
    }
  ]
}
Summary
  • Agent discovery returns an Agent Card.
  • Clients send Messages composed of Parts (text, files, structured data).
  • Agents create Tasks for long-running work, stream status and partial Artifacts while working, and return final Artifacts when done.
Other important concepts
  • Context: Groups related messages and tasks into sessions or conversations for consistent state.
  • Transport: Use secure channels such as HTTPS. See: HTTPS
  • Format: Standardize on formats like JSON and JSON-RPC 2.0. See: JSON and JSON-RPC 2.0
  • Authentication: Prefer robust schemes such as OAuth 2.0 or API keys. See: OAuth 2.0
  • Agent discovery & extensions: Protocol-level mechanisms for how agents locate each other and how optional extensions are negotiated
A dark-themed presentation slide titled "Other Important Concepts" listing items like Context, Format, Agent Discovery on the left and Transport and Authentication on the right. The items are shown as horizontal rounded boxes with teal accent bars.
Security reminder: always authenticate and encrypt agent endpoints. Exposing discovery endpoints without proper authentication or TLS can leak capabilities and create attack surfaces.
References

Watch Video