VeritasAI is an advanced multi-agent system for comprehensive legal case research and analysis. It orchestrates multiple AI agents to parse queries, search legal databases, summarize case opinions, extract citations, analyze arguments, and provide insights through a modern React frontend.
- Python 3.10+ (Windows users: prefer Python 3.10/3.11 for best compatibility)
- Node.js 18+
- CourtListener API key (get from CourtListener)
- MongoDB (atlas cloud instance)
# Clone the repository
git clone <repository-url>
cd VeritasAI
# Create and activate virtual environment
python -m venv venv
# Windows
venv\Scripts\activate
# Linux/Mac
source venv/bin/activate# Install Python dependencies
pip install -r requirements.txt
# Install frontend dependencies
cd frontend
npm install
cd ..Create a .env file in the root directory:
# Required Environment Variables
OPENAI_API_KEY=your_openai_api_key_here
GOOGLE_CLIENT_ID=your_google_client_id_here
GOOGLE_CLIENT_SECRET=your_google_client_secret_here
MONGO_URI=your_mongodb_atlas_uri_here
DATABASE_NAME=veritas_ai
LLM_MODEL=gpt-4o-mini
API_BASE_URL=https://api.openai.com/v1
TEMPERATURE=0.4
SESSION_SECRET_KEY=your_session_secret_key_here
JWT_SECRET=your_jwt_secret_key_here
COURTLISTENER_API_KEY=your_courtlistener_api_key_here
ENCRYPTION_KEY=your_32_character_encryption_key_here# Start all backend services
python run.py
# In a separate terminal, start the frontend
cd frontend
npm startThe application will be available at:
- Frontend: http://localhost:3000
- Backend API: http://localhost:8000
- Authentication: Log in with your Google account
- Query Search: Enter legal queries in natural language
- PDF Analysis: Upload legal documents for comprehensive analysis
- History: Access your previous searches and results
- Enter legal questions in natural language
- Get comprehensive analysis including:
- Case summaries
- Legal issues identified
- Argument analysis
- Citation verification
- Analytics and patterns
- Upload legal PDF documents
- Extract and analyze case text
- Generate comprehensive summaries
- Identify key legal arguments and citations
- View legal patterns and trends
- Analyze jurisdictional insights
- Track precedential analysis
- Monitor citation networks
- "contract breach damages remedies"
- "constitutional rights violations first amendment"
- "employment discrimination workplace harassment"
- "intellectual property patent infringement"
- "criminal procedure fourth amendment search"
| Member | Role | Components |
|---|---|---|
| Chamod | Team Leader | Orchestrator, Argument Agent |
| Sandun | Backend Developer | Citation Agent, Frontend |
| Monali | AI Specialist | Summarization Agent, Analytics & Patterns Agent |
| Lihini | Research Specialist | Issue Agent |
- Orchestrator: Main coordination system that manages all agents
- Argument Agent: Analyzes legal arguments and reasoning
- System Architecture: Overall system design and integration
- Citation Agent: Extracts and verifies legal citations
- Frontend Development: React-based user interface
- API Integration: CourtListener API integration
- Summarization Agent: Creates comprehensive case summaries
- Analytics Agent: Generates insights and pattern analysis
- AI Models: LLM integration and prompt engineering
- Issue Agent: Identifies and extracts legal issues
- Legal Research: Domain expertise and validation
- Quality Assurance: Legal accuracy and compliance
VeritasAI/
βββ π agents/ # AI Agent Services
β βββ π analytics/ # Analytics & Patterns Agent (Monali)
β β βββ analytics_agent.py
β βββ π argument/ # Argument Analysis Agent (Chamod)
β β βββ argument_agent.py
β βββ π citation/ # Citation Extraction Agent (Sandun)
β β βββ citation_agent.py
β β βββ citation_service.py
β βββ π issue/ # Issue Extraction Agent (Lihini)
β β βββ issue_agent.py
β βββ π pdf/ # PDF Processing Service
β β βββ pdf_service.py
β βββ π summary/ # Summarization Agent (Monali)
β βββ summarization_agent.py
βββ π common/ # Shared Utilities
β βββ config.py # Configuration management
β βββ encryption.py # Data encryption utilities
β βββ logging.py # Logging configuration
β βββ models.py # Data models
β βββ responsible_ai.py # Responsible AI framework
β βββ security.py # Security utilities
β βββ utils.py # Common utilities
βββ π controller/ # Main Orchestration (Chamod)
β βββ auth_controller.py # Authentication controller
β βββ orchestrator.py # Main orchestrator service
βββ π data/ # Data Storage
β βββ π embeddings/ # Vector embeddings
βββ π frontend/ # React Frontend (Sandun)
β βββ π public/
β βββ π src/
β β βββ π components/
β β β βββ ChatInterface.js # Main chat interface
β β β βββ CitationsSection.js # Citations display
β β β βββ ExportActions.js # Export functionality
β β β βββ HomePage.js # Landing page
β β β βββ NavBar.js # Navigation bar
β β β βββ PDFUpload.js # PDF upload component
β β β βββ ResultSection.js # Results display
β β βββ App.js # Main app component
β β βββ index.js # App entry point
β βββ package.json # Frontend dependencies
β βββ tailwind.config.js # Tailwind CSS config
βββ π model/ # Data Models & Services
β βββ case_indexer.py # Case indexing service
β βββ citation_verifier.py # Citation verification
β βββ courtlistener_advanced.py # Advanced CourtListener features
β βββ courtlistener_client.py # CourtListener API client
β βββ issue_extractor.py # Issue extraction logic (Lihini)
β βββ legal_term_expander.py # Legal term expansion
β βββ user_model.py # User data models
βββ π view/ # API Views
β βββ api_view.py # Main API endpoints
β βββ auth_view.py # Authentication endpoints
βββ π logs/ # Application logs
βββ π tests/ # Test files
βββ π venv/ # Virtual environment
βββ run.py # Application entry point
βββ requirements.txt # Python dependencies
βββ README.md # This file
- Orchestrator (Port 8000): Main coordination service
- Citation Service (Port 8003): Citation extraction and verification
- PDF Service (Port 8005): PDF document processing
- Frontend (Port 3000): React-based user interface
- Responsible AI Framework: IBM-based AI ethics and compliance
- Data Encryption: End-to-end encryption for user data
- Multi-Service Architecture: Microservices for scalability
- Real-time Processing: Live agent coordination and status updates
This project is for academic and research purposes. Please verify downstream data source terms (CourtListener API) before commercial use.
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests for new functionality
- Submit a pull request
For questions or issues, please contact the development team or create an issue in the repository.
Built with β€οΈ by the VeritasAI Team