AI-Powered Drug Repurposing Platform
Accelerating the discovery of new therapeutic uses for existing molecules through intelligent multi-agent analysis.
RepurpoAI is an advanced drug repurposing platform that leverages artificial intelligence to identify new therapeutic applications for existing pharmaceutical molecules. Using a sophisticated multi-agent architecture, RepurpoAI autonomously analyzes:
- Clinical Trials Data - Comprehensive trial outcomes and patient data
- Scientific Literature - Research papers and medical publications
- Patent Information - Intellectual property and competitive landscape
- Safety Profiles - Adverse events and pharmacovigilance data
- Market Intelligence - Commercial viability and market dynamics
Through an intuitive conversational interface, RepurpoAI delivers consolidated, actionable reports that help pharmaceutical teams move from hypothesis to decision in weeks instead of months.
- Multi-Agent Intelligence - Specialized AI agents working in concert
- Conversational Interface - Natural language interaction for complex queries
- Automated Report Generation - Comprehensive PDF reports with citations
- Real-time Streaming - WebSocket-based live updates
- Secure Authentication - JWT-based user authentication
- Document Management - Download and archive generated reports
- Modern UI/UX - Built with shadcn/ui and Tailwind CSS
RepurpoAI uses a multi-agent orchestration pattern:
┌─────────────────────────────────────────────────────────┐
│ Master Agent │
│ (Orchestrator & Coordinator) │
└─────────────────────────────────────────────────────────┘
│
┌─────────────────┼─────────────────┐
▼ ▼ ▼
┌──────────────┐ ┌──────────────┐ ┌──────────────┐
│ Clinical │ │ Literature │ │ Safety │
│ Trials Agent │ │ Agent │ │ Agent │
└──────────────┘ └──────────────┘ └──────────────┘
▼ ▼ ▼
┌──────────────┐ ┌──────────────┐ ┌──────────────┐
│ Patent │ │ Market │ │ Report │
│ Agent │ │ Agent │ │ Generator │
└──────────────┘ └──────────────┘ └──────────────┘
- Framework: Next.js 16.0 (React 19.2)
- Language: TypeScript 5
- Styling: Tailwind CSS 4.1
- UI Components: Radix UI + shadcn/ui
- Charts: Recharts
- Markdown: react-markdown
- PDF Generation: Puppeteer, jsPDF
- Storage: Supabase
- Framework: FastAPI
- Language: Python 3.x
- AI/ML: Google ADK (Agent Development Kit)
- Database: PostgreSQL with pgcrypto
- ORM: SQLAlchemy (async)
- Authentication: JWT (OAuth2)
- WebSockets: Native FastAPI WebSocket support
- Node.js 18+ and npm
- Python 3.8+
- PostgreSQL database
- Supabase account (for file storage)
- Google AI API credentials
git clone https://github.com/neelamnagarajgithub/RepurpoAi.git
cd RepurpoAi# Install dependencies
npm install
# Create .env. local file
cp .env.example .env. local
# Configure environment variables
# Add your Supabase, API endpoints, etc.
# Run development server
npm run devThe frontend will be available at http://localhost:3000
# Create virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
cd Repurpo_AI_Agents
pip install -r requirements.txt
# Configure environment variables
cp .env.example .env
# Edit .env with your database, API keys, etc.
# Start FastAPI server
uvicorn Backend.app:app --host 0.0.0.0 --port 8001 --reloadThe backend API will be available at http://localhost:8001
NEXT_PUBLIC_API_URL=http://localhost:8001
NEXT_PUBLIC_WS_URL=ws://localhost:8001
SUPABASE_URL=your_supabase_url
SUPABASE_SERVICE_ROLE_KEY=your_service_role_keyDATABASE_URL=postgresql://user:password@localhost:5432/repurpoai
SECRET_KEY=your_jwt_secret_key
ALGORITHM=HS256
GOOGLE_API_KEY=your_google_ai_api_key
SUPABASE_URL=your_supabase_url
SUPABASE_SERVICE_ROLE_KEY=your_service_role_keyCreate a new user account
{
"email": "user@example.com",
"password": "securepassword",
"full_name": "John Doe"
}Obtain JWT access token (OAuth2 form-encoded)
Store user/assistant messages and create conversations
Retrieve conversation history for authenticated user
Register generated report for user
List all downloadable reports for user
Real-time streaming connection to Master Agent
Client → Server Messages:
{"type": "user_message", "content": "Analyze aspirin for cardiovascular uses"}
{"type": "human_reply", "content": "Yes, continue analysis"}
{"type": "interrupt"}Server → Client Messages:
{"type": "event", "payload": {... }}
{"type": "error", "message": "... "}
{"type": "done"}RepurpoAi/
├── app/ # Next.js app directory
│ ├── page.tsx # Main chat interface
│ ├── login/page.tsx # Authentication page
│ ├── history/page.tsx # Conversation history
│ ├── downloads/page.tsx # Report downloads
│ └── api/ # API routes
│ ├── report/pdf/route.ts # PDF generation
│ └── upload-report/route.ts # Supabase upload
├── components/ # React components
│ ├── conversation-area.tsx # Chat UI
│ ├── prompt-box.tsx # Input component
│ ├── footer.tsx # Report generation
│ └── ui/ # shadcn/ui components
├── Repurpo_AI_Agents/ # Backend & AI agents
│ ├── Backend/
│ │ ├── app.py # FastAPI entry point
│ │ └── src/
│ │ ├── auth. py # Authentication router
│ │ ├── db.py # Database initialization
│ │ └── models.py # SQLAlchemy models
│ ├── Master_Agent/
│ │ └── agent.py # Master orchestrator agent
│ ├── Clinical_Agent/ # Clinical trials analysis
│ ├── Literature_Agent/ # Scientific literature mining
│ ├── Safety_Agent/ # Safety & pharmacovigilance
│ ├── Patent_Agent/ # Patent landscape analysis
│ └── Market_Agent/ # Market intelligence
├── public/
│ └── icon.png # RepurpoAI logo
├── styles/ # Global styles
├── lib/ # Utility functions
└── package.json # Frontend dependencies
app/page.tsx- Main entry point with WebSocket connection and chat interfacecomponents/conversation-area.tsx- Message display with markdown renderingcomponents/prompt-box.tsx- User input componentapp/api/report/pdf/route.ts- Server-side PDF generation using Puppeteer
Backend/app.py- FastAPI application with WebSocket supportBackend/src/auth.py- JWT authentication and protected routesBackend/src/db.py- Database models and initializationMaster_Agent/agent.py- ADK-based orchestrator agent
- Sign up / Log in to your RepurpoAI account
- Ask a question in natural language:
"What are potential repurposing opportunities for metformin in neurodegenerative diseases?" - Watch real-time as agents analyze data sources
- Receive consolidated report with citations and recommendations
- Download PDF for offline review and sharing
- JWT-based authentication with secure token storage
- OAuth2 password flow implementation
- Password hashing with industry-standard algorithms
- CORS configuration for controlled access
- Environment-based secrets management
- PostgreSQL
pgcryptoextension for UUID generation
If PDF generation fails, add launch arguments:
await puppeteer.launch({
args: ['--no-sandbox', '--disable-setuid-sandbox']
})Ensure PostgreSQL is running and pgcrypto extension is enabled:
CREATE EXTENSION IF NOT EXISTS pgcrypto;Check that:
- Backend is running on specified port
- CORS origins include your frontend URL
- Firewall allows WebSocket connections
Contributions are welcome! Please follow these guidelines:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Add tests for new features
- Follow existing code style and linting rules
- Keep agent tools deterministic and well-documented
- Return structured JSON outputs from agents
- Update documentation for API changes
This project is licensed under the MIT License - see the LICENSE file for details.
- Neelam Nagaraj - @neelamnagarajgithub, Role: Web Development, API Integeration
- Shatakshi Palli - @Shatakshipalli, Role: Agent Development
- Google ADK for agent orchestration framework
- FastAPI for high-performance async API
- Next.js team for the amazing React framework
- shadcn/ui for beautiful UI components
- Supabase for backend services
For questions, issues, or feature requests, please open an issue on GitHub.