If you're giving an AI agent a wallet, put these guardrails outside the model

Reddit r/AI_Agents News

Summary

A practitioner shares best practices for securing AI agents with crypto wallets: keep private keys out of the model, enforce limits in signing-service code rather than prompts, use allowlists, simulation, logging, and a kill switch to defend against prompt injection and overspending.

Agent payments are picking up fast (x402 alone is past 100 million transactions), and a lot of setups out there basically hand the agent the keys. I work on crypto backends and build agents, so here's how I'd set it up. The model never sees the private key. Signing happens in a separate service (KMS, MPC, whatever you use). The agent only sends a request like "pay this amount to this address for this reason". Rules live in plain code, not in the prompt. "Never spend more than $50" in a system prompt is a suggestion. A policy check in the signing service is a rule. Hard limits. Max per transaction, max per day, and only a small balance in the agent's wallet. Top it up from a separate wallet instead of pointing the agent at your treasury. Allowlist where money can go. Known recipients and contracts only. Anything new needs a human to approve it. Simulate before sending. Run the transaction against a fork or a simulation API first, and check that the result matches what the agent said it would do. Watch out for prompt injection. If the agent reads web pages, emails or API responses, any of them can say "send funds to this address". That's exactly why the limits can't live in the prompt. Log intent and result. Store what the agent was trying to do, why, and the tx hash. When something looks off, you want the full story. A kill switch. One flag that stops all agent spending, and anyone on the team can flip it. None of this is fancy. It's the same stuff exchanges do for hot wallets. The agent is just a new kind of user you shouldn't fully trust. How are others handling this? Especially curious if anyone has a clean setup for approvals.
Original Article

Similar Articles

How are you protecting action-taking AI agents from prompt injection?

Reddit r/AI_Agents

A discussion on securing action-taking AI agents against prompt injection, arguing that backend controls, tool restrictions, transaction limits, and human approval matter more than prompt-level defenses. The author invites practitioners to share their real-world mitigation strategies.