An AI-powered Healthcare CRM application that enables pharmaceutical field representatives to log Healthcare Professional (HCP) interactions using natural language. The application automatically extracts structured CRM data through a LangGraph-powered AI agent and populates the interaction form without manual data entry.
This project was developed as part of an AI-First CRM technical assessment.
- Log HCP interactions using natural language.
- AI extracts structured CRM information automatically.
- Form fields are populated without manual editing.
Extracted fields include:
- HCP Name
- Interaction Type
- Date
- Time
- Attendees
- Topics Discussed
- Materials Shared
- Samples Distributed
- Sentiment
- Outcomes
- Follow-up Actions
The backend uses LangGraph to orchestrate AI workflows.
Implemented tools:
-
Log Interaction
- Converts natural language into structured CRM JSON.
-
Edit Interaction
- Updates selected interaction fields.
-
Search HCP History
- Retrieves previous interaction information.
-
Generate Follow-up Suggestions
- Generates recommended next actions.
-
Generate CRM Summary
- Produces concise interaction summaries.
- React (Vite)
- Redux Toolkit
- React Router
- Axios
- CSS
- Google Inter Font
- FastAPI
- SQLAlchemy
- PostgreSQL
- Pydantic
- LangGraph
- LangChain
- Groq API
- Llama-3.3-70B-Versatile
User
│
▼
React UI
│
▼
Redux Store
│
▼
FastAPI Backend
│
▼
LangGraph Agent
│
▼
Groq LLM
│
▼
Structured JSON
│
▼
PostgreSQL
│
▼
Redux Store
│
▼
Auto-populated CRM Form
AI-First-CRM/
├── frontend/
│ ├── src/
│ │ ├── components/
│ │ ├── pages/
│ │ ├── redux/
│ │ ├── services/
│ │ ├── styles/
│ │ └── App.jsx
│ └── package.json
│
├── backend/
│ ├── app/
│ │ ├── database/
│ │ ├── models/
│ │ ├── routers/
│ │ ├── schemas/
│ │ ├── services/
│ │ ├── graph.py
│ │ └── main.py
│ └── requirements.txt
│
└── README.md
The application uses PostgreSQL with SQLAlchemy ORM.
Tables include:
- HCP
- Interactions
- Materials
- Samples
- Follow-ups
Relationships are maintained between HCPs and their interaction records.
git clone https://github.com/prathyusha031/AI-First-CRM.git
cd AI-First-CRMNavigate to backend.
cd backendCreate virtual environment.
python -m venv venvActivate environment.
Windows
venv\Scripts\activateInstall dependencies.
pip install -r requirements.txtCreate a .env file.
GROQ_API_KEY=your_api_key
DATABASE_URL=your_postgresql_connection_string
Run backend.
uvicorn app.main:app --reloadBackend runs at
http://127.0.0.1:8000
Swagger API
http://127.0.0.1:8000/docs
Open another terminal.
cd frontendInstall packages.
npm installRun development server.
npm run devFrontend runs at
http://localhost:5173
Input
Met Dr. Sharma on 2024-04-16 at 2 PM.
Discussed Product X.
Shared one brochure and one sample.
Doctor was positive.
Outcome: Doctor agreed to try Product X.
Follow up on 2024-04-23.
Automatically Extracted
- HCP Name
- Meeting
- Date
- Time
- Topics
- Materials
- Samples
- Sentiment
- Outcomes
- Follow-up
The interaction form updates automatically through Redux.
- User enters natural language.
- Request is sent to FastAPI.
- LangGraph selects the appropriate tool.
- Groq LLM processes the request.
- Structured JSON is returned.
- Data is stored in PostgreSQL.
- Redux updates the application state.
- CRM form refreshes automatically.
- AI Chat Assistant
- HCP Interaction Form
- Automatic CRM Population
- LangGraph AI Processing
- PostgreSQL Storage
- Five AI Tools
- Voice interaction support
- Database-backed HCP history retrieval
- Calendar integration for follow-ups
- Authentication and role-based access
- Multi-user CRM collaboration
- Advanced analytics dashboard
Bailapudi Prathyusha
GitHub
https://github.com/prathyusha031
https://www.linkedin.com/in/bailapudiprathyusha
This project demonstrates an AI-First CRM workflow where conversational AI replaces manual CRM data entry. By integrating React, Redux, FastAPI, PostgreSQL, LangGraph, LangChain, and Groq LLM, the application automatically converts natural language interactions into structured CRM records, providing an efficient and production-oriented healthcare CRM experience.