A production-ready AI agent web app for Financial Advisors. Connects Gmail, Google Calendar, and HubSpot CRM with an intelligent assistant that can send emails, schedule meetings, manage contacts, and follow ongoing instructions automatically.
- π€ AI Agent - GPT-4o-mini powered assistant with tool calling
- π§ Gmail Integration - Send, read, and search emails
- π Calendar - Find availability and schedule meetings
- π₯ HubSpot CRM - Search contacts, create notes
- π RAG Search - Vector search across emails and CRM data
- π Ongoing Instructions - Set rules the agent follows automatically
- β³ Async Tasks - Long-running workflows that resume on events
- "Send an email to john@example.com about our meeting"
- "Find available time slots next week"
- "Search for clients who mentioned retirement"
- "Schedule a meeting with Sarah Jones"
- "Always notify me when VIP clients email"
- Node.js 18+
- PostgreSQL 14+ with pgvector extension
- Google Cloud Console project (for OAuth)
- OpenAI API key
- HubSpot developer account (optional)
git clone <repository-url>
cd Jump
# Install all dependencies
npm install# Create PostgreSQL database with pgvector
psql -U postgres -c "CREATE DATABASE advisor_agent;"
psql -U postgres -d advisor_agent -c "CREATE EXTENSION IF NOT EXISTS vector;"Create backend/.env:
# Database
DATABASE_URL="postgresql://postgres:password@localhost:5432/advisor_agent"
# Server
PORT=3001
FRONTEND_URL=http://localhost:3000
JWT_SECRET=your-secure-jwt-secret-here
# OpenAI
OPENAI_API_KEY=sk-your-openai-key
# Google OAuth (see GOOGLE_OAUTH_SETUP.md)
GOOGLE_CLIENT_ID=your-google-client-id
GOOGLE_CLIENT_SECRET=your-google-client-secret
GOOGLE_REDIRECT_URI=http://localhost:3001/auth/google/callback
# HubSpot OAuth (optional, see HUBSPOT_SETUP.md)
HUBSPOT_CLIENT_ID=your-hubspot-client-id
HUBSPOT_CLIENT_SECRET=your-hubspot-client-secret
HUBSPOT_REDIRECT_URI=http://localhost:3001/auth/hubspot/callbackCreate frontend/.env.local:
NEXT_PUBLIC_API_URL=http://localhost:3001cd backend
npm run db:push
npm run db:generate# From project root
npm run devThis starts:
- Backend: http://localhost:3001
- Frontend: http://localhost:3000
cd backend
npm run db:seed- Go to Google Cloud Console
- Create a new project or select existing
- Enable Gmail API and Google Calendar API
- Configure OAuth consent screen
- Create OAuth 2.0 credentials
- Add authorized redirect URI:
http://localhost:3001/auth/google/callback
See GOOGLE_OAUTH_SETUP.md for detailed instructions.
- Go to HubSpot Developer Portal
- Create a new app
- Configure OAuth scopes:
crm.objects.contacts.read,crm.objects.contacts.write - Add redirect URL:
http://localhost:3001/auth/hubspot/callback
See HUBSPOT_SETUP.md for detailed instructions.
Jump/
βββ backend/ # Express + TypeScript API
β βββ src/
β β βββ agent/ # AI agent loop and tools
β β β βββ loop.ts # Core agent execution
β β β βββ proactive.ts # Event-driven actions
β β β βββ tools/ # Tool definitions & executor
β β βββ jobs/ # Background jobs (email polling)
β β βββ lib/ # Utilities (logger)
β β βββ middleware/ # Auth middleware
β β βββ routes/ # API routes
β β βββ services/ # External API integrations
β β βββ workflows/ # Multi-step workflows
β βββ prisma/
β β βββ schema.prisma # Database schema
β βββ scripts/
β βββ seed-demo.ts # Demo data seeder
βββ frontend/ # Next.js 14 + React
β βββ src/
β β βββ app/ # App router pages
β β βββ components/ # React components
β β βββ lib/ # API client & auth
β βββ tailwind.config.ts
βββ package.json # Monorepo scripts
The AI agent has access to these tools:
| Tool | Description |
|---|---|
send_email |
Send an email via Gmail |
read_emails |
Read recent emails from inbox |
find_calendar_availability |
Find free time slots |
create_calendar_event |
Schedule a meeting |
list_calendar_events |
View upcoming events |
find_hubspot_contact |
Search CRM contacts |
create_hubspot_contact |
Add new contact |
create_hubspot_note |
Add note to contact |
search_rag |
Vector search emails/CRM |
store_task |
Create async task |
update_task |
Update task status |
add_instruction |
Add ongoing rule |
list_instructions |
View active rules |
remove_instruction |
Delete a rule |
- User sends message
- Agent receives message with tool definitions
- LLM decides which tools to call
- Tools execute and return results
- LLM processes results and responds
- Repeat until no more tool calls needed
- User says "Always reply to VIP clients quickly"
- Agent stores instruction in database
- Email poller detects new email
- Proactive agent evaluates: "Should I act?"
- If yes, executes appropriate action
- User: "Schedule meeting with John"
- Agent sends availability email, creates task
- Task status:
waiting_reply - Email poller detects John's reply
- Workflow resumes, creates calendar event
- Create Web Services for backend and frontend
- Create PostgreSQL database with pgvector
- Configure environment variables
- Deploy from GitHub
See DEPLOYMENT.md for detailed instructions.
curl https://your-backend.onrender.com/health
# {"status":"ok","timestamp":"..."}GET /auth/google- Start Google OAuth flowGET /auth/google/callback- OAuth callbackGET /auth/hubspot- Start HubSpot OAuthGET /auth/me- Get current userPOST /auth/logout- Logout
GET /chat/history- Get message historyPOST /chat- Send message (supports streaming)DELETE /chat/history- Clear history
GET /instructions- List instructionsPOST /instructions- Add instructionPATCH /instructions/:id/deactivate- PauseDELETE /instructions/:id- Delete
GET /rag/stats- Index statisticsPOST /rag/index- Manual reindex
# Run linting
npm run lint
# Type checking
npm run buildMIT
- Fork the repository
- Create feature branch
- Commit changes
- Push to branch
- Open pull request