A reference frontend for agent developers integrating AWS AgentCore SDK with Privy as the embedded wallet provider.
Note: This is an open source repository jointly maintained by the Privy team and the AWS AgentCore Bedrock team. It is a representative example of an integration flow intended to help agent developers with their integration. It is not a fully productionized codebase.
This app is the user-facing frontend that agent developers can deploy alongside their AgentCore-powered application. Users arrive here to:
- Log in - authenticate via Privy (email, social, or wallet)
- View their wallets - see USDC balances on Base and Solana
- Delegate access to the agent - grant your agent application permission to sign transactions on their behalf
- Fund their wallets - add USDC via card (Stripe hosted onramp), receiving funds (QR code), or transfer from an external wallet
- Framework: Next.js 15.5.x (App Router, Turbopack)
- Language: TypeScript
- Styling: Tailwind CSS v4
- Auth + Wallets:
@privy-io/react-auth - Balance data: Direct on-chain queries (viem for Base,
@solana/web3.jsfor Solana) - Package manager:
pnpm
Before starting development on this frontend, please begin onboarding to the AWS AgentCore SDK. In that onboarding flow, you will be asked to provide the credentials created in the flow below.
- Go to the Privy Dashboard
- Select your app (or create one)
- Navigate to Settings → API keys
- Copy the App ID →
NEXT_PUBLIC_PRIVY_APP_ID - Copy the App secret →
PRIVY_APP_SECRET(treat this like a password - never expose it client-side)
The signer ID is the ID of an authorization key you create in the Privy dashboard. This is used to grant an agent permission to sign transactions on behalf of a user's wallet.
- In the Privy Dashboard, go to Wallet infrastructure → Authorization
- Click New key
- Give it a name (e.g.
aws-agent) - Copy the Key ID that is generated →
NEXT_PUBLIC_PRIVY_SIGNER_ID
The key ID looks like
zr17anh9dpiqno1iaref9jpx. It is safe to expose publicly -it is just an identifier, not a secret.
Create a .env.local file in the project root with the following:
# Privy
NEXT_PUBLIC_PRIVY_APP_ID= # Your Privy app ID (public)
PRIVY_APP_SECRET= # Your Privy app secret (server-only)
NEXT_PUBLIC_PRIVY_SIGNER_ID= # Authorization key ID from Privy dashboard (public)
# Network mode — optional. One of: mainnet | testnet. Defaults to mainnet.
NEXT_PUBLIC_NETWORK_MODE=testnetControls which chains the app reads balances from, which chains external-wallet
transfers target, and whether card funding is enabled. Defaults
to mainnet if unset, so upgrading without changing your env leaves
behavior unchanged.
| Value | Base | Solana | Card funding (Stripe) |
|---|---|---|---|
mainnet (default) |
Base (chain id 8453) | Solana mainnet-beta | ✅ enabled |
testnet |
Base Sepolia (chain id 84532) | Solana Devnet | ❌ disabled (Stripe onramp is mainnet-only) |
Start in testnet to develop against faucet USDC. See
Running in testnet below for faucet links. Switch to
mainnet for production deployments.
This frontend includes flows for allowing the user to add funds to their Ethereum and Solana wallets. At the moment, the flow only reads the balance of USDC on Base in their Ehtereum wallet and USDC on Solana in their Solana wallet. The onramp methods below only support funding with USDC on these chains.
The "Add funds" flow supports three methods:
Clicking "Pay with card" opens Stripe's hosted onramp in a new tab. The user selects their destination currency (USDC) and network (Base or Solana) directly in the Stripe UI.
The hosted onramp requires no server-side secret key -it accepts destination_currency and destination_network as URL query parameters. See the Stripe hosted onramp docs for available parameters and customization options.
Displays a QR code and copyable address for the selected wallet. The QR value uses EIP-681 format for Base and the Solana Pay SPL token format for Solana.
Connects an external wallet (MetaMask, Phantom, etc.) via Privy's useConnectWallet hook and executes a USDC transfer programmatically -ERC-20 transfer on Base, SPL token transfer on Solana.
Currently, the default login option is email. The full list of login methods can be found here. Some login methods such as SMS and Google Auth need to be explicitly enabled in your Privy Dashboard by going to User management → Authentication.
pnpm install
pnpm devOpen http://localhost:3000.
Set NEXT_PUBLIC_NETWORK_MODE=testnet in .env.local (the default in
.env.example) and use these faucets to fund wallets:
| Asset | Network | Faucet |
|---|---|---|
| USDC | Base Sepolia | Circle Faucet → select "Base Sepolia" |
| USDC | Solana Devnet | Circle Faucet → select "Solana Devnet" |
| ETH (gas on Base) | Base Sepolia | Alchemy, QuickNode |
| SOL (rent/fees on Solana) | Solana Devnet | Solana Faucet, Sol Faucet |
Base Sepolia gas is microscopic (~0.01 ETH is plenty); Solana rent needs a fraction of a SOL per active account. Funding takes ~30 seconds end to end.
The "Pay with card" option in Add Funds is disabled in testnet — Stripe's hosted onramp only deals in real mainnet USDC. Use the "Transfer from wallet" or "Receive funds" options instead.
pnpm dev # Start dev server with Turbopack
pnpm build # Production build
pnpm lint # ESLintThis repository is jointly maintained by the Privy team and the AWS AgentCore Bedrock team. See MAINTAINERS.md for the full list of maintainers and contact information.
This repository is not currently open to external contributions.
Please submit an Issue and fill out the issue with as much information as possible if you have found a bug in need of fixing.
You can also submit an Issue to request new features, or to suggest changes to existing features.
Apache-2.0. See LICENSE.md.