The Onchain Machine Learning template provides a simple app for Reinforcement Learning from Human Feedback using the CDP SDK. The application shows how to create an MPC wallet, fund the wallet, and send Base Sepolia to a recipient who controls a Coinbase Smart Wallet.
To start, create a CDP API Key.
Then, set the following environment variables - for example, within a .env
file, or by using
Replit Secret Manager
(if you are accessing this template from Replit).
API_KEY_NAME="YOUR_API_KEY_NAME"
API_KEY_PRIVATE_KEY="YOUR_API_KEY_PRIVATE"
Install the dependencies:
npm install
# or
yarn
Then, run the development server:
npm run dev
# or
yarn dev
Open http://localhost:3000 with your browser to use the application.
To learn more about the CDP SDK, take a look at the following resources:
If you are accessing this template from GitHub, you can click the button below to deploy your own copy of the AI Feedback tool:
The images in the demo are sourced from Unsplash.