Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.
JavaScript 3d-generationai-agentsanimationavatardigital-humangenerative-aiglbgltfimage-to-3dllmmcpmcp-servermodel-context-protocolsolanatext-to-3dthreejsweb-componentswebglwebxrx402
Scenario Tests
Scenario 1: Happy Path — Pay and Verify
- Agent generates invoice: amount
1000000(1 USDC), memo42, startTime1700000000, endTime1700086400. - Server calls
buildAcceptPaymentInstructionsand serializes the instructions as JSON. - Client reconstructs instructions, signs, and submits the transaction on Solana via
sendTransaction. - Server calls
validateInvoicePaymentwith the same params. - Returns
true. Agent delivers the service.
Scenario 2: Verify Before Payment
- Agent generates invoice: amount
500000, memo7777, valid for 1 hour. - Server immediately calls
validateInvoicePayment(user hasn't paid yet). - Returns
false. - Agent tells the user payment is not confirmed and to try again after paying.
Scenario 3: Duplicate Payment Rejection
- Agent generates invoice with memo
99. - User pays successfully.
validateInvoicePaymentreturnstrue. - A second attempt to submit the same
acceptPaymenttransaction is rejected by the on-chain program because the Invoice ID PDA is already initialized.
Scenario 4: Mismatched Parameters
- Agent generates invoice: amount
1000000, memo555. - User pays with a different amount (
2000000) but same memo. validateInvoicePaymentwith original params returnsfalse— the on-chain event has a different amount.
Scenario 5: Expired Invoice
- Agent generates invoice with
endTimein the past. - The on-chain program rejects the transaction (timestamp outside validity window).
- Agent should generate a new invoice with a valid time window.
Troubleshooting
| Error | Cause | Fix |
|---|---|---|
validateInvoicePayment returns false but user claims they paid |
Transaction may still be confirming, or params don't match | Wait a few seconds and retry. Double-check that amount, memo, startTime, endTime, and user all match exactly. |
| Invoice already paid | The Invoice ID PDA is already initialized | Generate a new invoice with a different memo. |
| Insufficient balance | User's token account doesn't have enough tokens | Tell the user to fund their wallet before paying. |
| Currency not supported | The currencyMint is not in the protocol's GlobalConfig |
Use a supported currency (USDC, wSOL). |