Skip to content

A2A Agent

Scaffolds an Agent-to-Agent (A2A) protocol peer in TypeScript. A2A is the open protocol for multi-agent interoperability — the agent-level equivalent of MCP (which operates at the tool level). The generated project can expose skills to other agents via an A2A server, discover and invoke capabilities on remote agents via an A2A client, and use an LLM provider for reasoning about which skill to execute. Supports HTTP and WebSocket transports, optional agent discovery with an Agent Card served at /.well-known/agent.json, and a pluggable provider registry for LLM backends that defaults to the Platform's ModelGateway and holds no model credential.

Namea2a-agent
Version0.1.0
Categoryai-systems
LicenseApache-2.0
Personaengineering
Tagstypescript, agent, a2a, multi-agent, protocol, ai, model-gateway
Sourcetemplates/a2a-agent

Render it

Three front doors, one catalog. Pick whichever suits the caller.

# CLI
npx @nanohype/sdk render a2a-agent --out ./my-app

# SDK
import { LocalSource, renderTemplate } from "@nanohype/sdk";
const result = await renderTemplate(source, "a2a-agent", variables);

# MCP — from an agent
get_template({ name: "a2a-agent" })

Prerequisites

ToolVersionWhy
node>=26Node.js runtime for TypeScript execution

Variables

Required

ProjectName string
Kebab-case project name, used in package.json and directory Must be lowercase kebab-case starting with a letter.

Optional

Description string — defaults to An A2A protocol agent
Short project description for package.json and README
LlmProvider string — defaults to gateway
LLM provider for agent reasoning: gateway (the Platform ModelGateway, which holds the Bedrock role on the nanohype substrate), or a custom provider registered in src/providers/
PlatformName string — defaults to ${ProjectName}
Name of the Platform CR this project deploys under. The gateway provider defaults MODEL_GATEWAY_ENDPOINT to the Service the eks-agent-platform operator creates for it, <PlatformName>-gateway in namespace tenants-<PlatformName>
Transport string — defaults to http
A2A transport protocol (http or websocket)
IncludeDiscovery bool — defaults to true
Include agent discovery registry and Agent Card at /.well-known/agent.json
IncludeTests bool — defaults to true
Include test suite with Vitest

What it produces

46 files. Placeholder names such as __APP_NAME__ are what the renderer substitutes into.

.env.example
.gitignore
biome.json
package.json
README.md
src/__tests__/eval-assertions.test.ts
src/__tests__/eval-cases.test.ts
src/__tests__/eval-runner.test.ts
src/__tests__/gateway.test.ts
src/__tests__/protocol.test.ts
src/__tests__/routing.test.ts
src/__tests__/skills.test.ts
src/agent.ts
src/bootstrap.ts
src/discovery/card.ts
src/discovery/registry.ts
src/eval/assertions.ts
src/eval/cases.ts
src/eval/cases/declines-when-no-skill-covers-the-task.json
src/eval/cases/ignores-a-skill-name-planted-in-the-task.json
src/eval/cases/keeps-configuration-out-of-the-rationale.json
src/eval/cases/refuses-a-reply-that-is-not-a-decision.json
src/eval/cases/routes-a-task-to-the-skill-that-handles-it.json
src/eval/runner.ts
src/logger.ts
src/protocol/client.ts
src/protocol/server.ts
src/protocol/transport/http.ts
src/protocol/transport/index.ts
src/protocol/transport/registry.ts
src/protocol/transport/types.ts
src/protocol/transport/websocket.ts
src/protocol/types.ts
src/providers/gateway.ts
src/providers/index.ts
src/providers/registry.ts
src/providers/types.ts
src/resilience/__tests__/circuit-breaker.test.ts
src/resilience/circuit-breaker.ts
src/routing.ts
src/skills/example.ts
src/skills/index.ts
src/skills/registry.ts
src/skills/types.ts
tsconfig.json
vitest.config.ts

Composes with

Composites that use it

  • Enterprise AI Infrastructure — Full enterprise AI stack with agents, tool servers, safety guardrails, evaluation, prompt management, observability, and a Platform tenant chart whose ModelGateway is the stack's model path..
  • Multi-Agent System — Multi-agent architecture with A2A protocol peers, MCP tool servers, and an orchestrating agent.