Skip to main content
All use cases
TreasuryOperations

The float refills itself, under the same mandate.

When the BRL slot drops below its floor, the agent mints a dynamic Pix charge against the funding source and tops the wallet up. Same mandate, same caps. Payouts never stall at 2am because the float ran dry.

BeforeManual top-ups, payouts stall on empty
AfterAuto top-up on the floor, always liquid
0 stalls
float keeps itself liquid
Try it in the Sandbox
0 stalls
Float
Refills itself before it runs dry
On the floor
Triggered
Tops up the moment the slot dips below the floor
Same mandate
Governed
Top-up runs inside the caps already signed
Dynamic Pix
Funded
Charge minted against the funding source
What the agent does

Float dips, agent tops it up.

The agent watches the BRL slot. When it drops below the floor, it mints a dynamic Pix charge against the funding source, tops the wallet up under the same mandate, and payouts keep flowing.

  • Watches the BRL slot against a floor you set
  • Mints a dynamic Pix copia-e-cola against the funding source
  • Top-up runs under the same mandate and caps
  • Payouts never stall waiting for a manual refill
Wallet · BRL slot
Auto top-up · on
Agent
BRL slot at R$ 180, below the R$ 500 floor. Topping up.
via codespar_charge · Pix rail
Minted a dynamic Pix for R$ 1.000 against the funding source.
Pix · Funding sourceR$ 1.000,00
00020126…5204
Paid. Slot back to R$ 1.180. Payouts resume.
RailPix · dynamic charge
Mandatesame as payouts
AmountR$ 1.000,00
topped up · under mandatercp_topup01
The pain

The conversation is the easy part.

Payout floats run dry at the worst time. Someone tops them up by hand, and until they do, every payout waits.

Watch the balance and top up by hand

The agent tops up automatically when the slot hits its floor

Payouts stall at 2am when the float runs dry

The float refills itself, so payouts never wait

Wire a top-up and reconcile it later

A dynamic Pix charge funds the slot, sealed to the mandate

Set the top-up outside your spend controls

The refill runs inside the same mandate and caps

How the agent does it

A float that keeps itself liquid.

The agent holds the BRL slot above a floor you set. When it dips, codespar_charge mints a dynamic Pix against the funding source and tops it up, under the same mandate that governs every payout.

01
Watch
Wallet

BRL slot vs floor

02
Dip
Threshold

Slot below the floor

03
Mint
codespar_charge

Dynamic Pix charge

Pix rail
04
Top up
Funding source

Slot refilled

05
Seal
Audit ledger

Receipt to the mandate

Architecture

The agent monitors the BRL wallet slot. When the balance crosses the floor, it calls codespar_charge to mint a dynamic Pix against the configured funding source. The top-up settles into the slot under the same mandate and caps, and the receipt is sealed so the refill reconciles against the payouts it enabled.

In code

A few lines. The whole loop.

wallet-auto-topup.ts
const session = await codespar.sessions.create();

// keep the BRL payout slot above its floor
if (wallet.brl.balance < wallet.brl.floor) {
  // mint a dynamic Pix against the funding source, under the same mandate
  const topup = await session.execute("codespar_charge", {
    rail: "pix",
    amount: wallet.brl.topupAmount,
    source: "funding-source",
  });

  await session.verificationStatus(topup.toolCallId); // sealed to the mandate
}
0 stalls · sealedreceipt · rcp_wallet
Featured tools
codespar_charge

Mints a dynamic Pix charge against the funding source to top up the slot.

Wallet (BRL slot)

Holds the payout float; the agent keeps it above a floor you set.

Audit ledger

Seals the top-up so the refill reconciles against the payouts it enabled.

See the meta-tool reference
MCP servers wired

Ship it this afternoon.

Open the sandbox, point a session at your providers, and run the whole loop against real rails in minutes — not the quarter it takes to build it by hand.

Auto top-up — CodeSpar | CodeSpar