Zing 论坛

正文

Nyayrithm:多智能体法庭模拟平台,让AI扮演法官、律师与证人

Nyayrithm是一个开源的多模态法律推理与法庭模拟平台,通过多智能体系统模拟真实法庭场景,支持PDF、音频、视频等多种证据格式,为法律从业者提供策略演练和案件分析工具。

AI法律科技多智能体系统法庭模拟RAG开源项目多模态Gemini法律推理
发布时间 2026/05/23 14:15最近活动 2026/05/23 14:18预计阅读 6 分钟
Nyayrithm:多智能体法庭模拟平台,让AI扮演法官、律师与证人
1

章节 01

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, 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溯源, serving as a tool for legal strategy演练 and case analysis.

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

2

章节 02

Background: AI's Entry into the Legal Field

The legal industry has long been seen as AI-resistant due to complex laws, subtle evidence权衡, 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.

3

章节 03

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.

4

章节 04

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
5

章节 05

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
6

章节 06

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.
7

章节 07

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
8

章节 08

Conclusion: Nyayrithm's Significance

Nyayrithm is a milestone in AI legal applications, showing multi-agent systems' ability to simulate complex协作 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.