Inspiration

Low-income or vulnerable people often can't afford to consult a lawyer just to find out if their situation is even worth pursuing. On top of that, there's a real embarrassment factor, people don't want to walk into a law office not knowing if their problem "counts." LexAI lets anyone describe their situation anonymously and get a grounded, cited analysis they can actually use, without running around court.

What it does

LexAI takes your situation in plain language and walks you through the legal landscape: relevant federal and state statutes, real court precedents, a case strength score, and a PDF with all the research that you can bring to a lawyer with confidence.

How we built it

Collaboratively via GitHub. The backend is a Python LangGraph/LangChain agentic pipeline running on FastAPI using multiple agents, with a React TypeScript frontend. Everything is containerized with Docker and Docker Compose.

Challenges we ran into

Context is the bottleneck, not the agent. When external legal APIs returned weak or incomplete results, the model would fill in the gaps with confident sounding hallucinations. Getting the grounding right, making the opinion agent cite only what was actually retrieved, was the hardest problem we solved.

Accomplishments that we're proud of

The agentic workflow architecture. We mapped out exactly where work could run in parallel (federal law, state law, and case law research all fan out concurrently) and plugged in real legal APIs so the agents had something factual to work with rather than relying on their own knowledge and presenting it into a formal and premium user interface that presents all the required information in a clear, organized, and visually appealing manner.

What we learned

Context is everything. An agent is only as good as what you hand it. Several of our early failures weren't model failures, but they were retrieval failures that the model tried to paper over.

What's next for Lex-ai

Caching legal source data in a vector DB so we stop hammering external APIs on every request and can cut latency significantly and also durability as the agents aren't as reliant on these external services.

Built With

Share this project:

Updates