x402Guard/ElizaOS Agent Security
ElizaOS · Non-Custodial · Base + Solana

ElizaOS Agent Security
with Non-Custodial Guardrails

x402Guard adds a non-custodial safety layer between your ElizaOS agent and the blockchain — enforcing spend limits, contract whitelists, and session keys without ever taking custody of your funds.

The problem with unguarded ElizaOS agents

No spend cap

A buggy prompt or compromised tool can instruct your agent to drain its entire wallet in one transaction.

No contract control

Nothing stops your agent from paying a malicious contract address injected via prompt manipulation.

No audit trail

When something goes wrong, you have no log of what the agent tried to do or why funds moved.

What x402Guard adds to your ElizaOS agent

Per-transaction spend limits

Cap how much USDC your ElizaOS agent can spend in a single x402 transaction. If the agent tries to pay more, x402Guard blocks it at the proxy layer — no on-chain transaction is ever submitted.

Contract address whitelist

Explicitly approve which smart contract addresses your ElizaOS agent is allowed to interact with. Any payment attempt to an unapproved address is rejected before it reaches the network.

Auto-expiring session keys

EIP-7702 session keys give your ElizaOS agent limited signing authority that expires automatically. When the session ends, the key is revoked — your main wallet is never exposed.

Immutable audit log

Every payment attempt — approved or blocked — is logged in an append-only audit trail. See exactly what your ElizaOS agent tried to spend, when, and why it was allowed or rejected.

How to add guardrails to your ElizaOS agent

1

Install the x402Guard ElizaOS plugin

npm install @x402guard/elizaos-plugin
2

Configure your guardrail rules

// elizaos.config.ts
x402Guard: {
  proxyUrl: "https://your-guard.x402guard.dev",
  spendLimitPerTx: "1.00",   // USDC
  dailySpendLimit: "10.00",  // USDC
  allowedContracts: ["0x..."],
}
3

Your agent runs, guardrails enforce

// Every x402 payment goes through x402Guard
// Exceeds limit? Blocked. Unknown contract? Blocked.
// Clean payment? Forwarded. All logged.

Non-custodial by design

x402Guard never holds your private keys

Guardrails run server-side, funds stay on-chain

Open-source — audit the code yourself

Every decision is logged and queryable

Protect your ElizaOS agent today

Set up guardrail rules in minutes. Free and open-source under MIT License.

© 2026 x402Guard. Open source under MIT License.