Inspiration

In the legal world, even the smallest question can require navigating thousands of dense court opinions just to find one relevant precedent. We wanted to change that. Our vision was to create a tool that understands law the way lawyers do, through reasoning, context, and connection, not just keywords.

With Case Closed, we set out to make legal research faster, smarter, and more intuitive. By combining AI agents, language models, and the CourtListener API, we aimed to streamline the process of finding relevant precedents and generating structured legal analyses. Our inspiration came from seeing how intelligent agents and modern LLMs could transform traditional workflows, and we wanted to bring that same innovation into the field of law: an area that still depends heavily on manual, time-intensive research.

We envisioned a system where a user could describe their case, and within minutes, see relevant precedents, summaries, and even draft legal memos. What started as an idea to simplify research evolved into a fully functional multi-agent platform for intelligent legal reasoning.


What it does

Case Closed is an AI-powered precedent recommendation system that bridges the gap between law and machine learning. It analyzes uploaded legal documents or natural-language case descriptions and returns the most contextually relevant precedents, complete with explanations and structured insights.

The system leverages the CourtListener API to access millions of real court opinions, while an agentic backend powered by Gemini and NLP models evaluates legal similarity beyond surface-level keywords. Users can refine results by jurisdiction, court level, and issue similarity, helping researchers quickly identify meaningful legal connections.

Once relevant cases are found, the app can also generate legal memos and briefs tailored to the user’s ongoing context, essentially transforming static research into actionable writing.

A brief walkthrough:
You start by describing your case or uploading a court opinion. The system’s main reasoning agent extracts the key facts, legal issues, and jurisdictional elements. A retrieval agent then queries CourtListener using those structured insights, while an evaluator agent ranks and explains the relevance of each case. Finally, users can interact with the AI through a chat-style interface, refining searches and requesting generated drafts in real time.


How we built it

Agent Architecture:
We designed a modular multi-agent pipeline in Flask, where each agent has a clear role: fact extraction, search query generation, result evaluation, and document drafting. The agents communicate asynchronously to mimic the reasoning process of a legal researcher.

APIs & NLP:
Our integration with the CourtListener API allows live retrieval of case data, while Gemini handles natural-language understanding, semantic similarity, and summarization. This combination ensures that the recommendations are both legally grounded and linguistically coherent.

Frontend Development:
Built in vanilla JavaScript, the frontend manages conversation flow, document uploads, and session persistence. It renders chat interactions dynamically, enabling users to view summaries, analyze cases, and generate documents without ever leaving the interface.

Data Handling & Context Management:
Each session stores contextual data (facts, retrieved cases, and drafts) allowing users to refine their research iteratively. This design creates a continuous research experience rather than a series of isolated queries.

Team Contributions:

  • Sai Yadavalli: Agent development and backend intelligence
  • Sedat Unal: Full-stack infrastructure and system integration
  • Jason Pereira: Frontend, UI/UX design, and video production
  • Saksham Anand: Gemini + CourtListener API integration and AI workflow design

Challenges we ran into

  • Legal Data Complexity: Court opinions are long, unstructured, and inconsistently formatted, requiring intensive preprocessing before analysis.
  • Query Precision: We struggled to balance the breadth of search with specificity, ensuring the system retrieved cases that were contextually, not just lexically, relevant.
  • Multi-Agent Coordination: Designing agents that could hand off tasks seamlessly without redundant computation or context loss proved tricky, especially in asynchronous Flask workflows.
  • Frontend Synchronization: Managing chat-like interactions and session data while maintaining smooth real-time updates between the backend and the browser required careful state management and debugging.

Accomplishments that we're proud of

  • Integrated real-time CourtListener queries with semantic LLM analysis
  • Built a fully functional multi-agent legal assistant from the ground up
  • Developed a clean, chat-style research interface for intuitive interaction
  • Implemented automated brief and memo generation powered by legal reasoning
  • Created a scalable framework ready for additional jurisdictions and courts

What we learned

We gained deep insight into how AI can emulate legal reasoning, understanding not just terms but principles. We explored NLP embeddings for legal text, multi-agent orchestration, and context persistence across interactions. On the design side, we learned how to translate technical systems into intuitive user experiences through clear UI/UX and visual feedback.

Most importantly, we learned that multidisciplinary collaboration, combining legal understanding, AI modeling, and creative design, is what truly brings innovation to life.


What’s next for Case Closed

  • Citation Graphs: Visualize case influence networks to show how precedents build on each other
  • Expanded Coverage: Extend to international and appellate courts for comparative law research capabilities
  • Cloud API: Provide a research-grade API for legal professionals and developers
  • Enhanced Agent Personalization: Allow users to define their own agent behaviors, preferences, and jurisdictions for tailored research experiences

With these next steps, Case Closed aims to evolve from a research prototype into a professional-grade AI legal research assistant—accelerating justice, one precedent at a time.

Built With

Share this project:

Updates