Trusted by
Everything your agents need to build on Stellar
Create DevKit App
Scaffold Agent Kit or x402 API in one command. Copy .env and run.
Stellar Agent Kit
Payments, DEX quotes & swaps (SoroSwap), lending (Blend), oracles (Reflector).
x402 Stellar SDK
HTTP 402 middleware and x402Fetch. Monetize APIs with Stellar.
Stellar DevKit MCP
Contract IDs, SDK snippets, live quotes. Cursor and Claude.
Notifications
Get notified when someone shares a file or mentions you in a comment.
| 1 | import { StellarAgentKit, MAINNET_ASSETS } from "stellar-agent-kit"; |
| 2 | const secretKey = process.env.SECRET_KEY; |
| 3 | if (!secretKey) throw new Error("SECRET_KEY is required. Set it in .env or .env.local."); |
| 4 | const agent = new StellarAgentKit(secretKey, "mainnet"); |
| 5 | await agent.initialize(); |
| 6 | |
| 7 | // Get a swap quote (1 XLM → USDC, 7 decimals) |
| 8 | const quote = await agent.dexGetQuote( |
| 9 | { contractId: MAINNET_ASSETS.XLM.contractId }, |
| 10 | { contractId: MAINNET_ASSETS.USDC.contractId }, |
| 11 | "10000000" |
| 12 | ); |
| 13 | const result = await agent.dexSwap(quote); |
| 14 | console.log(result.hash); |
TRY IT OUT FOR YOURSELF
Run the SDK in Node or the browser. Get a quote, build a swap, then sign with Freighter or the CLI.
READY-MADE STELLAR COMPONENTS
Drop in address inputs, balance displays, swap quote cards, and payment modals. Built for the Stellar ecosystem — connect Freighter and go.
Address Input
Shows Stellar account identicons and truncates public keys. Supports paste, validation, and copy.
Swap Quote
10 XLM
You pay
1.12 USDC
You receive
Route: SoroSwap · Slippage 0.5% · Estimated fee 0.001 XLM


