The payment layer for autonomous AI agents
Pay for any API. Get paid for yours.
Agents, MCP tools, and APIs supported. Payments settled in USDC on Stellar.
Tael is a programmable payment layer that lets autonomous AI agents purchase APIs, MCP tools, datasets, and digital services using USDC on Stellar. Developers wrap any HTTP handler with one SDK call to monetize it; agents discover those capabilities, pay per request within user-defined spending policies, and keep working without a human in the loop.
It speaks the open x402 / HTTP 402 standard, so a paid endpoint is just a normal web request with a payment attached.
AI agents can reason, plan, and act — but they still can't pay for the services they need. Every paid API assumes a human with a credit card. Tael closes that gap.
-
Agents pay per call, not per subscription. No accounts, no API-key juggling, no monthly plans. An agent settles a micropayment for exactly what it uses, and continues.
-
Developers monetize in one line. Wrap an existing handler with
tael()and get paid in USDC on every call — no Stripe, no billing logic, no invoices, no customer accounts. -
Spending stays under control. Every agent runs on a funded hot wallet with on-chain caps (max-per-call + rolling limits), so autonomy never means a blank cheque.
Agent calls a capability
│
▼
HTTP 402 Payment Required ← the gateway returns a payment challenge
│
▼
Agent signs a USDC payment ← within its spending policy
│
▼
Settles on Stellar ← verified on-chain before anything runs
│
▼
Handler executes → response + signed receipt
Payment is verified on-chain before your handler runs, and a signed X-PAYMENT-RESPONSE receipt is
returned with the response. Settlement is non-custodial: the agent pays the builder and a 1% protocol
fee in a single transaction.
Wrap any Fetch handler in one call. Because it speaks the Web Request/Response standard, it drops
into Hono, Next.js route handlers, Bun, Deno, and Cloudflare Workers unchanged.
import { tael } from "@tael/sdk";
// Every call now requires a $0.02 USDC payment before `myApi` runs.
export default tael({
price: "0.02",
handler: myApi,
});That's it — no billing, no Stripe, no customer accounts. Just get paid every time your API is called.
From the dashboard: create an agent, fund its hot wallet with USDC, and set a spending policy (max-per-call + a rolling limit). The agent then discovers capabilities in the marketplace and pays for them autonomously — each call settles on-chain, within the caps you set, and shows up in your ledger.
A Turborepo + pnpm monorepo. The payment engine is chain-agnostic; Stellar is the first settlement backend.
| Package | What it does |
|---|---|
@tael/sdk |
Buy, publish, and sell capabilities from code: the Tael client + the tael() wrapper |
@tael/payments |
x402 protocol wire format + non-custodial fee split |
@tael/stellar |
Stellar settlement + the hardened on-chain payment verifier |
@tael/types |
Money value object, zod schemas, shared errors |
@tael/auth |
Sign-In-With-Stellar sessions (edge-safe, jose) |
@tael/database |
Drizzle schema + AES-256-GCM secret encryption |
@tael/ui |
Shared React components (shadcn/ui-based) |
@tael/config |
Shared TypeScript / Tailwind / ESLint config |
@tael/claude |
AI helpers (e.g. capability FAQ generation) |
Apps: web (marketing site), dashboard (the console), api (the capability gateway).
git clone https://github.com/tael-protocol/tael.git
cd tael-protocol
pnpm install
cp .env.example .env # add your keys (Stellar, database, auth secret)
pnpm dev # runs the web, dashboard, and api in parallelUseful scripts:
pnpm build # build every app and package
pnpm test # run the test suites
pnpm typecheck # type-check the whole monorepo
pnpm format # format with PrettierFull docs live at taelprotocol.xyz/docs — the SDK, accepting payments, spending policies, and the gateway.
- Discord — join the community
- X — @taelprotocol
- Docs — taelprotocol.xyz/docs
Note
We value contributions. For questions or support, join our Discord community.
Bug fixes and small improvements are the best way to get started. For larger features, please open an issue or reach out on Discord first so we can make sure it aligns with the roadmap.
Licensed under the MIT License.