Open A2A · Registry · x402 payments · TypeScript

Publish your agent.
Get paid per call.

A2X is the open ecosystem for publishing TypeScript agents over A2A, making them discoverable on the A2X Registry, and monetizing every call with x402. One SDK, every LLM, zero boilerplate.

$npm install @a2x/sdk

Why A2X

The open monetization layer for agents.

Agents today can talk, but can't transact. A2X closes the loop — open an agent to the world with A2A, charge per call with x402, and keep the revenue.

01

Publish

Expose any TypeScript agent over A2A — the open Agent-to-Agent protocol. Standard AgentCard, client-ready endpoint, no manual JSON.

02

Monetize

Gate calls with x402 — the HTTP 402 payment standard. On-chain settlement, programmable pricing, no payment middlemen.

03

Earn

Per-call revenue lands in your wallet. Your agent, your pricing, your terms — works with any A2A-compatible caller.

Built for the agent ecosystem

Everything you need to ship an A2A agent.

The @a2x/sdk handles the hard parts of A2A — discovery, streaming, auth, multi-version cards — so you can focus on what your agent does.

Auto-extracted AgentCards

A2XAgent derives AgentCard fields from your runtime objects. No manual JSON authoring.

Multi-provider LLMs

Anthropic Claude, OpenAI GPT, and Google Gemini out of the box — swap providers in one line.

Framework-agnostic

Works with Express, Fastify, Hono, Next.js App Router, or raw Node. You choose the router.

SSE streaming

First-class message/stream support via Server-Sent Events. Clients just iterate.

Built-in authentication

API Key, Bearer, OAuth 2.0 (Code, ClientCredentials, Device), OIDC, and mutual TLS.

Zero runtime dependencies

Core module uses only Node.js built-ins. Bring the provider SDKs you actually need.

Every agent is a URL

Human-readable.
Machine-callable.

Expose your agent at /.well-known/agent.json and /a2a. Any A2A-compliant client can discover, authenticate, and stream from it — no bespoke glue.

  • GET /.well-known/agent.json — AgentCard discovery
  • POST /a2a — JSON-RPC (send, stream, get, cancel)
  • SSE stream over message/stream
  • v0.3 and v1.0 AgentCards from one instance
server.ts
import { LlmAgent, toA2x } from '@a2x/sdk';
import { GoogleProvider } from '@a2x/sdk/google';
 
const agent = new LlmAgent({
  name: 'my_assistant',
  description: 'A helpful assistant.',
  instruction: 'You are a helpful assistant.',
  provider: new GoogleProvider({
    model: 'gemini-2.5-flash',
    apiKey: process.env.GOOGLE_API_KEY!,
  }),
});
 
toA2x(agent, {
  port: 4000,
  defaultUrl: 'http://localhost:4000/a2a',
});
client.ts
import { A2XClient } from '@a2x/sdk/client';
 
const client = new A2XClient(
  'https://agent.example.com/.well-known/agent.json',
);
 
for await (const event of client.sendMessageStream({
  message: { role: 'user', parts: [{ text: 'Summarize today.' }] },
})) {
  console.log(event);
}

How it works

Publish · Register · Monetize

Three stops from source code to a discoverable, paid agent.

01

Publish over A2A

Expose any TypeScript agent with one call to toA2x(). Standard AgentCard, streaming, auth — all handled.

toA2x(agent, { port: 4000 })
Quickstart
02

List on the registry

Submit your AgentCard URL to registry.a2x.sh so callers can search by capability, tag, or payment network.

POST registry.a2x.sh/api/agents
Register your agent
03

Monetize with x402

Gate calls with HTTP 402 payments. On-chain settlement, per-call pricing, no middlemen.

402 → pay → retry
x402 in one page

The A2X ecosystem

One network. Many agents.

Everything you need to build, discover, and call A2A-compatible agents.

FAQ

Questions, answered.

What is A2A?+
A2A (Agent-to-Agent) is an open protocol for agents to discover and call each other. Every A2A agent publishes an AgentCard at /.well-known/agent.json and a JSON-RPC endpoint at /a2a.
Which LLM providers are supported?+
Anthropic Claude, OpenAI GPT, and Google Gemini ship in the box via @a2x/sdk/anthropic, @a2x/sdk/openai, and @a2x/sdk/google. You only install the provider SDK you use.
Can I use it with Next.js?+
Yes. DefaultRequestHandler returns plain values for JSON-RPC and an async iterable for SSE — drop both into a Next.js App Router route handler in a few lines.
What about authentication?+
A2X ships API Key, HTTP Bearer, OAuth 2.0 (Authorization Code, Client Credentials, Device Code), OpenID Connect, and mutual TLS. Mix and match with AND / OR security requirements.
Is it free?+
Yes. @a2x/sdk is MIT-licensed and open source on GitHub.

Publish your agent. Get paid per call.

Open your agent to the world with A2A, monetize every call with x402 — all from one TypeScript SDK.