---
title: "AI Agent Wallet Security: Sign Without the Key | 1Claw"
description: "AI agents holding private keys is the biggest risk in crypto automation. 1claw Intents API signs transactions inside a TEE. The agent never sees the key."
canonical: "https://1claw.co/ai-agent-wallet-security"
---

# AI agent wallet security solved by hardware

When AI agents hold private keys, one prompt injection drains the wallet. 1claw's Intents API keeps signing keys inside a Trusted Execution Environment. Your agent submits intents and never touches keys.

[Learn about Intents API](https://1claw.co/intents)[Start free](https://1claw.co/login)

Intents API available on Business and Enterprise plans. Start free to explore the vault.

\[ THREAT MODEL \]

## Why AI agents holding private keys is dangerous

The promise of AI agents in crypto is autonomy: agents that can trade, rebalance, bridge, and manage DeFi positions without human intervention. But every current implementation shares the same fatal flaw: the agent has the private key.

A private key in agent memory is a single point of failure. Unlike a password, there's no recovery mechanism. Unlike a credit card, there's no chargeback. One compromised key means complete, irreversible loss of funds.

- Prompt injection. An agent processing untrusted input (web3 event data, oracle responses, user messages) can be tricked into executing arbitrary transactions. If it holds the key, it can sign anything.
- Memory dumps and logging. Keys stored in `process.env` or runtime variables can be extracted via error logs, crash dumps, or debugging tools.
- Supply chain attacks. A compromised npm package or Python dependency in the agent's stack can read environment variables and exfiltrate keys silently.
- No guardrails. With direct key access, there's nothing preventing the agent from sending the entire wallet balance to an attacker's address in a single transaction.

agent.py: key in memoryextractable

\# Typical DeFi agent pattern

from web3 import Web3

w3 \= Web3("https://rpc.example.com")

acct \= w3.eth.account.from\_key(

os.environ\["PRIVATE\_KEY"\]

)

The private key is now in process memory. Any code in this process, including compromised dependencies, can read it.

\[ TEE \]

## Keys stay in the TEE, agents submit intents

Agents with `intents_require_tee` sign inside Shroud, a Confidential GKE cluster (AMD SEV-SNP): the KMS-wrapped key is unwrapped only in TEE memory, the TEE signs and broadcasts, and the agent never sees the key. Every other agent signs in the vault after the same policy checks. And for wallets 1Claw must not be able to sign with alone, a passkey holds the other half (see Custody).

### Hardware isolation

The signing service runs on AMD SEV-SNP (Secure Encrypted Virtualization with Secure Nested Paging). Even the host operating system and hypervisor cannot read TEE memory. Private keys are decrypted from Cloud KMS only inside the enclave.

### Private key read blocking

When Intents API is enabled on an agent, the vault API blocks direct reads of `private_key` and `ssh_key` type secrets, returning 403\. The agent physically cannot exfiltrate the key. It can only request signatures.

### Key derivation without exposure

Ethereum addresses are derived from the private key inside the TEE using secp256k1 public key extraction and keccak256 hashing. The address is returned to the caller. The key stays in hardware memory.

SDK: submit intentagent never holds the key

```
// Agent submits intent — never sees the key
const result = await client.agents.submitTransaction(
  agentId,
  {
    to: "0xDEF1C0DE...",
    value: "0.5",
    chain: "ethereum",
    data: "0xa9059cbb...",
    simulate_first: true
  }
);

// ✓ Simulated via Tenderly
// ✓ Signed server-side (in the TEE when intents_require_tee is on)
// ✓ Broadcast via RPC
// ✓ Private key never left hardware
```

\[ GUARDRAILS \]

## Defense in depth, not just hardware

TEE signing removes key exposure, but production DeFi needs more. 1claw enforces per-agent transaction controls server-side, before the key is ever accessed.

### Address allowlists

Restrict each agent to specific contract addresses. Transactions to unlisted addresses are rejected before signing.

### Per-tx value cap

Set a maximum value per transaction in native units (ETH, BTC, SOL, etc.). Prevents a compromised agent from draining the wallet in one call.

### Daily spend limit

Cumulative cap on transactions per calendar day, resetting at midnight. Card orders and x402 payments have their own caps, and a single agent-wide cap spans those two routes together.

### Chain restrictions

Limit agents to specific chains (e.g., only Base and Arbitrum). Prevents unexpected cross-chain transactions.

\[ SIMULATION \]

## Simulate before you sign

Every transaction can be simulated via Tenderly before the TEE signs it. Set `simulate_first: true` on the request, or enforce it org-wide with `intents_api.require_simulation`. If the simulation reverts, the transaction is recorded as `simulation_failed` and never signed.

- Full Tenderly simulation with gas estimation, balance changes, and revert reasons
- Bundle simulation: test multi-step sequences before committing
- Tenderly dashboard URL in response for deep debugging
- 109+ EVM chains supported via Tenderly's network coverage

## Your agent doesn't need the private key

Stop putting private keys in environment variables. 1claw Intents API gives your agent the ability to sign transactions without ever exposing the key. Hardware isolation, guardrails, and simulation built in.

[Learn about Intents API](https://1claw.co/intents)[Start free](https://1claw.co/login)

Intents API available on Business and Enterprise plans. Start free to explore the vault.

Building a DeFi trading bot? [See the DeFi agent signing guide →](https://1claw.co/defi-agent-signing)

\[ FAQ \]

## Frequently asked questions

### Should an AI agent hold its own private key?

No. A key in the agent's environment can be read by anything that compromises the agent, including a prompt injection. The agent should ask for a signature and let a service that holds the key decide whether to sign.

### How does 1Claw sign transactions for an agent?

The agent sends a transaction intent to the Intents API. The key stays in a trusted execution environment, the transaction can be simulated with Tenderly first, and per-agent limits are checked before anything is signed.

### Which chains are supported?

EVM chains plus Solana, Bitcoin, XRPL, Tron and Cardano, as covered in the Intents API docs.

\[ READ \]

## Further reading

- [Intents API](https://1claw.co/intents)
- [Embedded wallets](https://1claw.co/embedded-wallets)
- [DeFi trading bot key management](https://1claw.co/defi-agent-signing)
- [Securing AgentKit on Base](https://1claw.co/blog/securing-agentkit-on-base)

\[ NEXT \]

## Comparing your options?

Capability-by-capability against the alternatives, including where the alternative is the better choice.

- [1Claw vs Local private keys (.env / keystore)Why shouldn't an AI agent hold its own private key?](https://1claw.co/compare/local-private-keys)
- [1Claw vs agent transaction signingWhat is the best way to let an AI agent sign blockchain transactions?](https://1claw.co/compare/best-agent-transaction-signing)
- [1Claw vs Gnosis Safe with a raw agent signerIs a Gnosis Safe enough to secure an AI agent's transactions?](https://1claw.co/compare/gnosis-safe-raw-keys)
[All comparisons](https://1claw.co/compare)
