DEV Community

Jesper Deng
Jesper Deng

Posted on

I Built an AI Mock Trial Platform Because Practicing Law Shouldn't Require a Full Cast

The Problem No One Talks About

If you're a law student preparing for mock trial, or a lawyer rehearsing for court, you face a frustrating reality: you can't practice alone.

A real trial involves a judge, opposing counsel, witnesses, and jurors. To run even a basic practice session, you need to coordinate 3-5 people's schedules. Most of the time, that just doesn't happen.

So what do people actually do?

  • Law students rehearse opening statements in front of a mirror
  • Mock trial teams only get 1-2 full run-throughs before competition
  • Young lawyers go into their first trial with almost no live courtroom experience
  • Solo practitioners have zero way to simulate cross-examination or hostile witnesses

The fundamental bottleneck isn't skill — it's access to practice partners.

What I Decided to Build

I asked a simple question: what if AI could play every other role in the courtroom?

Not a chatbot that answers legal questions. Not a document tool. A full courtroom simulation where:

  • You play the attorney (plaintiff or defense)
  • AI plays the judge — ruling on objections, managing procedure
  • AI plays opposing counsel — making arguments against you, objecting to your questions
  • AI plays witnesses — responding to direct and cross-examination with realistic personalities
  • The trial follows real procedure: voir dire → opening → witness examination → closing → verdict

At the end, you get scored on your performance.

Why This Is Harder Than It Sounds

The challenge isn't just "make AI talk like a lawyer." It's:

1. Multi-role coherence

The judge, opposing counsel, and witness are all AI — but they need to behave as separate people with different goals. The judge is neutral. Opposing counsel is adversarial. The witness has a backstory and may be unreliable. One model, multiple conflicting personas, in the same conversation.

2. Stage management

A trial isn't a free-form chat. It has strict procedural stages. You can't cross-examine during opening statements. The AI needs to enforce courtroom rules while still feeling natural.

3. Reactive complexity

If you raise an objection, the judge must rule. If sustained, opposing counsel must rephrase. If you introduce surprise evidence, the witness must react consistently with their backstory. Every action cascades.

4. Solo practice must feel real

If it feels like talking to a chatbot, lawyers won't use it. The responses need enough unpredictability and pushback to create genuine practice pressure.

What I Learned Building This

Start with the state machine, not the prompts. I spent too long tweaking AI personalities before realizing the real problem was managing trial flow. Once I built a proper stage system (8 stages, with rules for what's allowed in each), the AI behavior fell into place.

Scoring creates motivation. Early testers would quit mid-trial. Adding a verdict with performance scoring changed everything — people now complete full trials because they want to see their score.

Credits > subscriptions for this audience. Law students are broke. A generous free tier with credits lets them actually use the tool. Power users (practicing attorneys) will pay when they see the value.

Try It

If you're curious:

It's free to sign up and run several full trials without paying. I'm a solo developer building this actively — feedback from anyone (devs, lawyers, or just people curious about legal AI) is genuinely welcome.

Top comments (0)