Wwallie part of 1YC Wallie Cloud — €20/mo

Tutorial · 10 minutes

Give your agent its first allowance.

Six steps, every command actually works on your laptop. No wallet, no chain, no API keys, nothing to buy. By the last step you'll have watched an AI agent pay x402 APIs by itself — and watched your guardrails stop it from going rogue.

Step 0 · 30 sec

Make sure Node ≥ 24 is installed

This tutorial runs Wallie from a clone, as plain TypeScript that Node executes directly — no build step. That needs Node ≥ 24. If you would rather not clone anything, npx wallie works on Node ≥ 20.11 and needs no checkout at all.

terminal
node --version

You should see

v24.x.x
⚠️On v22/v23? Upgrade via nvm install 24 or brew. Use Node 24 or later for the source-based commands in this guide.
Step 1 · 1 min

Run the full story once

Before understanding parts, watch the whole movie: five priced APIs come up on localhost, an agent spends within a $5 allowance, a runaway loop trips the breaker, attacks get blocked, the kill switch freezes everything.

terminal
git clone https://github.com/fskroes/AllowanceKit.git wallie
cd wallie
npm run demo

You should see (abridged)

PAID    weather?city=lisbon   $0.001000  0xcddcb9a6…
PAID    research?topic=…      $0.250000  0x4e5bc352…
BLOCKED loop #150             velocity_circuit_breaker
BLOCKED evil-api.example.com  host_not_allowlisted
BLOCKED feed?key=pro          per_call_cap
spent $1.99 across 154 settled payments · 5 blocks enforced
🐷That transcript is the product pitch: fine-grained pay-per-use up, chaos contained. Keep scrolling while it's fresh.
Step 2 · 2 min

Understand what just happened

Every line maps to a real event in the append-only ledger at .allowance/ledger.jsonl. This file is deliberately boring: JSON lines, one decision each — which is exactly what an auditor wants.

Peek at the raw evidence

terminal
tail -5 .allowance/ledger.jsonl
LEDGER EVENTMEANING
topuphuman funded the allowance — the ceiling exists
paymentpolicy said yes → signed → settled → receipt stored
blockedpolicy said no — rule, reason and attempted price recorded
policy_changesomeone touched the rules (e.g. kill switch flipped)
Step 3 · 1 min

Fund a fresh allowance yourself

This time you're the human. Provision the wallet, load it, set one policy. These three commands are the entire "setup" experience — that's the point.

terminal
node src/cli.ts status
node src/cli.ts topup 2.00
node src/cli.ts policy perCallMaxUsd 0.25

You should see

topped up $2.000000 → remaining $5.007000
{ "perCallMaxUsd": 0.25, … }
💡Policies hot-reload: the next call reads the new file. No restart, no redeploy. Try node src/cli.ts policy killSwitch true, then flip it back.
Step 4 · 3 min

Write your own paying agent

One import replaces fetch. Save this as my-agent.ts in the repo root and run it — you just wrote an autonomous purchasing agent.

my-agent.ts
import { createAgent } from "./src/wallet.ts";
import { payingFetch } from "./src/payer.ts";
import { startSellerApis } from "./src/demo-servers.ts";
import { fmtUsdExact } from "./src/money.ts";

const rt = createAgent(new URL("./.allowance/", import.meta.url).pathname);
const apis = await startSellerApis(rt.chain);

const r = await payingFetch(rt.ctx, apis.weatherUrl("reykjavik"));
console.log("status:", r.status);
console.log("cost:  ", fmtUsdExact(r.costMicro));
console.log("tx:    ", r.txHash);
console.log("data:  ", r.body);

if (r.blockedBy) console.log("blocked by policy:", r.blockedBy.rule);
terminal
node my-agent.ts

You should see

status: 200
cost:   $0.001000
tx:     0x9f21ab77…
data:   { city: 'reykjavik', tempC: 1.2, conditions: 'rainy' }
⚠️Set perCallMaxUsd 0.25 in step 3? Then try calling apis.analystReportUrl("q3") ($0.45) — watch policy decline it before any payment is signed. That refusal is the feature.
Step 5 · 2 min

Watch it live, then hit the big red button

The dashboard reads the same ledger your agent writes. Open it in one tab, run spending in another, then flip the kill switch mid-flight and watch the next call die instantly.

terminal — leave running
node src/cli.ts dashboard
second terminal
node my-agent.ts

Then, in the dashboard

→ http://localhost:4030
→ press  [ KILL SWITCH: OFF ]  → becomes  KILL SWITCH: ON — spending frozen
→ re-run node my-agent.ts
→ blocked: kill_switch · human paused all spending for this agent
🧾Flip it back off. Then run node src/cli.ts audit — inspect the local payment and policy-decision history. Protect and back up those files according to your needs.
Step 6 · read

You did it — here's the road to real money

Everything so far settled on Wallie's deterministic mock ledger — on purpose, so you learned with zero risk. The included live buyer runtime handles signing. Seller integrations use a facilitator behind this interface:

src/chain.ts — the only seam
interface Facilitator {
  verify(payment: PaymentPayload): Promise<VerifyResult>;
  settle(payment: PaymentPayload): Promise<SettleResult>;
}
🛣️Public roadmap: Coinbase CDP facilitator adapter (USDC on Base) ✓ → npm package ✓ → mainnet-proven ✓ → Wallie Cloud (alerts + silent-agent watchdog) ✓ → next: approve-from-phone, compliance exports. Subscribe for early access.
Step 7 · 5 min · real testnet money

Go live on Base Sepolia

Same runtime, same rails — but now payments settle in real USDC on a real chain. Base Sepolia is a free testnet, so you prove the whole path with faucet money before risking a cent. Your wallet key is read from the environment and never written to disk.

terminal — human, one time
# your wallet key — read from the env, never written to disk
export AGENT_PRIVATE_KEY=0x...
allowance-kit init --live --network base-sepolia
allowance-kit topup 5.00
allowance-kit policy perCallMaxUsd 0.10
allowance-kit pay https://some-live-x402-api.com/data
🚰After init --live the CLI prints your agent's wallet address. Send it test USDC from a Base Sepolia faucet — faucet.circle.com — before you topup. The allowance is the ceiling you permit; the USDC is the money the wallet actually holds. Both are enforced.

You should see

REAL MONEY — payments settle in USDC on base-sepolia
topped up $5.000000 → ceiling raised (nothing moved on-chain)
{ "perCallMaxUsd": 0.10, … }
PAID    /data    $0.001000    0x…    (exit 0)
⚠️Every live command now carries the REAL MONEY banner. Signing needs the optional peer dependency viem (npm i viem); run allowance-kit doctor to check Node, viem, the key, RPC and permissions first. pay exits 0 on a paid call, 2 on a policy block, 1 on error.

Mainnet is one flag and a confirmation — allowance-kit init --live --network base (it asks you to type base back). This is not theoretical: Wallie settled a real USDC payment on Base mainnet on 2026-09-07 — see the transaction on BaseScan.

Step 8 · 2 min

Get told when it stops

A dashboard only helps someone who is looking at it — the runs that hurt happen overnight. Connect the agent to Wallie Cloud and every decision plus a 60-second heartbeat streams up. If the heartbeats stop, the cloud tells you the agent went silent.

terminal
allowance-kit notify cloud wk_live_...
export WALLIE_CLOUD_KEY=wk_live_...
allowance-kit notify test

You should see

cloud set — every decision and a heartbeat go to api.onewallie.com
delivered  cloud     connected as your workspace
📡Your workspace key (wk_live_… or wk_test_…) comes in your Wallie Cloud welcome email; it is never written to disk, only read from WALLIE_CLOUD_KEY at send time, so notifications.json stays safe to paste in a bug report. Create and test an email rule in the account app to receive selected events, silence alerts, and recovery alerts. A wk_test_ key identifies a test workspace; it does not prove a live Stripe charge.

That's the whole piggy bank. 🐷✨

You provisioned an allowance, wrote an agent that pays x402 APIs autonomously, enforced six rails, and kept the receipts.

Proof of work

The commands ship what's on-chain.

You ran the runtime on your laptop with practice money. The same runtime settled these payments on public chains. Nothing here is a screenshot you cannot open yourself.

Practice-money demos are labelled as such; live settlements link to a public explorer.