Everything your agents need to build on Stellar
Unified SDK
Stellar Agent Kit
Payments, DEX quotes & swaps (SoroSwap), lending (Blend), oracles (Reflector).
Monetization
x402 Stellar SDK
HTTP 402 middleware and x402Fetch. Monetize APIs with Stellar.
Scaffolding
Create DevKit App
Scaffold Agent Kit or x402 API in one command. Copy .env and run.
MCP Server
Stellar DevKit MCP
Contract IDs, SDK snippets, live quotes. Cursor and Claude.
PROTOCOLS INTEGRATED
Explore the leading protocols integrated with Stellar DevKit.
| 1 | import { StellarAgentKit, MAINNET_ASSETS } from "stellar-agent-kit" |
| 2 | |
| 3 | const agent = new StellarAgentKit(process.env.SECRET_KEY, "mainnet") |
| 4 | await agent.initialize() |
| 5 | |
| 6 | // Get a swap quote (1 XLM → USDC) |
| 7 | const quote = await agent.dexGetQuote( |
| 8 | { contractId: MAINNET_ASSETS.XLM.contractId }, |
| 9 | { contractId: MAINNET_ASSETS.USDC.contractId }, |
| 10 | "10000000" |
| 11 | ) |
| 12 | const result = await agent.dexSwap(quote) |
| 13 | 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.
Take me to the code >>CAPABILITIES
Use the CLI agent (balance, pay, chat with tools) or build your own flow with the SDK. Swap and Send in the browser with Freighter—no secret key in the client.
Balance
Check balance
Get native + trustline balances via Horizon. Use agent.getBalances() or the CLI.
DEX
Swap assets
DEX swaps via SoroSwap. dexGetQuote + dexSwap, or try the in-browser Swap with Freighter.
Payments
Payments & path payments
Send XLM or custom assets; create accounts; path payments via StellarAgentKit or CLI pay.
x402
Paywalled APIs
Protect routes with Stellar payment. Server returns 402; client pays with x402Fetch and payWithStellar.
