This repo includes a LiveKit voice agent plus a LeanMCP backend and Next.js UI to demo a patient intake automation pipeline.
Demo only. Do not enter real PHI.
This project is not HIPAA compliant and does not provide medical advice.
services/agent: LiveKit Agents Python app (src/agent.py)services/mcp: LeanMCP backend (TypeScript) + REST + WebSocket + SQLiteservices/web: Next.js UI
Create a .env at the repo root with:
LIVEKIT_URL=...
LIVEKIT_API_KEY=...
LIVEKIT_API_SECRET=...
LLM_PROVIDER=openai
OPENAI_API_KEY=...
MCP_PORT=4000
DATABASE_PATH=./data/intake.db
MCP_BACKEND_URL=http://localhost:4000
NEXT_PUBLIC_BACKEND_URL=http://localhost:4000
Note: Creating .env.example is blocked in this workspace due to ignore rules. Use the snippet above as a template.
cd services/mcp
npm install
npm run dev
cd services/web
npm install
npm run dev
Open http://localhost:3000.
cd services/agent
uv sync
MCP_BACKEND_URL=http://localhost:4000 uv run src/agent.py start
docker compose up --build
The web UI runs at http://localhost:3000 and the backend at http://localhost:4000.
- Open the web UI and click “Start patient intake”.
- Allow microphone access, speak naturally.
- Confirm transcript is updating and structured fields fill in.
- Click “Finalize intake” to generate summary and export.
- Open
/staff/[session_id]to view the clinician summary and export link.