How It Works
An agentic wallet sits between your AI agent and the blockchain:- Agent decides — The LLM reasons about what onchain action to take (e.g. “send 5 USDC to 0x…”).
- SDK prepares — The wallet SDK constructs and validates the transaction.
- Policy check — The policy engine evaluates the transaction against spending limits, allowlists, and other guardrails.
- TEE signs — The private key, isolated in a Trusted Execution Environment, signs the transaction. The key is never exposed to the agent.
- Broadcast — The signed transaction is submitted to Sei’s EVM RPC.
Quick Comparison
PrivyWalletProvider, so you can combine Privy’s policy engine with AgentKit’s 40+ action providers.
Coinbase AgentKit on Sei
AgentKit is Coinbase’s open-source toolkit for giving AI agents crypto wallets and onchain capabilities. It is framework-agnostic (LangChain, Vercel AI SDK, OpenAI Agents SDK, MCP) and wallet-agnostic (CDP wallets, Privy, Viem, and more).Architecture
AgentKit is organized around three concepts:- Wallet Providers — Abstraction over different wallet implementations. For Sei, use
ViemWalletProvider(TypeScript) orEthAccountWalletProvider(Python). - Action Providers — Units of onchain functionality (ERC-20 transfers, ERC-721 ops, Pyth price feeds, etc.). Generic EVM providers work on Sei; providers with hard-coded chain allowlists (e.g.
x402ActionProvider,wethActionProvider, CDP-managed ones) do not — see the support matrix below. - Framework Extensions — Adapters that turn AgentKit actions into tools for your AI framework of choice.
Prerequisites
- Node.js v22+ (TypeScript) or Python 3.10+
- A CDP Secret API Key (for CDP wallet providers; not required for Viem)
- A funded wallet on Sei
Setup
- TypeScript
- Python
Install packages
Create the wallet provider and AgentKit
sei (id 1329) and seiTestnet (id 1328) out of the box, so you can import them directly from viem/chains.Wire into LangChain
Available Action Providers on Sei
Not every AgentKit action provider works on Sei — some are chain-specific. Here’s what you can use:Known Quirks on Sei
Verified by running AgentKit0.10.4 against Sei testnet (chain 1328). These quirks sit in AgentKit’s network and action-provider layer and apply to both ViemWalletProvider and PrivyWalletProvider:
- Balances are labeled “ETH” in action output.
walletActionProviderhard-codes the native-currency symbol, soget_wallet_detailsreturns strings likeNative Balance: 512993.50 ETHandnative_transferresponses sayTransferred 0.05 ETH to 0x...even on Sei. Signing and arithmetic are unaffected — it’s a display-only quirk. If the LLM will quote balances or transfer confirmations to users, add a post-processing step or a system-prompt instruction to rewriteETH→SEIwhenchain_id == 1329 || 1328. networkIdisundefined. Coinbase’s internalCHAIN_ID_TO_NETWORK_IDmap only includes Ethereum, Polygon, Base, Arbitrum, and Optimism (mainnet + testnet). Sei’s chain IDs aren’t in it, sowalletProvider.getNetwork()returns{ protocolFamily: 'evm', chainId: '1328', networkId: undefined }. This is harmless for signing/sending, but any action provider that branches onnetworkIdwill refuse to run on Sei. In practice,AgentKit.from({...})prints a warning likeThe following action providers are not supported on the current network and will be unavailable: weth, x402and silently drops them — if you expect an action and it’s missing fromagentKit.getActions(), check this warning first.
CDP-Managed Wallets and Sei
AgentKit’sCdpEvmWalletProvider (CDP-managed server wallets with built-in policies) is currently scoped to base, base-sepolia, ethereum, ethereum-sepolia, polygon, arbitrum, and optimism — Sei is not a supported network.
For managed cloud custody with a policy engine on Sei, use one of:
- Privy server wallets (below) — TEE-isolated keys with a policy engine that works on any EVM chain, including Sei.
- AgentKit + Privy combined — use
PrivyWalletProviderinside AgentKit to keep the 40+ action providers while delegating custody and policy enforcement to Privy. See Using AgentKit with Privy (Combined) below.
ViemWalletProvider as shown above and enforce limits in your own application logic.
Privy Server Wallets on Sei
Privy provides wallet-as-a-service infrastructure for AI agents. Server wallets are programmatically managed wallets designed for backend use — no user interaction required. Keys are isolated in TEEs with Shamir secret sharing and never leave secure enclaves.Prerequisites
- A Privy account with an App ID and App Secret
- An authorization keypair (generated in the Privy dashboard)
Setup
- REST API
- Node.js SDK
- Python SDK
Create a wallet
Send a transaction on Sei
eip155:1329 (CAIP-2 format) to target Sei mainnet:Sign a message
Known Quirks on Sei (Privy)
Verified by running@privy-io/server-auth 1.32.5 against Sei testnet (eip155:1328):
valuemust be a hex string, not aBigInt. Privy’s request signer uses RFC 8785 JSON canonicalization (canonicalize), which throwsTypeError: Do not know how to serialize a BigIntif you pass aBigIntin any field of thetransactionobject. Convert viem’sparseEther(...)output with'0x' + parseEther('0.01').toString(16)before sending.authorizationKeyIdsoncreateWalletexpects the public-key registration ID, not the dashboard key ID. Passing the ID shown next to a key in the Privy dashboard can fail with400 Invalid authorization key IDs. If you only need an app-owned wallet (app credentials +authorizationPrivateKeyfor request signing), omitauthorizationKeyIds— the wallet is still fully operable.
Privy with LangChain
Privy publishes a LangChain integration (langchain-privy) that exposes wallet operations as a single LangChain tool. The tool reads PRIVY_APP_ID and PRIVY_APP_SECRET from the environment and is bound directly to the LLM:
Privy Policy Engine
Privy’s policy engine evaluates policies server-side before signing. Each rule pairs anALLOW/DENY action with an RPC method and a list of conditions on transaction fields. Attach one or more policies to a wallet via updateWallet.
eq, gt, gte, lt, lte, and in operators against ethereum_transaction fields (to, value) or ethereum_calldata fields. Operand order is tx_field <operator> rule_value — e.g. operator: 'lte' with value: '10000000000000000000' means “transaction value ≤ 10 SEI”. method must be eth_sendTransaction or eth_signTransaction. Chain restriction is not a policy condition — enforce caip2: 'eip155:1329' at the call site to keep an agent on Sei.- Key quorums — require multiple authorization keys to approve high-value transactions
- Webhook notifications — get notified of all wallet activity (works chain-agnostically)
Using AgentKit with Privy (Combined)
AgentKit includes a built-inPrivyWalletProvider, so you can use Privy’s wallet infrastructure and policy engine as the backend while using AgentKit’s 40+ action providers for onchain operations.
Because of the authorizationKeyIds quirk noted above, the simplest working pattern is to create the wallet once via the Privy SDK (or the dashboard) and then hand the resulting walletId to AgentKit: