I Plugged Gemini Into My 10,000-Line Rental Platform. Here's What Happened.

Published: (March 2, 2026 at 07:18 PM EST)
9 min read
Source: Dev.to

Source: Dev.to

What I Built with Google Gemini

BorrowHood is a neighborhood‑sharing platform I built from a camper‑van in Trapani, Sicily.

  • 10 000+ lines of Python
  • 100+ REST endpoints
  • 30+ database models
  • Keycloak authentication
  • Weighted reputation system (a Legend’s review counts 10× a Newcomer’s)
  • Auctions with anti‑snipe protection
  • CEFR language‑proficiency matching so expats can find neighbors who speak their language

The platform was initially built with Claude Code. Demo videos are on YouTube and a live instance runs on Hetzner, e.g. https://46.62.138.218/demo‑login.

When I saw the Gemini writing challenge I asked: what if I added a brain?

I didn’t replace anything—I added an intelligence layer on top of the existing system. Three AI agents powered by Google Gemini, built with Google’s Agent Development Kit (ADK), now talk to my production API.


Agent 1 – Smart Listing Assistant

User prompt: “I want to list a Bosch power drill.”

Gemini searches existing items for price comparison, validates the 31 categories, and generates a complete listing:

{
  "title": "Bosch GSB 18V Cordless Impact Drill",
  "description": "My trusty Bosch GSB 18V cordless impact drill is looking for a new adventure! It's been with me for about two years and is still in good working condition, perfect for all your home improvement projects.",
  "category": "power_tools",
  "subcategory": "drills",
  "condition": "good",
  "suggested_price": 8.0,
  "price_unit": "per_day",
  "deposit_suggestion": 24.0,
  "tags": ["power drill", "Bosch", "cordless drill"],
  "story_suggestion": "This drill has helped me hang countless shelves and assemble quite a few IKEA nightmares — it's a real workhorse!"
}

The “IKEA nightmares” line was invented by the agent. I call this the Grandma Test: if an 83‑year‑old in a wheelchair can understand the description, the listing passes.


Agent 2 – Review Sentiment Analyzer

User prompt: “Analyze Sally Thompson’s reviews.”

Gemini pulls all of Sally’s reviews, checks the reviewer’s badge tier (a PILLAR member’s review counts 8× a NEWCOMER), and returns:

{
  "user_name": "Sally Thompson",
  "badge_tier": "trusted",
  "sentiment": { "positive": 1, "neutral": 0, "negative": 0 },
  "average_rating": 5.0,
  "weighted_average": 5.0,
  "fake_review_flags": ["No fake review indicators detected"],
  "top_keywords": {
    "positive": ["immaculate", "changed my life", "focaccia", "pro"],
    "negative": []
  },
  "summary": "Sally Thompson, a TRUSTED tier member, has an excellent reputation on BorrowHood. Her single review, from a highly influential PILLAR member, praises her KitchenAid stand mixer as 'immaculate'."
}

The agent inferred the weighted reputation logic without any hard‑coded analysis code—it knows that one PILLAR review outweighs five newcomer reviews.


Agent 3 – AI Concierge

Natural‑language search.

User prompt: “I need something to cut tree branches.”

The concierge queries the API for garden tools, power tools, and saws. When nothing matches, it replies like a helpful neighbor rather than a sterile search engine:

“I’m sorry, I couldn’t find any listings for tree‑cutting tools right now. Would you like to try searching for ‘garden tools’ or ‘power tools’? Or perhaps you have a different type of cutting tool in mind?”


The Root Orchestrator

A single root agent routes every request to the appropriate specialist:

root_agent = Agent(
    model="gemini-2.5-flash",
    name="borrowhood_agent",
    sub_agents=[listing_assistant, review_analyzer, concierge],
)

Four lines of code wire three experts into one cohesive brain.


Demo

The agents live in the agents/ directory of the repo and call the same REST API used by the web frontend—no direct DB access, no tight coupling. The intelligence layer sits on top of the platform.

BorrowHood (FastAPI, 100+ endpoints)

└── agents/
    ├── agent.py            # root orchestrator
    ├── listing_assistant.py
    ├── review_analyzer.py
    ├── concierge.py
    └── tools/
        ├── items.py        # search_items, get_categories
        ├── reviews.py      # get_user_reviews, get_review_summary
        ├── users.py        # search_members, get_user_profile
        └── common.py       # auth, HTTP helpers

Example utility function

def search_items(query: str, category: str = "", limit: int = 10) -> dict:
    """Search BorrowHood items by keyword and optional category."""
    params = {"q": query, "limit": limit}
    if category:
        params["category"] = category
    return bh_get("/api/v1/items", params=params)

The ADK automatically introspects each function’s signature and docstring, exposing them as tool descriptions to Gemini. The model decides when to call which tool based on the user’s request—no manual prompt engineering required.


What I Learned

  1. Zero‑prompt tool selection – ADK handles function discovery and invocation.
  2. Layered architecture – Adding AI on top of an existing service avoids invasive changes.
  3. Weighted reputation logic can be inferred by LLMs when the data is exposed via APIs.
  4. User‑centric testing (e.g., the Grandma Test) is essential for evaluating AI‑generated content.

Thanks for reading! I’m happy to answer any questions about the implementation or the Gemini integration.


The ADK Is Genuinely Good

I expected boilerplate. I got four lines to wire three agents. The Agent class, sub_agents for delegation, automatic tool introspection from function docstrings. This is how agent frameworks should work: code‑first, no YAML, no visual builders.

listing_assistant = Agent(
    model="gemini-2.5-flash",
    name="listing_assistant",
    instruction="You are a listing assistant for BorrowHood...",
    tools=[search_items, get_categories],
)

That is the entire agent definition. The instruction tells it what to do. The tools tell it what it can access. Done.


Gemini Understands Context It Was Not Trained On

I told the Review Analyzer about BorrowHood’s weighted reputation system:

NEWCOMER = 1x, ACTIVE = 2x, TRUSTED = 5x, PILLAR = 8x, LEGEND = 10x.

In its analysis of Sally, it correctly noted that her single review from a PILLAR member “carries significant weight.” It applied the weighting concept to the actual data and drew a conclusion. That is comprehension, not pattern matching.


Existing APIs Are the Perfect Tool Layer

I did not need to write any new backend code. BorrowHood already had 100+ endpoints covering items, reviews, users, listings, and badges. The agents only needed thin wrapper functions that translate ADK tool calls into REST API requests. The entire tools layer is ~150 lines of Python. If your app already has an API, you are 80 % of the way to having an AI agent.


Agent Delegation Beats One Mega‑Agent

My first instinct was one agent with all tools. Wrong. The root orchestrator with three specialists is cleaner, faster, and produces better results. Each specialist has a focused instruction and a small tool set. The root agent’s only job is routing.


Google Gemini Feedback

The Good

gemini-2.5-flash Is Fast and Smart

  • The Listing Assistant generated a complete, valid JSON listing in under 3 seconds.
  • It picked the right category from 31 options.
  • It suggested a fair rental price (EUR 8/day for a power drill) by checking similar items on the platform.
  • It even wrote a story about “IKEA nightmares.”

The ADK Is Excellent

  • Minimal boilerplate.
  • Python‑native.
  • Tool introspection from docstrings is a killer feature.
  • Multi‑agent delegation with sub_agents just works.
  • I went from zero to three working agents in under an hour.

Tool Use Is Reliable

Gemini consistently called the right tools with the right parameters. When the Review Analyzer needed Sally’s reviews, it:

  1. Searched for “Sally Thompson” via search_members.
  2. Got her ID.
  3. Called get_user_reviews and get_review_summary with that ID.

Multi‑step tool chains work without babysitting.

The Bad

  • Free‑tier rate limits are punishinggemini-2.5-flash free tier: 5 requests/minute, 20 requests/day. A single multi‑agent query can burn 4–6 requests (root agent + sub‑agent + tool calls + follow‑up). I ran exactly three test queries before hitting the daily limit. For a developer evaluating Gemini, 20 requests/day is insufficient for a single testing session.
  • New API key propagation is confusing – After creating a fresh project and API key, the first 5 minutes returned limit: 0 errors for every model. No warning was shown. A “your key is provisioning, try again in 5 minutes” message would save developers real confusion.
  • Model naming is a moving targetgemini-1.5-flash returned 404, gemini-2.0-flash hit rate limits, and gemini-2.5-flash worked. The API lists 16+ variants (e.g., gemini-3-flash-preview, gemini-2.5-flash-lite). Which one should I use? The docs say gemini-2.0-flash, but the API disagrees. Clearer “use THIS model” guidance would help.

The Ugly

I have history with Gemini. Eleven months ago, before I met Claude, I was learning AI with Gemini. It made mistakes that felt almost deliberate—hallucinations in code that compiled but did the wrong thing. I stopped using it entirely. That experience taught me what to look for in an AI coding partner and ultimately led me to Claude Code by Anthropic, which I used to build BorrowHood.

Returning to Gemini now via the ADK, I see real improvement. gemini-2.5-flash is a different animal: it follows structured‑output instructions, calls tools correctly, and understands domain context from instructions alone. The 11‑month gap shows progress.


What Is Next

BorrowHood has four more agents designed:

  1. Cross‑Language Matchmaker – Luna’s 3D design files say “Needs: 3D printer.” Jake’s listing says “Compatible with: STL.” The agent finds these matches across language barriers using CEFR proficiency data.
  2. Onboarding Wizard Agent – Walk new users through setting up their workshop via conversation.
  3. Dispute Resolution Assistant – When a rental goes wrong, the agent reviews both sides and suggests a fair resolution.
  4. Community Pulse Agent – Weekly digest of neighborhood activity.

The data model already supports all of this. The agents just need to be wired up.


BorrowHood

BorrowHood (GitHub) is open source. Free as in freedom. No platform fees. Your data is yours.

Built from a camper van in Trapani, Sicily. Every neighborhood has a garage like his.

Tech stack: FastAPI, SQLAlchemy, Keycloak OIDC, PostgreSQL, Redis, Docker, Tailwind CSS, Alpine.js

AI: Google Gemini 2.5 Flash via ADK (agents), Claude Code by Anthropic (platform development)

Hosting: Hetzner Cloud (≈ €15 / month)

0 views
Back to Blog

Related posts

Read more »

Google Gemini Writing Challenge

What I Built - Where Gemini fit in - Used Gemini’s multimodal capabilities to let users upload screenshots of notes, diagrams, or code snippets. - Gemini gener...