Heimdall Guard · Safe module

Your agent gets a wallet. You keep the keys.

Add one module to a Safe and an AI agent can spend from it, but only calls Shield approved, only up to the daily limits you set, and never on the Safe itself. The agent is not an owner: your owners can pause it, change its limits or remove it at any time.

  • Safe 1.4.1
  • Robinhood Chain
  • USDG limits
The Guard module goes live with the mainnet launch. It is tested against Safe 1.4.1, the version deployed on Robinhood Chain.
Build your setup
Safe transactions (4)
  1. 1enableModule(Heimdall Guard)
  2. 2setPolicy(0 ETH/day, strict true)
  3. 3setTokenLimit(USDG, 100/day)
  4. 4setAgent(agent, expires in 30 days)

The module address is published at the mainnet launch; the file can be built then.

HOW IT WORKS //

Every agent call, three locks

  1. 01
    A fresh Shield receiptThe agent asks Shield about the exact call, as the Safe. Only an ALLOW receipt for that calldata works, once, for 2 minutes.
  2. 02
    Your daily limitsETH and each token you list have a 24 h budget. Transfers and approvals both count; unlimited approvals are impossible.
  3. 03
    Never the Safe itselfThe agent cannot add owners, enable modules, change its limits or delegatecall. Those stay with your owners.
FOR DEVELOPERS //

Two snippets

Set it up from code, and run every agent action through it. Works with any agent framework the SDK supports.

Agent · every call
import { executeThroughGuard, HeimdallShield } from "@heimdallfund/sdk";

// Shield checks the call as the Safe, the module enforces your limits
const { hash } = await executeThroughGuard(agentWallet, {
  module: GUARD_MODULE,
  safe: "0xYourSafe",
  to: USDG,
  data: transferCalldata,
}, { shield: new HeimdallShield() });
Setup · Safe batch
import { guardSetupCalls, safeBatch } from "@heimdallfund/sdk";

const calls = guardSetupCalls(safe, {
  module: GUARD_MODULE,
  agent: agentWallet,
  tokens: [{ token: USDG, perDay: 100_000_000n }], // 100 USDG a day
  strictTokens: true,
  expiresAt: BigInt(Date.now() / 1000 + 30 * 86_400),
});
writeFileSync("setup.json", JSON.stringify(safeBatch(4663, safe, calls)));
FAQ //

Questions,
answered.

What if the agent's key leaks?+

The thief still needs a Shield ALLOW receipt for each call, and can never spend more than one day's limit. Your owners pause the agent from the Safe with one transaction.

What if Heimdall's Shield signer leaks too?+

The daily limits still hold: they are enforced by the module, not by Shield. In tests, a hostile agent with every receipt granted never moved more than one day's budget.

Can Heimdall touch my Safe?+

No. Heimdall's multisig can only manage which Shield signers are trusted by default, and your Safe can pin its own signer instead. Your owners alone configure your agent.

Which Safe versions?+

Safe 1.4.1, the official deployment on Robinhood Chain. The module uses execTransactionFromModuleReturnData with CALL only.

Does it cost anything?+

The module is free. Shield checks follow the normal API plans: free tier, API key, or pay per call with x402.

Ship an agent wallet safely

Read the setup guide, or try Shield on a transaction first.