The FianzaAgent SDK — the interface an AI agent uses to take and repay revenue-underwritten, uncollateralized USDC credit on Stellar. The agent holds its own key and drives the whole loop: register → underwrite → borrow → repay, plus draw-on-402 (auto-borrow a shortfall, then pay an x402-priced API). Available in both JavaScript/TypeScript and Python, with the same lifecycle, backend, and on-chain contracts.
Install
JavaScript / TypeScript — npm
npm install @fianza/agent-sdkPython — PyPI
pip install fianza-agent-sdkWhat's in the SDK
- Full credit lifecycle:
register,underwrite,onboard,borrow,repay,deposit - Live on-chain reads:
creditLine/credit_line,vaultState/vault_state,availableCreditUsdc,usdcBalanceUsdc - Draw-on-402 (
payWithCredit/pay_with_credit): pay for an x402 resource, borrowing any shortfall first — the agent never "decides to borrow", it just transacts - Typed errors (
ValidationError,ApiError,TxError,MaxDrawExceededError) - Pure helpers: stroop conversion, address validation, shortfall math
Build with Claude
There's an official Claude Code skill that teaches Claude to drive the SDK (both languages). One command:
npx @fianza/skillDocs
Full reference, onboarding kit, and the credit-engine internals: https://docs.fianza.space
Testnet. Fianza runs on Stellar testnet — a real, working, adversarially-tested prototype, not a production lending product with real funds. USDC settles via the SEP-41 Stellar Asset Contract.