thirdweb AI - Auto Execution

We’ve introduced Auto Execution to the /ai/chat
endpoint.
When enabled, the AI will not only prepare transactions, swaps, or deployments — it will automatically execute them on behalf of the authenticated user or server wallet.
This dramatically reduces friction: no extra signing steps, no manual execution flows. Just describe what you want done, and it happens.
How it works
Enable Auto Execution by setting the flag in the context
object:
"context": {
"from": "0x...", // the wallet address that will perform the transaction
"chain_ids": [1], // optional, but recommended
"auto_execute_transactions": true // enable auto execution
}
If the auto execute flag is false, or no "from" address is passed in, thirdweb AI will return the prepared transactions to be signed manually like before.
Authentication
Auto execution requires wallet authentication:
- User wallets → pass
Authorization: Bearer <user-jwt>
- Server wallets → pass your project
x-secret-key
Example Request
curl --location 'https://api.thirdweb.com/ai/chat' --header 'Authorization: Bearer <user-wallet-jwt>' --header 'x-client-id: <your-client-id>' --header 'Content-Type: application/json' --data '{
"messages": [
{
"content": "approve 5 USDC to joenrv.eth",
"role": "user"
}
],
"context": {
"from": "0x...",
"chain_ids": [8453],
"auto_execute_transactions": true
}
}'
Example Response
Approval transaction submitted!
- **Token:** USD Coin (USDC) (`0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913`)
- **Amount:** 5 USDC (5,000,000 base units)
- **Approved Spender:** joenrv.eth (`0x2247d5d238d0f9d37184d8332aE0289d1aD9991b`)
- **Function:** approve(address,uint256)
- **Transaction ID:** 72bb183e-9bb0-4ef4-9b52-d8df73f39ed3
- **Network:** Base
Would you like to check the status of this transaction or approve a different amount?
Monitoring & Follow-ups
- Each execution returns a Transaction ID
- You can monitor this ID in your project dashboard or via the API
- You can ask the Chat API follow-up questions about this transaction:
- “What’s the status of my approval?”
- “Give me the transaction receipt”
- “Show me the explorer link”