> ## Documentation Index
> Fetch the complete documentation index at: https://aomi.dev/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Non-Custodial Automation

> How Aomi keeps funds safe with local key control, Anvil-forked transaction simulation before signing, and explicit per-transaction user approval.

Aomi is **non-custodial**: it never holds your private keys or funds. You stay in full control of your wallet at all times. Every transaction is simulated on a forked network before it reaches your wallet, so you review the exact onchain outcome before approving.

<iframe className="aspect-video w-full rounded-lg border" src="https://www.youtube.com/embed/TqCiJ7m9ksY" title="Transact with Aomi - connect wallet to sign" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerPolicy="strict-origin-when-cross-origin" allowFullScreen />

## How signing works

Wallet connection and account management run through [Para](https://www.getpara.com). Signing still happens locally in your connected wallet through wagmi-compatible connectors. Aomi constructs and proposes transactions; your wallet signs them. The private key never leaves your device.

```
Aomi Agent → constructs tx → simulates → presents result → your wallet signs
```

## Simulation: the safety guardrail

Before any transaction reaches your wallet, Aomi **simulates it on a forked network**. This is a deliberate guardrail for AI-generated transactions: the model cannot send anything to your wallet without first passing through simulation.

It runs in four steps:

1. Aomi forks the current network state with [Anvil](https://book.getfoundry.sh/anvil/).
2. The transaction runs against the fork, not the real chain.
3. The exact outcome is captured: token balance changes, gas cost, and every contract call.
4. The result is shown to you before you are asked to sign.

So before your wallet prompt appears you see the tokens sent and received, the gas estimate, the contracts involved, and your net balance change. The simulation itself costs no gas and changes nothing on the real network, and a batch of transactions can be simulated together.

This matters because LLMs can generate incorrect transaction parameters. Simulation catches wrong amounts, unexpected contract calls, and reverts before they become irreversible onchain. You always have the final say. For the technical pipeline, see the [Simulation Reference](/docs/reference/simulation).

## Authorized and agentic signing

Aomi supports authorized signing, so an agent can act for a user within the limits the App sets. The wallet still signs locally and the simulate step still runs first. The non-custodial guarantee does not change: Aomi never holds keys.

## Supported chains

Simulation and transaction execution are supported on Ethereum Mainnet, Base, Arbitrum One, and the major testnets such as Sepolia. You choose which chains your frontend exposes when you configure the wallet providers below.

## Wallet setup

Aomi widgets use the Para plus wagmi provider tree. If you installed the widget through `npx shadcn add https://aomi.dev/r/aomi-frame.json`, the wallet UI is already included. Use this setup when you want to wire Para-based auth and external wallets in your own host app.

```bash theme={null}
npm install @getpara/react-sdk @getpara/evm-wallet-connectors wagmi viem @tanstack/react-query
```

```tsx theme={null}
"use client";

import "@getpara/react-sdk/styles.css";
import { ParaProvider, Environment } from "@getpara/react-sdk";
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
import { defineChain, http } from "viem";
import { mainnet, polygon, arbitrum, base } from "wagmi/chains";

const queryClient = new QueryClient();
const walletConnectProjectId =
  process.env.NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID ??
  process.env.NEXT_PUBLIC_PROJECT_ID;

const localhost = defineChain({
  id: 31337,
  name: "Localhost",
  nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 },
  rpcUrls: { default: { http: ["http://127.0.0.1:8545"] } },
});

const useAnvilForWallet = process.env.NEXT_PUBLIC_ANVIL_FOR_WALLET === "true";
const networks = useAnvilForWallet
  ? [localhost, mainnet, polygon, arbitrum, base]
  : [mainnet, polygon, arbitrum, base];

const transports = Object.fromEntries(
  networks.map((chain) => [chain.id, http(chain.rpcUrls.default.http[0])]),
);

export function Providers({ children }: { children: React.ReactNode }) {
  return (
    <QueryClientProvider client={queryClient}>
      <ParaProvider
        paraClientConfig={{
          apiKey: process.env.NEXT_PUBLIC_PARA_API_KEY!,
          env:
            (process.env.NEXT_PUBLIC_PARA_ENVIRONMENT as
              | Environment
              | undefined) ?? Environment.BETA,
        }}
        config={{ appName: "Your App" }}
        externalWalletConfig={{
          appUrl: "https://your-app.com",
          wallets: ["WALLETCONNECT", "METAMASK", "COINBASE", "RAINBOW", "RABBY"],
          walletConnect: { projectId: walletConnectProjectId! },
          evmConnector: { config: { chains: networks, transports, ssr: true } },
        }}
      >
        {children}
      </ParaProvider>
    </QueryClientProvider>
  );
}
```

To switch networks programmatically, call wagmi's `useSwitchChain`. The widget's auth bridge syncs the change to the Aomi runtime automatically; you can also set it manually with `setUser({ chainId })` from `@aomi-labs/react`.

## Wire it into your app

The setup above is the wallet layer. The pieces that consume it, the connect button, the transaction and EIP-712 request handler, and the wallet utilities, live in the frontend guides:

<CardGroup cols={2}>
  <Card title="Widget installation" href="/docs/guides/widget-installation">
    Drop in `<AomiFrame />` with the wallet UI and the `ConnectButton` already wired.
  </Card>

  <Card title="Headless library" href="/docs/guides/headless-library">
    Handle transaction and EIP-712 requests, and use the wallet utilities, in a fully custom interface.
  </Card>
</CardGroup>

## Next Steps

* [What is Aomi?](/docs/concepts/what-is-aomi): understand Apps and API keys
* [Security](/docs/concepts/security): the full safety model and threat model
* [Simulation Reference](/docs/reference/simulation): the technical deep dive on simulation
