Inspiration

The inspiration for SimuCourt came from recognizing two critical gaps in legal education and practice. First, law students often lack access to realistic courtroom experiences until they're in actual trials. Second, even experienced attorneys have limited opportunities to practice and refine their courtroom strategies in a risk-free environment. We were inspired by the potential of AI agents to create dynamic, responsive simulations that mirror the unpredictability of real courtrooms while providing valuable learning experiences.

We also drew inspiration from the rapid advancements in multi-agent AI systems and saw an opportunity to apply these technologies to the complex, multi-party interactions of legal proceedings. The challenge of creating AI agents that could embody different legal roles with distinct personalities and biases was particularly compelling.

What it does

SimuCourt is an AI-powered courtroom simulation platform that allows users to engage in realistic legal proceedings. Users can choose to role-play as either a prosecutor or defense attorney and navigate through a complete trial process:

  • Role Selection: Users choose their side (prosecution or defense)
  • Jury Selection: Interactive process where users select jurors from a pool with distinct biases and personalities
  • Trial Proceedings: Dynamic interactions with AI opponents, judge rulings, and evidence presentation
  • Document Retrieval: Real-time access to relevant case law and legal precedents through vector database search
  • Verdict Delivery: Final judgment based on juror deliberations and voting

The system features multiple specialized AI agents including a judge, opposing counsel, and six distinct jurors - each with unique personality traits, biases, and decision-making patterns that influence the trial outcome.

How we built it

We built SimuCourt using a modern serverless architecture with Google Cloud technologies at its core:

Backend Architecture:

  • Google ADK for multi-agent orchestration and management
  • Gemini 2.5 Flash Lite as the primary LLM for all agent interactions
  • FastAPI framework for RESTful API endpoints and WebSocket support
  • ChromaDB vector database for legal document storage and retrieval
  • Custom Vertex AI Embeddings for document processing and similarity search
  • Google Cloud Run for serverless deployment and auto-scaling

Agent System:

  • Dynamic agent creation based on trial phase
  • State management for session persistence
  • Tool calling for document retrieval and verdict calculation
  • Bias modeling for juror decision-making

Development Process:

  • Used Gemini CLI extensively for code generation and debugging
  • Implemented containerization with Docker for consistent deployment
  • Employed Cloud Build for CI/CD pipelines
  • Integrated multiple GCP services including Cloud Storage for document management

Challenges we ran into

Multi-Agent Coordination:

  • Managing state across multiple agents with different roles and responsibilities was complex
  • Ensuring consistent character personas while maintaining legal accuracy
  • Handling tool calling conflicts when multiple agents needed similar resources

Legal Accuracy:

  • Balancing realistic legal procedures with engaging user experience
  • Ensuring AI responses adhered to proper courtroom decorum and legal standards
  • Modeling juror biases without creating unfair simulations

Performance Optimization:

  • Managing latency in agent-to-agent communications
  • Optimizing vector database queries for real-time document retrieval
  • Handling cold starts in Cloud Run deployment

Session Management:

  • Maintaining state across serverless instances
  • Ensuring consistent user experience during auto-scaling events
  • Managing memory usage with in-memory session storage

Accomplishments that we're proud of

Technical Achievements:

  • Successfully implemented a complex multi-agent system with 8+ simultaneous AI agents
  • Achieved sub-2 second response times for most agent interactions
  • Built a sophisticated state machine that handles 5 distinct trial phases
  • Created a bias modeling system that realistically simulates juror decision-making

What we learned

Technical Insights:

  • Google ADK provides powerful abstractions for multi-agent systems but requires careful state management
  • Gemini models excel at maintaining character consistency when properly prompted
  • Serverless architectures are ideal for AI agent systems due to their variable resource demands
  • Vector databases dramatically improve agent capabilities when properly integrated

Domain Knowledge:

  • Legal proceedings follow strict procedural rules that can be effectively modeled in code
  • Juror psychology and bias patterns can be systematically represented and simulated
  • Real courtroom dynamics involve complex interplay between multiple parties with competing objectives

Project Management:

  • Building realistic simulations requires deep domain expertise and iterative testing
  • User feedback is crucial for balancing realism and engagement in educational simulations
  • Containerized deployment significantly simplifies managing complex AI dependencies

What's next for SimuCourt: AI multi-Agents for Courtroom simulation

  • Enhanced Evidence System: Support for multimedia evidence and exhibits
  • Wider Case Types: Expansion to civil cases, appellate arguments, and arbitration
  • Performance Analytics: Detailed feedback and scoring system for user improvement

We believe SimuCourt has the potential to revolutionize legal education and practice worldwide, making high-quality courtroom experience accessible to anyone with an internet connection.

Built With

Share this project:

Updates