DEV Community

Cover image for Your OpenClaw Agent Can Now Spend Money. Here's How to Stop It From Going Broke.
Maxim Berg
Maxim Berg

Posted on

Your OpenClaw Agent Can Now Spend Money. Here's How to Stop It From Going Broke.

OpenClaw has 352,000 GitHub stars. 13,700 skills. 23 messaging channels. And zero spending controls.

That was fine when agents could only send messages and browse the web. But Stripe and Tempo launched the Machine Payments Protocol. Visa rolled out its Agentic Ready program for agent-initiated transactions. OpenAI experimented with Instant Checkout in ChatGPT before pivoting to product discovery. The direction is clear — your OpenClaw agent is about to get a credit card.

And right now, if you ask it "please don't spend too much" — you're relying on a language model to enforce a budget.

That's not a guardrail. That's a prayer.

"Don't spend more than $50" is not a spending limit

Let's try an experiment. Put this in your SOUL.md:

"Never spend more than $50 per day. Always ask before purchasing anything over $20."

Now imagine your agent is three tools deep in a workflow chain. A skill calls another skill which calls a third one that hits a payment API. How confident are you that your $50 rule survived the game of telephone?

LLMs hallucinate. They reinterpret. They "round down creatively." Your agent might genuinely believe that two $45 purchases don't violate a $50 daily limit because they were in different categories.

Prompt-based limits are suggestions. You need enforcement that happens outside the LLM's context window entirely — a server-side check that doesn't care what the model thinks.

What actually works: deterministic pre-authorization

Here's the idea: before the agent spends money, it asks a server. The server checks rules. Math, not vibes.

I built LetAgentPay to do exactly this. It's a policy engine that sits between your OpenClaw agent and any purchase. The agent sends a request, 8 deterministic checks run, and one of three things happens:

You (in Telegram): "Buy me a Notion subscription for $10/month"
     │
     ▼
OpenClaw agent
     │ calls MCP tool "request_purchase"
     ▼
LetAgentPay Policy Engine
     │
     ├─ ✅ auto_approved → agent proceeds with purchase
     ├─ ⏳ pending → you get notified, approve/reject from dashboard
     └─ ❌ rejected → agent gets exact reason ("daily limit exceeded")
Enter fullscreen mode Exit fullscreen mode

The 8 checks, in order:

  1. Agent status — is this agent even active?
  2. Category — is "crypto_trading" in the allowed list? (spoiler: probably not)
  3. Per-request cap — $10,000 for "office supplies"? Nice try.
  4. Schedule — no 3 AM impulse purchases
  5. Daily limit — spending cap resets at midnight
  6. Weekly limit — for the persistent ones
  7. Monthly limit — the bigger picture
  8. Total budget — hard ceiling, game over

No LLM in the decision loop. No prompt that can be jailbroken. Pure if/else on a server your agent doesn't control.

Setup: 5 minutes, 2 files

Step 1. Get a free agent token at letagentpay.com (or self-hostdocker compose up and you're done).

Step 2. Add the MCP server to ~/.openclaw/config.json:

{
  "mcpServers": {
    "letagentpay": {
      "command": "npx",
      "args": ["-y", "letagentpay-mcp"],
      "env": {
        "LETAGENTPAY_TOKEN": "agt_your_token"
      }
    }
  }
}
Enter fullscreen mode Exit fullscreen mode

Step 3. Install the skill:

git clone https://github.com/LetAgentPay/letagentpay-openclaw /tmp/letagentpay-skill
cp -r /tmp/letagentpay-skill ~/.openclaw/workspace/skills/letagentpay
Enter fullscreen mode Exit fullscreen mode

That's it. Your agent now asks permission before every purchase.

What this looks like in practice

You tell your agent: "Subscribe to Notion for $10/month."

Behind the scenes:

  1. The agent calls request_purchase with amount: 10.0, category: "software", description: "Notion monthly subscription"
  2. The policy engine checks all 8 rules against your policy
  3. Your policy says "auto-approve software under $20" → instant green light
  4. The agent completes the purchase and confirms it back

Now try: "Buy me a $500 drone for aerial photography."

  1. Same flow, amount: 500.0, category: "electronics"
  2. Policy check: per-request cap is $100 → rejected
  3. Agent tells you: "Purchase rejected — exceeds per-request limit of $100"
  4. No money moved. No "oops, I already bought it." No refund dance.

The difference? When the check happens on the server, the agent literally cannot override it. The token (agt_) only allows submitting requests and reading results — it cannot modify policies, approve its own purchases, or access another agent's budget.

"But I don't speak JSON"

You don't have to. Write your policy in plain English:

"Auto-approve groceries and food under $50. Block electronics entirely. Daily limit $200. No purchases between midnight and 6 AM."

LetAgentPay converts this to structured JSON policy via Claude API. You get the readability of natural language with the enforcement of a deterministic engine.

You can always fine-tune the JSON directly, but most people never need to.

Let's talk about what this isn't

I want to be honest about the security model.

LetAgentPay is cooperative enforcement — think corporate expense policy, not a bank vault. The policy engine runs on our server, and the agent can't modify its own rules. But if an agent has direct access to raw payment credentials (Stripe keys in env vars, saved credit card numbers), it could bypass the system entirely.

The fix is simple: don't give your agent payment credentials. LetAgentPay should be the only path to spending money. That's it. One rule.

This is exactly how corporate cards work — employees don't have access to the company's bank account, they have a card with limits. Same idea, digital version.

What's coming next: When Stripe MPP and Visa Agentic Ready stabilize, LetAgentPay will become a full payment gateway — the agent physically won't have payment credentials. Cooperative enforcement today, hard enforcement tomorrow.

Try it right now

No signup needed: letagentpay.com/playground — a 15-minute sandbox with a pre-configured agent. Try to overspend. Watch it get rejected. Break things.

Self-host: git clone https://github.com/LetAgentPay/letagentpay && docker compose up

Cloud: free at letagentpay.com

SDKs: Python · TypeScript · MCP Server · OpenClaw Skill

Open source (BSL 1.1). Built with FastAPI, PostgreSQL, Redis, Next.js 15.


Your agent is about to get a credit card. The question isn't if — it's whether you'll have spending controls in place when it does.

What's your current approach to agent spending? Prompt-based? Manual review? Nothing yet? I'd genuinely love to hear — the space is new enough that everyone's figuring it out.

Top comments (0)