Inspiration

The inspiration for LegalPilot was rooted in the common reality that legal documents are difficult to understand, time-consuming, and usually a lot to process. Everyone encounters contracts, either from simple rentals to complex agreements and the default process is slow, expensive, or relies on blind faith. I realized the true potential of Gemini's advanced reasoning wasn't just translation; it could also be empowerment. We set out to eliminate legal anxiety by creating a system that transforms a massive operational burden into instant, structured intelligence

What it does

LegalPilot’s purpose is to provide instant, expert-level analysis of any contract. Users input a legal text, and the system immediately processes with advanced reasoning to perform three core actions:

-Identify and Extract Risks: Pinpoint clauses that expose the user to liability or unforeseen financial costs. -Surface Obligations: Clearly define all required actions and deadlines the user must meet. -Translate to Plain English: Summarize complex legal jargon into clear, actionable summaries.

How we built it

We implemented a modern, three-tier architecture focused on speed and reliability: Front-end: A simple, fast static application built with HTML/CSS/JavaScript (hosted on Netlify).

Back-end/API: A Python server using FastAPI (deployed on Render). This layer handles request validation and serves as the secure access to the AI.

Core Intelligence: The backend leverages the Gemini API using the official google-genai SDK.

Challenges we ran into

The primary technical challenge was centered around deployment performance on a limited environment (Render's free tier), which highlighted the model's significant startup load time

We ran into a Cold Start: The normal required dependencies (Gunicorn, FastAPI, and the heavy Gemini SDK) resulted in a cold start delay exceeding 30 seconds, leading to browser timeouts during the first initial request Solution: We solved this by initially hardcoding the Gemini API key into the python syntax and it became faster, we then removed that so as to prevent attackers from spamming the API Key, then i thought of overriding the default server configuration, implementing the Gunicorn --timeout 120 command. This gave the necessary grace period for the Python application to fully load, ensuring that once the server is warm, every user request is instant and reliable. This was a critical lesson in resource management and deployment optimization for LLM based services

Accomplishments that we're proud of

I'm proud that I've been able to fully implement the gemini 2.5 fast into my code after nights of countless debugging all by myself. The night the work finally came to life filled me with so much joy not knowing there's more waiting for me in the deployment phase. But when that hurdle came, I still found a way round it and I'm proud I didn't give up.

What we learned

I learnt that It's better to cherish thorough debugging rather than speed. I also learnt that

What's next for Legal Pilot

The next step is to win the hackathon first, then think of implementing more features like the AI being able to handle minor court cases as the lawyer, able to depose an accused or a witness and lots more features.

Built With

Share this project:

Updates