HCP Copilot is a modern, AI-first Customer Relationship Management (CRM) platform built specifically for pharmaceutical field representatives. It reimagines the traditional CRM experience by replacing manual data entry with an intelligent AI Agent. Users simply converse with the AI in natural language, and the agent dynamically logs interactions, extracts key entities, generates meeting summaries, and recommends prioritized follow-up actions.
- Conversational UI: Log meetings and interactions through a natural chat interface.
- AI-Driven Orchestration: Powered by LangGraph, the AI agent dynamically selects the right tools to execute tasks without hardcoded logic.
- Live State Synchronization: The CRM interface updates in real-time as the AI agent processes the conversation and modifies database records.
- Smart Summarization: Automatically synthesizes complex clinical discussions into clean, professional summaries.
- Intelligent Follow-ups: Evaluates meeting sentiment and outcomes to automatically suggest prioritized next steps and follow-up dates.
- Manual Override Mode: Seamlessly switch between AI-assisted logging and traditional manual form editing, with full tracking of whether a field was modified by a human or AI.
- Backend: Python 3, FastAPI, SQLAlchemy 2.0 (SQLite/PostgreSQL)
- AI/LLM: LangGraph (ReAct Agent Workflow), LangChain, Groq API (Llama 3.1 8B)
- Frontend: React 18, TypeScript, Vite, Redux Toolkit, Tailwind CSS v3
- Node.js (v18 or higher)
- Python (v3.10 or higher)
- A free Groq API Key for the LLM.
- Navigate to the backend directory:
cd backend - Create and activate a Python virtual environment:
python -m venv .venv # On Windows: .\.venv\Scripts\activate # On macOS/Linux: source .venv/bin/activate
- Install dependencies:
pip install -r requirements.txt
- Set up environment variables:
Copy
.env.exampleto.envand add your Groq API key:cp .env.example .env
- Run the database migrations (creates local SQLite DB):
alembic upgrade head
- Open a new terminal and navigate to the frontend directory:
cd frontend - Install Node dependencies:
npm install
- Copy the environment variables:
cp .env.example .env
You can start both the frontend and backend servers concurrently from the project root directory using a single command:
# In the root directory (HCF/)
npm run devAlternatively, you can run them separately:
- Backend:
cd backend && uvicorn app.main:app --reload --port 8000 - Frontend:
cd frontend && npm run dev
Open your browser and navigate to:
- Web UI: http://localhost:5173
- API Docs: http://localhost:8000/docs
- Open the Web UI and look at the right-hand AI Assistant Panel.
- Click one of the Quick Prompts (e.g., "Log CardioX Visit"), or type a summary of a recent HCP meeting.
- Watch the AI Activity Timeline update in real-time as the agent parses intent, selects tools, and updates the CRM.
- See the Left CRM Interaction State populate instantly with the extracted data.
- Click "Generate Meeting Summary" to generate a final report.