Inspiration
When you look at a Polymarket contract, you see the current probability, trading volume, and the orderbook. You don't see the evidence driving that price or the critical points of disagreement.
We were completely blown away by MiroFish - a recently viral open-source swarm intelligence engine that uses thousands of AI agents to simulate public reaction and predict future events. But MiroFish simulates the messy, emotional dynamics of the crowd.
What if we simulated the experts?
Instead of synthetic AI avatars, we wanted to spin up a simulation of actual industry professionals and force them to debate the exact same Polymarket evidence. If Polymarket shows you what the crowd thinks, a targeted multi-agent simulation could show you what informed experts would conclude.
The gap between those two numbers is where the alpha lives, and why not build the system to find it?
What it does
1 market. 12 real-world experts. 30 ticks of debate. One emergent probability.
Start with a globe pulsing with live Polymarket events. Find a geopolitical point and select a market like "Will the Fed cut rates before September 2025?"
Instantly, the system fetches the live market state and fires a prompt to Gemini Pro to research a shared pool of 20-30 claims. This builds the "evidence room" and extracts the actual underlying arguments on both sides of the bet.
Next, we build the society. Our system hits the Apollo.io API to find real people relevant to your specific market. It extracts job titles and industries to generate 12 agent personas based on these people.
Hit "Run Simulation," and the swarm wakes up. Each agent receives a private prompt containing public claims and targeted "incoming claims" sent to them by trusted peers. On every tick, each agent makes a choice: update their own probability based on the evidence or share a claim with another agent to try and change their mind.
The output is an interactive Simulation Replay. You scrub through the 30-tick timeline, watching trust networks shift and factions form as agents digest the evidence. You can click into any agent at any moment to see exactly which shared claim caused them to flip their stance.
Before: Look at a 67% Polymarket price and guess what the crowd is thinking. After: Scrub through a 30-tick simulation of real-world experts debating the evidence, track the exact claims that shifted their consensus, and see the true probability emerge.
How we built it
Next.js + React on the frontend FastAPI on the backend A highly optimized, hybrid AI routing layer in between
The AI Routing Layer handles the complex, multi-model orchestration required for a 30-tick simulation. For the heavy lifting of rapid agent interactions (360+ calls per run), we route through Lava to Gemini 1.5 Flash. For generating the initial shared claim pool, we use Gemini 1.5 Pro via Lava. To build the realistic society, we route through Lava's premium API gateway to hit Apollo.io, extracting real professional backgrounds. For the deepest, multi-step reasoning - like world-building and report planning - we route through LiteLLM to hit K2 Think V2.
The backend is a Python-based FastAPI server running asynchronous worker threads to execute 12 agent actions in parallel. Every tick, the system calculates belief updates, processes targeted claim shares, updates trust edge weights, and detects emerging faction clusters. This massive amount of relational state - ticks, events, trust networks, and agent memories - is pumped into a Supabase PostgreSQL database via SQLAlchemy.
The entry point is a fully interactive 3D globe built with three.js, react-three-fiber, and drei. We used d3, topojson, and geojson to handle the data transformations and map shapes, plotting live Polymarket events directly onto the globe.
The split-screen Simulation Replay is a dynamic data visualization. We used d3 force layouts and custom SVG/canvas layers to render the shifting trust networks and faction clusters tick-by-tick. The frontend uses react-query and axios to efficiently fetch and cache the heavy tick data from the backend, allowing the user to seamlessly scrub the timeline and read the agent debate feed with zero lag.
Challenges we ran into
Data volume and latency. The sheer amount of relational state generated by a 30-tick, 12-agent simulation is staggering. Every single tick generates new belief snapshots, trust edge updates, faction states, and claim shares.
Loading the 3D globe was a massive hurdle. Fetching 100+ live Polymarket events and rendering them as interactive nodes on a three.js globe takes a toll on the client. We implemented aggressive caching and dynamic imports to smooth it out, but processing and plotting that much live market data will always take a bit of time.
Simulation execution time. Orchestrating 12 independent AI agents means making 360+ concurrent Gemini API calls over the course of a single run. Even using FastAPI's async worker threads, coordinating the LLM responses, resolving the trust network math, and avoiding rate limits made the simulation heavy. We had to heavily optimize the backend queuing to make the runtimes acceptable.
Accomplishments that we're proud of
- We built a living, breathing 3D globe that maps 100+ live Polymarket events in real-time. It transforms a flat list of bets into a global intelligence dashboard
- We completely eliminated generic AI avatars. Using Apollo.io to pull real professional backgrounds and injecting them into our debating agents is a massive leap in simulation realism
- We successfully orchestrated 360+ concurrent LLM calls per simulation run without the backend collapsing
- We brought the data to life. Building the split-screen Simulation Replay timeline with d3 turns raw database rows of trust edges and belief updates into a visual story
What we learned
- Multi-agent systems are chaotic. Keeping 12 independent AI agents grounded in a shared pool of facts over a 30-tick simulation is incredibly difficult. Without strict prompt boundaries and carefully weighted claims, simulated experts will hallucinate their own evidence and derail the debate
- UI performance degrades instantly when you try to render complex network graphs. Animating 144 trust edges, agent faction clusters, and real-time belief updates on a single canvas pushed our frontend to its limits. Data optimization on the client side is an absolute requirement to make a simulation usable.
What's next for GodsEye
Historical backtesting. We need to run this simulation against resolved markets from the past five years to prove our AI experts consistently beat the crowd. Multi-market analysis. We want to simulate overlapping events to see how a shift in one prediction market mathematically ripples into another. Custom agent creation. Users should be able to define their own expert profiles and inject specific, proprietary evidence into the shared claim pool to test their own thesis against the swarm.
Built With
- apollo
- gemini
- lava
- next.js
- polymarket
- python
- react
- solana
- supabase
- tailwind
- typescript
Log in or sign up for Devpost to join the conversation.