Skip to content

SweeFiGive your AI agents a budget, not a blank check.

Five payment schemes on Sui with on-chain spending controls. 42 PTB builders. AP2 mandates. L0-L3 authorization levels. From one-shot payments to prepaid agent budgets — all open source.

See It in Action

An AI agent hits a paid API. The server says "pay me." The agent pays within its mandate budget, gets the data, and produces an on-chain receipt. Three HTTP round-trips, zero human intervention.

typescript
import { createS402Client } from '@sweefi/sui';
import { Ed25519Keypair } from '@mysten/sui/keypairs/ed25519';

const wallet = Ed25519Keypair.fromSecretKey(myKey);
const client = createS402Client({ wallet, network: 'sui:testnet' });

// Any fetch to a 402-gated endpoint auto-pays
const data = await client.fetch('https://api.example.com/premium-data');
// 402 → auto-sign SUI payment → retry with proof → receive data

SweeFi handles the s402 negotiation, PTB construction, signing, and settlement. You bring a Sui keypair and a mandate. The agent operates within your spending bounds.


v0.1.0 · 7 published packages · 1,073 tests (264 Move + 809 TS) · 10 Move modules · Apache 2.0 · Built on s402 and Sui

Released under the Apache 2.0 License.