AomiWidget adds Aomi chat, threads, wallet connection, and transaction approval
to your React application. Your application chooses the App and the user-facing
wallet provider. Aomi resolves the App’s tools and execution settings from the
Application ID.
The widget runs on your application’s origin. It does not reuse cookies from
chat.aomi.dev. Instead, it creates a widget session for the signed-in user and
binds that session to the exact origin that created it. There is no origin
registration or allowlist: any HTTPS origin can mint a session, and the session
is only valid when presented from that same origin.
Understand the boundary
Your host application and Aomi have distinct responsibilities:Provider choice belongs to your application. Switching from browser wallets
to Para or Privy changes how users sign in and access wallets. It does not
change which Aomi App handles the conversation.
Before you start
You need:- An activated Aomi App and its numeric Application ID.
- React 18 or 19 running in the browser.
- A browser-wallet, Para, or Privy integration choice.
localhost, 127.0.0.1, [::1]) for local development. If you use Para or
Privy, also allow your host origin in that provider’s project settings when the
provider requires it.
1. Install the widget
2. Add public configuration
Keep the Application ID and provider’s public browser identifier in your host application. Add only the provider you use.- Next.js
- Vite
3. Mount AomiWidget
Choose one authentication mode. Import the matching provider entry point for Para or Privy so the widget can register that provider.- Browser wallet
- Para
- Privy
Use this mode when users connect an existing wallet.
process.env.NEXT_PUBLIC_* read with the matching
import.meta.env.VITE_* value.
4. Pass optional host state
You can keep thread selection and wallet presentation in your application:
The Application ID selects the App. It is not a user credential and does not
grant wallet signing. The active user and wallet must still complete the
configured authentication and approval flow.
5. Verify the integration
- Open the widget from the origin your application is served from.
- Sign in or connect a browser wallet. Browser-wallet sign-in uses a SIWE or SIWS signature from an externally owned account; smart-contract wallets (Safe, Coinbase Smart Wallet, Base Account) cannot sign in through the widget.
- Confirm the thread list and composer load without an App-key prompt.
- Send a message and confirm your selected App responds.
- If the App creates transactions, confirm the widget shows the request before the wallet asks for a signature.
- Repeat the check from the production HTTPS origin before launch.
Installation details
Review framework setup and environment configuration.
Customize the widget
Configure layout, themes, wallet controls, or a headless interface.
Troubleshooting
Resolve origin, provider, wallet, and transaction issues.