Inspiration

Prediction markets move fast, and typing into a trading screen is slow. I wanted to just say what I think and let an agent act. But an agent with money is risky. So I built one that has a small budget, strict limits and a receipt for everything it does.

What it does

VoiceBet Agent is a voice controlled AI agent. You speak a command like "Bet 10 USDC on yes for the Fed rate cut". The agent:

  • Hears you with ElevenLabs speech to text.
  • Reads the intent with Grok and finds the matching Gemini Prediction Market.
  • Checks your spend policy: daily cap, per bet max, max price and a kill switch.
  • Asks for a spoken "confirm" when a bet is above your approval limit.
  • Places the order on Gemini Prediction Markets.
  • Sends a USDC transfer with a memo receipt on Solana devnet.
  • Talks back with an ElevenLabs voice and drafts a Grok alert post. You can also ask about coin prices or your day, and set watch rules like "bet 20 USDC if odds drop below 40".

How we built it

  • Next.js 14 and TypeScript. Sign in with MetaMask.
  • ElevenLabs: Scribe for speech to text and Flash for text to speech (/api/transcribe, /api/speak).
  • xAI Grok: intent parsing, market analysis and alert text (lib/parser.ts, lib/analyst.ts, lib/social.ts).
  • Gemini Prediction Markets REST API: live markets and orders (lib/gemini.ts). Paper mode is the default so no real money moves.
  • Solana devnet: agent wallet, USDC transferChecked and the Memo program for receipts (lib/solana.ts, lib/wallet.ts).
  • QuickNode Streams: a Solana filter (quicknode/filter.js) sends wallet activity to our webhook /api/streams.
  • Spend rules live in lib/policy.ts and the agent decision loop in lib/agent.ts. Both are documented in the README.

Challenges

Browser speech to text kept hearing noise as words, so we moved all voice to ElevenLabs. ElevenLabs free plans block library voices on the API, so we added a voice fallback. Making human approval work by voice needed a pending state with a 120 second expiry.

Accomplishments

A full loop from voice to policy check to market order to onchain receipt, with a human in the loop for bigger bets.

What we learned

Guardrails matter more than model smarts when an agent holds money. Small limits plus clear receipts make agents easier to trust.

What is next

Live Gemini order signing by default, persistent storage on Vercel, mobile voice mode, per market risk rules and multi agent budgets.

Code: https://github.com/Prasannaverse13/VoiceBet Demo: https://voice-bet.vercel.app/

Built With

  • coingecko
  • elevenlabs
  • gemini-prediction-markets
  • metamask
  • next.js
  • quicknode-streams
  • react
  • solana
  • typescript
  • usdc
  • vercel
  • xai-grok
Share this project:

Updates

Submission history