The payment layer forAI agents.
AI agents can reason and call tools — but they can't pay for help. When your agent needs another agent, a GPU service, or a premium API, there's no clean payment layer that fits autonomous software. Human billing workflows and manual approvals break the flow. Oryn fixes that: a simple SDK that lets agents hold wallets, pay other agents in USDC, and settle on Base automatically.
The payment layer sitting underneath your agent workflow.
Connect a wallet, register an agent identity, call pay() when your workflow decides money should move. Works across Claude, GPT, and open-source stacks — Oryn is not tied to a model provider.
- Agents can call tools, but they cannot pay other services cleanly
- Every external dependency gets hardwired behind API keys or manual billing
- Cross-team or cross-company agent workflows break at the payment step
- Developers end up stitching together wallets, contracts, and transfer logic themselves
- Small autonomous payments are operationally awkward without a dedicated rail
- Register each agent with an onchain identity your code can address
- Let agents send and receive USDC automatically inside real workflows
- Pay other agents, tools, or infrastructure when work is delegated
- Keep settlement on Base with simple SDK calls and clear onchain records
- Start with small, safe, task-sized payments under the v1 cap
Three calls. Agent payments working.
Register
Call registerAgent(id) to give an agent wallet an identity like "claude-agent-001" or "compute-agent-001". Your workflow can now refer to agents by name instead of raw addresses.
Pay
Call pay(from, to, amount) when one agent needs to buy work from another agent, or pay for a tool, API, or piece of infrastructure. The SDK handles USDC approval automatically.
Settle
USDC settles on Base in seconds. The recipient gets paid, the protocol fee is routed automatically, and the transaction is visible onchain for both operators to verify.
From zero to your first payment in minutes
Start on Base Sepolia — free testnet USDC, no real money. Use the live Oryn contract address below or deploy your own contract if you want separate treasury and owner settings. Then register the sender and recipient from their own wallets and send payments with a single SDK call. If you want full Claude, OpenAI, and plain Node walkthroughs, open the examples page.
In v1, each wallet can only register one permanent agent ID. If your system has multiple agents (a planner agent and a compute agent, for example), each needs its own wallet and its own private key. Use PRIVATE_KEY for the sender and a separate RECIPIENT_PRIVATE_KEY for the receiver — this is intentional design, not example scaffolding.
# Install
npm install @oryn/sdk ethers
# Environment variables
PRIVATE_KEY=0x...
BASE_SEPOLIA_RPC_URL=https://sepolia.base.org
ORYN_PAYMENT_CONTRACT_ADDRESS=0x...
USDC_ADDRESS=0x036CbD53842c5426634e7929541eC2318f3dCF7e
import { OrynSDK } from "@oryn/sdk";
const sdk = new OrynSDK({
contractAddress: process.env.ORYN_PAYMENT_CONTRACT_ADDRESS!,
usdcAddress: "0x036CbD53842c5426634e7929541eC2318f3dCF7e",
chainId: 84532 // Base Sepolia — change to 8453 for mainnet
});
await sdk.connect(process.env.PRIVATE_KEY!, process.env.BASE_SEPOLIA_RPC_URL!);
// Register the connected wallet once with a permanent agent ID
// Each wallet can only claim one agent ID in v1
await sdk.registerAgent("claude-agent-001");
console.log("Agent registered — ready to send and receive USDC");
// Send a payment — triggers from your backend logic
// USDC approval is handled automatically by the SDK
// "compute-agent-001" must already be registered by the receiving wallet
const receipt = await sdk.pay(
"claude-agent-001", // who's paying
"compute-agent-001", // who receives
0.50 // USDC — capped at $100 in v1
);
console.log(`Paid 0.50 USDC to compute-agent-001. Tx: ${receipt.hash}`);
// Check balances at any time
const balance = await sdk.getBalance("compute-agent-001");
console.log(`compute-agent-001 balance: ${balance} USDC`);
// Estimate the 0.3% fee before sending
const fee = await sdk.estimateFee(0.50);
console.log(`Fee: ${fee} USDC`);
// Real example: an AI agent that decides whether to delegate compute,
// then pays only if it does — no human approval needed
import Anthropic from "@anthropic-ai/sdk";
import { OrynSDK } from "@oryn/sdk";
const anthropic = new Anthropic({ apiKey: process.env.ANTHROPIC_API_KEY! });
const oryn = new OrynSDK({ contractAddress: process.env.ORYN_PAYMENT_CONTRACT_ADDRESS!, chainId: 84532 });
await oryn.connect(process.env.PRIVATE_KEY!, process.env.BASE_SEPOLIA_RPC_URL!);
// Ask Claude whether this task needs outside compute
const task = "Review this PR — can you handle this, or should we delegate to compute-agent?";
const response = await anthropic.messages.create({
model: "claude-3-5-haiku-latest",
max_tokens: 500,
messages: [{ role: "user", content: task }]
});
const needsDelegation = response.content[0].text.toLowerCase().includes("delegate");
// Only pay if the model decided to delegate — payment is conditional, not automatic
// Both agents must already be registered and able to settle in USDC on Base
if (needsDelegation) {
const receipt = await oryn.pay(
"claude-agent-001",
"compute-agent-001",
0.50
);
console.log(`Delegated and paid. Tx: ${receipt.hash}`);
} else {
console.log("Handled locally — no payment needed.");
}
Your agent needs outside capability to finish the job.
It may need live search, web extraction, or model inference. Without Oryn, you stop and wire up billing manually. With Oryn, the agent pays a service and keeps going.
pay("research-agent", "search-service", 0.50)The full API — six methods
| Method | Parameters | Returns | What it does |
|---|---|---|---|
| connect | privateKey, rpcUrl | Promise<void> | Connect your wallet to Base. Call this once on startup. |
| registerAgent | agentId: string | Promise<TransactionReceipt> | Give a wallet a permanent onchain name. In v1, each wallet can register only once. |
| pay | from, to, amountUSDC | Promise<TransactionReceipt> | Send USDC between two registered wallets. Handles USDC approval automatically. Capped at $100 in v1. |
| getAgentAddress | agentId: string | Promise<string> | Look up the onchain address behind a registered name. |
| getBalance | agentId: string | Promise<number> | Get the USDC balance of any registered wallet in human-readable units. |
| estimateFee | amountUSDC: number | Promise<number> | Calculate the 0.3% fee for an amount before sending. Reads live from the contract. |
Running on Base
Oryn runs on Base with USDC as the settlement asset. Base Sepolia is available for testing, and v1 beta is now live on Base mainnet for real agent payments with the current safety cap.
Most developers should start with the live Oryn contract addresses below. If you want your own treasury, owner, or isolated deployment, you can deploy OrynPayment yourself using the script in the SDK repo.
Note: The OrynPayment contract address is the same on mainnet and Sepolia — this is intentional. The same contract bytecode is deployed at the same address on both networks via a deterministic deployment. Use chainId in the SDK config to point to the right network.
v1 beta is live on Base mainnet with a $100 per-payment cap as a safety limit. The API surface is stable — no breaking changes without notice. The contract is deployed and permanent on both networks. What may change: the payment cap, fee rate, and SDK features. Watch the repo for updates.