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.
| Name | a2a-agent |
| Version | 0.1.0 |
| Category | ai-systems |
| License | Apache-2.0 |
| Persona | engineering |
| Tags | typescript, agent, a2a, multi-agent, protocol, ai, model-gateway |
| Source | templates/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
| Tool | Version | Why |
|---|---|---|
node | >=26 | Node.js runtime for TypeScript execution |
Variables
Required
ProjectNamestring- Kebab-case project name, used in package.json and directory Must be lowercase kebab-case starting with a letter.
Optional
Descriptionstring — defaults toAn A2A protocol agent- Short project description for package.json and README
LlmProviderstring — defaults togateway- 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/
PlatformNamestring — 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>
Transportstring — defaults tohttp- A2A transport protocol (http or websocket)
IncludeDiscoverybool — defaults totrue- Include agent discovery registry and Agent Card at /.well-known/agent.json
IncludeTestsbool — defaults totrue- 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.tsComposes with
- Pairs with
mcp-server-ts - Pairs with
agentic-loop - Pairs with
eval-harness - Nests inside
monorepo
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.