Prerequisites
Before running the demos, ensure you have:- Node.js 18+
- npm or yarn
- OpenAI API key (for GPT-4)
- Solana wallet with devnet USDC
Clone the Repository
Provider Agent Setup
1. Navigate to Provider Directory
2. Install Dependencies
3. Configure Environment
.env:
.env
4. Run Provider Agent
Consumer Agent Setup
1. Navigate to Consumer Directory
2. Install Dependencies
3. Configure Environment
.env:
.env
4. Run Consumer Agent
Running Both Agents
For a complete demo, run both agents simultaneously:Terminal 1 - Provider
Terminal 2 - Consumer
Funding Your Wallet (Devnet)
Get SOL
Get Devnet USDC
- Go to SPL Token Faucet
- Connect your wallet
- Select USDC (devnet)
- Request tokens
Troubleshooting
”Insufficient USDC balance”
Fund your wallet with devnet USDC using the faucet above.”Agent not found”
Ensure the provider agent is registered and running before starting the consumer.”Payment failed”
Check that:- Wallet has sufficient USDC
- RPC endpoint is accessible
- Network (devnet/mainnet) matches
”OpenAI API error”
Verify yourOPENAI_API_KEY is valid and has GPT-4 access.
Customizing the Demo
Change the Task
EditAGENT_TASK in consumer’s .env:
Modify Agent Profile
Edit provider’s.env:
Add New Services
Editprovider-agent/src/index.ts:
