DEV Community

Farhan Mir
Farhan Mir

Posted on

The Spirited Oracle: A Multi-Agent Ghibli Apartment Hunter Powered by Gemini

This is a submission for the Built with Google Gemini: Writing Challenge

What I Built with Google Gemini: The Spirited Oracle

Let's be real: the off-campus housing market is a minefield. You see a listing near Rutgers for $1,400/mo, but by the time you add utilities, parking, mandatory renter's insurance, and a gym membership (because the building's "fitness center" is a single broken treadmill), you're staring at $1,850/mo. Add in the anxiety of wondering if the neighborhood is safe or if the commute is actually 10 minutes like the landlord claims, and it's a nightmare.

I got tired of the runaround, so for the AI Agents Challenge 2025, my team and I built The Spirited Oracleโ€”an apartment-hunting tool reimagined as a Studio Ghibli film.

It uses a multi-agent AI system to reveal the true cost of renting. Instead of reading a boring spec sheet, you are guided by six specialized agentsโ€”voiced by beloved Ghibli characters using ElevenLabs and powered by Google Gemini 2.5 Flash.

The Multi-Agent Architecture

I designed a dual-pipeline architecture (Batch and Single) where agents pull real-world data and synthesize it:

  • ๐Ÿš‚ The Conductor (Spirited Away): Calculates real commute times via OSRM routing.
  • ๐Ÿ’ธ Lin (Spirited Away): Extracts hidden fees and calculates the true monthly cost.
  • โš–๏ธ The Baron (The Cat Returns): Computes a deterministic ZORI market fairness percentile.
  • ๐ŸŒฟ Kiki (Kiki's Delivery Service): Calculates Walk Scores and Safety via live OpenStreetMap data.
  • ๐Ÿ–ค The Soot Sprites: Dig through the fine print to find buried fees.
  • ๐Ÿ”ง Kamaji: Orchestrates the findings into a final "Spirit Match" score and narrative using Gemini.

Gemini takes raw JSON from APIs (like Overpass and OSRM) and translates it into character-driven insights. Finally, Gemini powers a chat interface where you can ask Howl follow-up questions with the full listing context!

Demo

(Author Note: Don't forget to embed your Cloud Run/Vultr link here!)

![Insert a cool screenshot of your UI here!]

What I Learned

I'm usually a backend/systems architecture guy, so wiring up a dual pipeline for a multi-agent setup was a massive, incredibly fun puzzle.

1. Grounding LLMs in Reality: The biggest takeaway was learning how to keep AI agents grounded. If you ask an LLM if a rent price is "fair," it will hallucinate. Instead, I built a deterministic fairness algorithm using Zillow data (ZORI/ZORDI). The LLM's job wasn't to calculate fairness, but to narrate the deterministic data we fed it.

2. State Management Across Agents:
Getting six different AI agents to hand off data smoothly, in parallel, without breaking the application state or causing a massive bottleneck, was a trial by fire. We had to implement strict fallback handlers to keep the pipeline moving if an API failed.

Google Gemini Feedback

The Good:
I won't sugarcoat it: Gemini 2.5 Flash is ridiculously fast. When you have six distinct agents running in parallel to generate a UI, latency is the enemy. Flash delivered high-quality, persona-accurate text almost instantly. It adopted the Ghibli personas (from a grumpy Kamaji to a polite Baron) flawlessly.

The Friction:
The main friction point came when trying to force Gemini to output strictly formatted JSON for the agent handoffs. Sometimes, it would get a little too creative, appending conversational fluff (like "Here is your JSON:") which broke our parsing logic.

I ended up writing aggressive fallback handlers and tweaking the system prompts heavily to enforce pure JSON outputs. It would be amazing to see even stricter native JSON-mode enforcement in future iterations. But overall, once the guardrails were up, Gemini proved to be an absolute powerhouse for agentic workflows.

Top comments (0)