Inspiration

Small businesses lose valuable opportunities every day because leads arrive when teams are busy, unavailable, or unable to respond quickly enough. A missed inquiry for an HVAC installation, repair, consultation, or other high-value service can represent thousands of dollars in lost revenue.

I wanted to build something beyond a chatbot that simply generates text. The idea behind LeadRescue AI is an autonomous agent that can understand a business inquiry, evaluate the opportunity, decide what should happen next, and move the lead toward a real outcome while knowing when it should stop and involve a human.

That became LeadRescue AI: Don't lose the lead. Let AI rescue it.

What it does

LeadRescue AI takes a new customer inquiry and autonomously moves it through a lead-recovery workflow.

The agent can:

  • Understand the customer's intent
  • Detect urgency
  • Estimate potential lead value
  • Score and qualify the opportunity
  • Determine the appropriate next action
  • Generate a safe customer response
  • Recommend actions such as booking an appointment
  • Detect risky claims or guarantees
  • Escalate sensitive decisions to human review
  • Record decisions on a business dashboard

For example, an urgent customer whose AC stopped working can be identified as a valuable opportunity and moved toward an appointment.

However, if a customer asks the company to guarantee that an AC system will reduce an electricity bill by 50%, LeadRescue AI does not invent or approve that guarantee. The safety gate escalates the request for human review.

This human-in-the-loop design allows the system to be autonomous where appropriate without treating autonomy as permission to make unsafe business promises.

How we built it

LeadRescue AI uses a layered agentic architecture.

Gemini provides reasoning and structured analysis of incoming leads and generates customer-facing responses.

Google Agent Development Kit (ADK) is used to define the LeadRescue agent and its tools, including lead assessment and safe customer-response generation. The ADK Developer UI also makes the agent's tool execution observable during development.

Google GenAI SDK connects the application to Gemini.

FastAPI and Python provide the application/API layer.

A deterministic safety guardrail sits alongside the AI reasoning layer to detect unsupported guarantees and other high-risk requests and force human review when required.

The application is deployed to Google Cloud Run, with the Gemini API credential protected using Google Secret Manager rather than exposing credentials in the frontend.

A responsive business dashboard shows lead activity, rescued opportunities, human-review decisions, estimated pipeline value, and recent agent decisions.

Challenges we ran into

One challenge was designing the system so that autonomy did not mean blindly allowing the model to take every action. Business automation needs clear boundaries, especially when a customer requests guarantees or makes a high-risk claim.

I addressed this with a dedicated risk gate and human-review path.

Another challenge was handling temporary model availability. The application includes retry and model-fallback behavior so that temporary demand on one Gemini model does not unnecessarily stop the entire lead-recovery workflow.

Deploying the application securely also required separating credentials from the application and configuring Google Cloud Run and Secret Manager correctly.

Accomplishments that we're proud of

LeadRescue AI became more than a conversational prototype.

The project demonstrates an end-to-end agentic workflow where an inquiry can be analyzed, scored, valued, routed to an appropriate action, given a generated response, checked against safety policies, and reflected on a live dashboard.

I am especially proud of the human-in-the-loop safety mechanism. The same system that can autonomously move a legitimate opportunity forward can recognize when it should not make a business commitment and hand control to a person instead.

The project is also running as a live application on Google Cloud rather than only as a local demonstration.

What we learned

Building LeadRescue AI reinforced that useful agents need more than a powerful language model. They need tools, state, business rules, safety boundaries, observable decisions, resilient infrastructure, and a clear definition of when humans should remain in control.

I also learned how Google ADK, Gemini, the Google GenAI SDK, Cloud Run, and Secret Manager can work together to turn an agent concept into a deployable application.

What's next for LeadRescue AI

The next step is turning LeadRescue AI from a hackathon MVP into a multi-tenant SaaS platform for real businesses.

Future development would include:

  • CRM integrations
  • Real calendar and appointment scheduling
  • Website lead capture
  • Email and SMS follow-up
  • Business-specific policies and knowledge
  • Authentication and separate company workspaces
  • Production-grade persistent storage
  • Analytics and conversion reporting
  • Configurable approval workflows
  • Additional industry-specific agents

The long-term goal is simple: give small businesses an always-available AI agent that protects revenue without sacrificing human oversight.

Built With

Share this project:

Updates

Submission history