System Architecture
A modular, multi-layer architecture designed for scalable legal AI reasoning and real-time agent orchestration.
Architecture Overview
Core Components
Case Parser Agent
Extracts structured issues, parties, jurisdiction, and relevant legal domains from raw case text.
Issue Extraction Module
Identifies and categorizes the core legal issues, applicable laws, and dispute dimensions.
Legal Research Module
Retrieves relevant precedents, statutes, and legal commentary via RAG from the knowledge base.
Plaintiff Agent
Constructs prosecution arguments with cited evidence and legal basis to support the plaintiff's position.
Defendant Agent
Builds defense arguments, challenges evidence, and presents counter-narratives for the defendant.
Rebuttal Agent
Generates rebuttals to each side's strongest arguments across multiple debate rounds.
Negotiation Agent
Explores settlement pathways and quantifies compromise positions between the parties.
Judge Agent
Evaluates all arguments, issues a structured judgment, and provides win probability estimates.
Technology Stack
Frontend
- ▸Next.js 14 (App Router)
- ▸TypeScript
- ▸Tailwind CSS + shadcn/ui
- ▸React Flow
- ▸Framer Motion
Backend
- ▸FastAPI (Python 3.11)
- ▸LangGraph Orchestration
- ▸Pydantic Schemas
- ▸Uvicorn ASGI
Model Layer
- ▸OpenAI GPT-4o / GPT-4
- ▸Anthropic Claude
- ▸Local LLM Support
- ▸Function Calling
Knowledge Base
- ▸Vector Store (Chroma/FAISS)
- ▸Legal Document RAG
- ▸Case Law Index
- ▸Statute Database
Deployment
- ▸Docker Compose
- ▸Nginx Reverse Proxy
- ▸Environment Configs
- ▸Health Checks