An intelligent CRM system for Life Sciences field representatives to log and manage interactions with Healthcare Professionals (HCPs). This AI-First CRM uses a natural language AI assistant to automatically extract structured information from user prompts, eliminating manual form filling and streamlining CRM workflows.
- You can test the AI agent using the following example prompts for each tool:
- Log Interaction (
log_interaction_tool)
- "I met Dr Smith today at 3 PM for a meeting about Product X efficiency. John from marketing also attended. I shared brochures and the response was positive. We will follow up on 25 March."
- Edit Interaction (
edit_interaction_tool)
- "Update the last interaction: the HCP name is actually Dr John and the sentiment should be Negative."
- "For my most recent interaction, change the time to 4 PM and add that we discussed pricing as well."
- Add Follow-up (
add_followup_tool)
- "Set the follow-up date for the last interaction to 30 March 2026."
- "Please move the follow-up for my latest interaction to next Monday."
- Update Materials (
update_materials_tool)
- "Also note that I shared the OncoBoost Phase III PDF in the last meeting."
- "Update the materials shared for my last interaction to: brochures, OncoBoost Phase III PDF, dosing guidelines."
- List / Get Interactions (
get_interactions_tool)
- "Show me the last 3 interactions and summarize their sentiments."
- "List my recent interactions with Dr Smith and tell me the sentiment for each.
- Users communicate with an AI assistant through natural language prompts.
- The backend AI agent (LangGraph + Groq LLM) extracts structured fields:
- HCP Name, Date, Time, Topics, Materials Shared, Sentiment, Follow-up Actions, Key Outcomes
- Extracted data is automatically populated in the React CRM form.
- All interactions are saved in PostgreSQL via SQLAlchemy.
| Layer | Technology |
|---|---|
| Backend | FastAPI, Python 3.10+, LangGraph, LangChain, Groq LLM |
| Database | PostgreSQL, SQLAlchemy |
| Frontend | React 18, Redux Toolkit, Axios, CSS |
| Hosting | Render (backend), Vercel (frontend) |
-
The frontend sends a
POST /agent/chatrequest with the user’s message. -
The LangGraph AI agent decides which tool to invoke:
log_interaction– create new interactionedit_interaction– update specific fieldsget_interactions– fetch recent interactionsadd_followup– set or move follow-up datesupdate_materials– update shared materials
-
Tools read/write data in the PostgreSQL database.
-
The backend returns structured fields that automatically populate the frontend form.
-
Left Panel – AI Chat Assistant
- Accepts natural language prompts
- Sends messages to the backend AI agent
- Receives extracted structured fields
-
Right Panel – Interaction Form
- Auto-filled by the AI assistant
- Displays HCP interaction details (e.g., name, date, topics, materials, sentiment, follow-ups) in real-time
For detailed setup, architecture, and usage, see the separate README files in the repository:
- Backend: backend README
- Frontend: frontend README
Each README contains installation instructions, environment variable setup, API documentation (backend), and running the development server (frontend).
- AI-Driven Interaction Logging: Automatically extracts HCP name, date, topics, materials shared, sentiment, follow-up actions, and outcomes from free-text input.
- Editable Interactions: Update only specified fields without overwriting the entire record.
- Follow-Up Management: Automatically suggest or adjust follow-up actions.
- Material Updates: Track and update materials shared during interactions.
- Summary Retrieval: Fetch and summarize recent interactions for quick review.
Ankit Dimri
Full-Stack & AI Developer
📍 Dehradun, India
- Project: AI-First HCP Interaction CRM
- Organization: AIVOA
- Year: 2026