AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified MIT Self-run

A2a Messages Parts

skill-orcaqubits-agentic-commerce-skills-plugins-a2a-messages-parts · by OrcaQubits

Implement A2A messages and parts — TextPart, FilePart, DataPart, message roles, metadata, and content negotiation. Use when building message construction, parsing, or content type handling in A2A agents.

No reviews yet
0 installs
36 views
0.0% view→install

Install

$ agentstack add skill-orcaqubits-agentic-commerce-skills-plugins-a2a-messages-parts

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-orcaqubits-agentic-commerce-skills-plugins-a2a-messages-parts)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
4mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of A2a Messages Parts? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

A2A Messages and Parts

Before writing code

Fetch live docs:

  1. Fetch https://a2a-protocol.org/latest/specification/ for the Message and Part schemas
  2. Web-search site:github.com a2aproject A2A message parts TextPart FilePart DataPart for schema details
  3. Web-search site:github.com a2aproject a2a-samples message for message construction examples
  4. Fetch SDK docs for message builder classes and part types

Conceptual Architecture

What Messages Are

Messages are the communication units between agents in A2A. Each message belongs to a task and contains one or more Parts that carry the actual content. Messages have roles indicating direction.

Message Structure

  • roleuser (from client agent) or agent (from server agent)
  • parts — Array of Part objects (the actual content)
  • metadata — Optional key-value pairs for custom data

Three Part Types

TextPart

Plain text or markdown content.

  • kind: "text"
  • text: The text content string
  • metadata: Optional key-value pairs

Use for: Natural language instructions, responses, explanations, formatted output.

FilePart

File content, either inline or by reference.

  • kind: "file"
  • file: Object containing either:
  • bytes: Base64-encoded file content + mimeType
  • uri: URL to the file + optional mimeType
  • metadata: Optional key-value pairs

Use for: Images, documents, code files, generated files, binary data.

DataPart

Structured JSON data.

  • kind: "data"
  • data: Any valid JSON value (object, array, string, number, etc.)
  • metadata: Optional key-value pairs

Use for: Structured results, API responses, configuration, machine-readable output.

Content Negotiation

Agents declare supported MIME types in their Agent Card:

  • defaultInputModes — What the agent can receive
  • defaultOutputModes — What the agent can produce

Clients can specify preferred output modes in the request:

  • acceptedOutputModes — MIME types the client wants (in the configuration object)

If there's a mismatch, the server returns error -32005 (incompatible content types).

Message Flow in a Task

Client message (role: user)    → Server creates/continues task
Server response (role: agent)  → Client processes result
Client follow-up (role: user)  → Server continues task (multi-turn)
Server final (role: agent)     → Task reaches terminal state

Composing Rich Messages

Messages can contain multiple parts of mixed types:

{
  "role": "user",
  "parts": [
    { "kind": "text", "text": "Analyze this image and provide structured results" },
    { "kind": "file", "file": { "uri": "https://example.com/chart.png", "mimeType": "image/png" } }
  ]
}

Best Practices

  • Use TextPart for natural language, DataPart for structured data — don't serialize JSON into TextPart
  • Include mimeType with FileParts for proper content handling
  • Prefer URI-based FileParts over inline bytes for large files
  • Validate that message parts match the agent's declared input modes
  • Keep metadata lightweight — don't store large payloads there
  • For multi-modal interactions, combine TextParts with FileParts in the same message
  • Parse all part types when receiving messages — don't assume text-only

Fetch the specification for exact Part schemas, all fields, metadata conventions, and content type handling rules before implementing.

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.