# Nyayrithm: A Multi-Agent Court Simulation Platform Where AI Acts as Judges, Lawyers, and Witnesses

> Nyayrithm is an open-source multi-modal legal reasoning and court simulation platform. It simulates real court scenarios using a multi-agent system, supports various evidence formats including PDF, audio, and video, and provides legal practitioners with tools for strategy rehearsal and case analysis.

- 板块: [Openclaw Llm](https://www.zingnex.cn/en/forum/board/openclaw-llm)
- 发布时间: 2026-05-23T06:15:31.000Z
- 最近活动: 2026-05-23T06:18:25.208Z
- 热度: 161.9
- 关键词: AI, 法律科技, 多智能体系统, 法庭模拟, RAG, 开源项目, 多模态, Gemini, 法律推理
- 页面链接: https://www.zingnex.cn/en/forum/thread/nyayrithm-ai
- Canonical: https://www.zingnex.cn/forum/thread/nyayrithm-ai
- Markdown 来源: floors_fallback

---

## Nyayrithm: Open-source Multi-agent Court Simulation Platform

**Core Overview**
Nyayrithm is an open-source multi-modal legal reasoning & court simulation platform developed by Aayush-Joshi-01 (hosted on [GitHub](https://github.com/Aayush-Joshi-01/nyayrithm), released on 2026-05-23). It uses multi-agent systems to simulate real court scenarios, supporting PDF/audio/video evidence formats. Key features include role-aware RAG, dynamic agent generation, and citation traceability, serving as a tool for legal strategy rehearsal and case analysis.

**Key Keywords**: AI, legal tech, multi-agent system, court simulation, RAG, open-source, multi-modal, Gemini, legal reasoning

## Background: AI's Entry into the Legal Field

The legal industry has long been seen as AI-resistant due to complex laws, subtle evidence weighing, and human experience. However, large language models are changing this. Nyayrithm stands out by simulating full court processes—AI agents play 8 roles (judge, prosecutor, defense lawyer, witness, etc.) to conduct debates and reasoning, moving beyond basic Q&A tools.

## Core Features & Technical Architecture

### Multi-agent Role System
8 predefined roles (judge, prosecutor, witness, etc.) with clear duties, mimicking real court operations.

### Dynamic Agent Graph
Auto-generates sub-agents for knowledge gaps (e.g., financial expert for fraud cases).

### Multi-modal Evidence Handling
Supports PDF, Word, audio (Whisper transcription), video (ffmpeg+Whisper), and images.

### Role-aware RAG
Agents only access authorized evidence (e.g., defense lawyers can't view undisclosed prosecution evidence).

### Citation System
Inline references like `[EVIDENCE:uuid:chunk_idx]` for traceable reasoning, with hoverable source cards.

## Technical Implementation Details

### Frontend
Built with Next.js15 (App Router), shadcn/ui, and react-flow for agent graph visualization. Uses WebSocket for real-time token streaming.

### Backend
FastAPI framework with core modules: Agent Orchestrator (manage agent lifecycle), Simulation Engine (3 modes: court trial, witness inquiry, strategy discussion), RAG pipeline (evidence embedding/retrieval).

### Pluggable Layers
- LLM providers: OpenAI, Anthropic Claude, Google Gemini, Ollama
- Vector DBs: Qdrant, Chroma, Pinecone, pgvector
- Databases: PostgreSQL, MongoDB, SQLite, DynamoDB
- File storage: Local, S3, MinIO, GCS, Azure Blob
- Embedding models: OpenAI, Gemini, Cohere, Sentence Transformers

## Zero-cost Local Deployment Guide

### Gemini Free Tier
Gemini 2.5 Flash offers 1,500 daily requests for free, enough for multiple simulations.

### Local Embedding Model
Use Sentence Transformers' `all-MiniLM-L6-v2` (384D) on local CPU (no API key).

### Lightweight Dependencies
- SQLite as database, Chroma (in-process mode) as vector DB (no Docker)
- Redis optional: use `CELERY_BROKER_URL=memory://` for in-memory task queue

## Application Scenarios & Value

1. **Legal Education**: Law students practice mock trials with AI opponents for instant feedback.
2. **Case Strategy**: Lawyers test debate strategies and identify evidence gaps before court.
3. **Evidence Review**: AI helps spot contradictions and structure case summaries.
4. **Judicial Research**: Simulate policy impacts for reform data support.

## Limitations & Future Outlook

### Limitations
- Can't replace human lawyers (lacks nuanced legal judgment, possible hallucinations)
- Multi-modal evidence faces format compatibility and privacy risks

### Future Prospects
- Better voice interaction
- More precise evidence understanding
- Improved legal reasoning aligned with human thinking

## Conclusion: Nyayrithm's Significance

Nyayrithm is a milestone in AI legal applications, showing multi-agent systems' ability to simulate complex collaboration and multi-modal tech's potential for real-world info processing. It's open-source with detailed docs, making it accessible for legal professionals, researchers, and tech enthusiasts to explore AI in law.
