Beta · 30 November 2026
Agent Shield
An AI agent's wallet that runs a transaction only after it has been simulated and approved. The check happens off-chain; the rule is enforced on-chain, so a hijacked prompt or a leaked agent key cannot push a flagged transaction through.
The problem
Agents now hold wallets and sign their own transactions. Prompt injection, a poisoned address or a malicious token page can make an agent approve a drainer or send funds to the wrong place. Off-chain checks help only if the agent actually runs them and obeys the answer. A compromised agent will not.
How it works
shield approval: an EIP-712 signature by the AGIChainAI service wallet over exactly that call (wallet, target, value, calldata hash), valid once and for 10 minutes.Two ways to use it
| ShieldWallet | Deploy your own (constructor: service wallet, your guardian address, your agent address). A minimal wallet for one agent. The agent key can only call execute(...) with an approval. The guardian (you) can do anything without one: withdraw, change the agent, accept WARN verdicts. |
| ShieldGuard for Safe | Deployed on Base: 0x02b6e0418173889F4c570689254Da30d55d620F3 (accepts approvals from the service wallet 0x36FBcbB32E384F147919ffbAA918314D9b0C04B6). A transaction guard for an existing Safe. Anyone relays the approval with submit(...); the Safe transaction then passes the guard once. Delegatecalls are refused. Calls to the Safe itself or to the guard need the Safe's guardian, never a service approval. |
Safe users: set the guardian (setGuardian, called from the Safe) before enabling the guard. A guard set without a guardian can lock a Safe.
Agent code (viem)
// 1. check the call (x402-paid fetch, e.g. agichainai-agent-tools)
const r = await paidFetch("https://agichainai-notary.aslanklc04.workers.dev/tx-check", {
method: "POST",
body: JSON.stringify({ from: SHIELD_WALLET, to, data, value: value.toString() }),
}).then((x) => x.json());
if (!r.shield?.issued) throw new Error("not approved: " + r.verdict);
// 2. run it through the wallet; the contract re-checks everything
const a = r.shield.approval;
await agent.writeContract({
address: SHIELD_WALLET, abi: shieldWalletAbi, functionName: "execute",
args: [to, value, data, a.verdict, BigInt(a.expiresAt), a.requestHash, r.shield.signature],
});
Where AGI fits
- Every Shield approval comes from a Tx Check. Holders who burn AGI for the 30-day AGI pass get Tx Checks, and so Shield approvals, without paying per call.
- Planned: a "Shielded" badge in the agent directory for agents whose wallet uses Agent Shield, tied to the existing AGI stake for listing.
Limits, said plainly
- Shield is as good as the simulation. Tx Check measures ETH, WETH, USDC, the target and tokens named in the calldata; it does not test the sell side of a token you buy (use Exit Check for that).
- You trust the AGIChainAI service key to sign only checked calls. If the service is down, the agent cannot transact until it is back; the guardian always can.
- Approvals are bound to Base (chain 8453), one call, one use, 10 minutes.
Source
Contracts: ShieldVerifier, ShieldWallet, ShieldGuard (Solidity 0.8.24, 12 tests). Approval signing: shield.js.
EIP-712 domain: name "AGIChainAI Agent Shield", version "1", chainId 8453. Type: ShieldApproval(address account, address to, uint256 value, bytes32 dataHash, uint8 verdict, uint64 expiresAt, bytes32 requestHash). Verdict 1 = ALLOW, 2 = WARN.