@well-known-js/agent-card
v1.0.1
Published
Generate Agent2Agent Agent Card discovery documents.
Maintainers
Readme
@well-known-js/agent-card
Generate and validate Agent2Agent (A2A) Agent Cards for
/.well-known/agent-card.json.
The schema follows the A2A Protocol 1.0 Agent Card model, including supported interfaces, capabilities, skills, security schemes, security requirements, and optional JWS signatures.
Installation
pnpm add @well-known-js/agent-cardUsage
import { agentCard } from "@well-known-js/agent-card";
agentCard({
name: "Research Agent",
description: "Finds and summarizes primary sources.",
supportedInterfaces: [
{
url: "https://agent.example.com/a2a/v1",
protocolBinding: "HTTP+JSON",
protocolVersion: "1.0",
},
],
version: "1.0.0",
capabilities: { streaming: true },
defaultInputModes: ["text/plain"],
defaultOutputModes: ["text/plain", "application/json"],
skills: [
{
id: "research",
name: "Research",
description: "Researches a question using primary sources.",
tags: ["research", "citations"],
},
],
});The generated file uses application/json at:
/.well-known/agent-card.jsonThe schema preserves unknown fields for forward compatibility with future A2A additions.
