Skip to main content

Enriching A2A Agent Cards

This guide explains how to use mav-agent-config.yaml to enhance your agent's A2A Agent Card with additional metadata for discovery and interoperability.

Overview

When AgentVisor exposes your agents via the A2A Transport, it generates an Agent Card that other A2A clients use for discovery. By default, this card contains basic information from your LangGraph schemas.

The optional mav-agent-config.yaml file lets you enrich this Agent Card with:

  • Custom agent card name and description
  • Provider branding (organization, URL)
  • Skill-level tags for discovery
  • Usage examples for each skill
  • Custom input/output MIME types

Quick Start

Create mav-agent-config.yaml in your agent directory (alongside langgraph.json):

# mav-agent-config.yaml uses a namespaced structure
a2a:
agent_card:
name: "My Research Assistant"
description: "An AI-powered research assistant"

skills:
research_agent: # Must match graph name in langgraph.json
tags: ["research", "academic", "citations"]
examples:
- "Find papers about quantum computing"
- "Summarize recent AI safety research"

That's it. The next time AgentVisor starts, it will merge this configuration into the generated Agent Card.

Namespaced Configuration

The mav-agent-config.yaml file uses a namespaced structure where each top-level key represents a configuration domain. A2A-specific configuration lives under the a2a: key. This design allows future extensions without breaking compatibility — unknown top-level keys produce warnings but don't cause errors.

Configuration Reference

Agent Card Overrides

Top-level overrides applied to the entire Agent Card:

FieldTypeDescriptionLimit
namestringAgent card display name128 chars
descriptionstringAgent description1024 chars
provider.organizationstringYour organization name128 chars
provider.urlstringYour organization URLValid URI
default_input_modesstring[]Default MIME types accepted by all skills-
default_output_modesstring[]Default MIME types produced by all skills-

Skill Configuration

Per-skill overrides keyed by graph name (must match langgraph.json):

FieldTypeDescriptionLimit
namestringOverride skill display name128 chars
descriptionstringOverride skill description1024 chars
tagsstring[]Categorization tags for discovery20 tags, 64 chars each
examplesstring[]Example prompts demonstrating usage10 examples, 500 chars each
input_modesstring[]MIME types accepted (overrides defaults)-
output_modesstring[]MIME types produced (overrides defaults)-

Complete Example

Here's a full example for a multi-agent research assistant:

# mav-agent-config.yaml
a2a:
agent_card:
name: "Acme Research Suite"
description: "A comprehensive research toolkit powered by AI"
provider:
organization: "Acme Research Inc."
url: "https://research.acme.com"
default_input_modes:
- "text/plain"
default_output_modes:
- "text/plain"
- "text/markdown"

skills:
# Graph name from langgraph.json: "research": "./research.py:graph"
research:
name: "Academic Research"
description: "Search and analyze academic papers across multiple databases"
tags:
- "research"
- "academic"
- "papers"
- "citations"
examples:
- "Find papers about transformer architectures published after 2020"
- "What are the key findings in recent quantum computing research?"
- "Compare methodologies used in climate modeling papers"

# Graph name from langgraph.json: "summarize": "./summarize.py:graph"
summarize:
name: "Document Summarizer"
description: "Generate concise summaries of long documents"
tags:
- "summarization"
- "documents"
- "analysis"
examples:
- "Summarize this research paper in 3 bullet points"
- "What are the main arguments in this article?"
input_modes:
- "text/plain"
- "text/markdown"
- "application/pdf"
output_modes:
- "text/markdown"

# Graph name from langgraph.json: "cite": "./cite.py:graph"
cite:
tags:
- "citations"
- "bibliography"
examples:
- "Generate a bibliography for these sources in APA format"

Supported MIME Types

MIME types follow the standard IANA format (type/subtype):

MIME TypeDescription
text/plainPlain text
text/markdownMarkdown formatted text
application/jsonJSON data
application/pdfPDF documents
image/pngPNG images
image/jpegJPEG images
image/*Any image type

For backward compatibility, the shorthand values text and json are also accepted (equivalent to text/plain and application/json).

Editor Integration

For VS Code and other editors that support JSON Schema, add this to the top of your mav-agent-config.yaml:

# yaml-language-server: $schema=https://agentvisor.dev/schemas/mav-agent-config.schema.json

a2a:
agent_card:
name: "My Agent"
# ... rest of config

This enables autocomplete and validation in supported editors.

Validation

The configuration is validated when the guest runtime starts. Validation errors (field length/format violations) are reported in the logs and prevent the agent from registering. A skill key that doesn't match any graph name is not a validation error — it only logs a warning (mav-agent-config.yaml references unknown agent) and the agent still registers without that skill's metadata applied.

Common Errors

ErrorCauseFix
name exceeds maximum length of 128 charactersName too longShorten the name
tag[N] exceeds maximum length of 64 charactersTag too longUse shorter tags
skill may have at most 20 tagsToo many tagsRemove less important tags
invalid media type formatMalformed MIME typeUse format type/subtype
unknown top-level typeInvalid MIME type categoryUse valid types: text, application, image, etc.

Validation Constraints

FieldConstraint
NamesMax 128 characters
DescriptionsMax 1024 characters
TagsMax 20 per skill, 64 characters each
ExamplesMax 10 per skill, 500 characters each
MIME typesMust be valid IANA format or text/json shorthand

How It Works

  1. Startup: The guest runtime looks for mav-agent-config.yaml in the agent directory
  2. Validation: Configuration is parsed and validated against constraints
  3. Merge: Valid A2A metadata is attached to each graph definition
  4. Registration: The host runtime receives the enriched graph definitions via gRPC
  5. Agent Card: When clients fetch /.well-known/agent-card.json, skills include the A2A metadata

The mav-agent-config.yaml file is entirely optional. If not present, the Agent Card uses default values derived from langgraph.json.

File Discovery

AgentVisor looks for the agent config file in this order:

  1. mav-agent-config.yaml in the agent directory
  2. mav-agent-config.yml in the agent directory (alternative extension)

If neither file exists, no error is raised — the feature is simply not used.

See Also