An extensible AI assistant built with LangGraph and Node.js that can perform real actions through tools.
https://lara-assistant.onrender.com
- Conversational AI — Powered by Groq LLM with tool-calling capabilities
- Google Calendar Integration — List, create, update, delete, and view calendar events
- Web Search — Search the internet in real-time using Tavily
- Session Memory — Maintains conversation context per session via LangGraph checkpointer
- Auto OAuth Flow — Automatically opens browser for Google authentication on first run
- REST API — Clean Express.js API for easy integration with any frontend
- Built-in Chat UI — Dark-themed web interface served at
http://localhost:3000
┌─────────────┐ ┌──────────────┐ ┌──────────────┐
│ REST API │────▶│ LangGraph │────▶│ Groq LLM │
│ (Express) │ │ (Graph) │◀────│ (GPT-OSS) │
│ server.js │ │ graph.js │ │ llm.js │
└─────────────┘ └──────┬───────┘ └──────────────┘
│
┌──────▼───────┐
│ Tools │
│ tools.js │
├──────────────┤
│ • Web Search │
│ • List Events│
│ • Create │
│ • Update │
│ • Delete │
│ • Get Event │
└──────────────┘
PersonalAssistance/
├── public/
│ └── index.html # Chat UI (dark-themed)
├── assets/
│ └── chat-ui.png # Screenshot for README
├── server.js # Express server with REST API & OAuth routes
├── index.js # Chat function entry point
├── graph.js # LangGraph state graph (LLM ↔ Tools loop)
├── llm.js # Groq LLM configuration with tool binding
├── tools.js # Tool definitions (web search + calendar CRUD)
├── googleCalendar.js # Google Calendar API wrapper (OAuth + operations)
├── package.json # Dependencies and project config
├── .env # Environment variables (not committed)
└── .gitignore # Git ignore rules
- Node.js v22.13+ (uses the built-in
node:sqlitemodule) - Google Cloud project with Calendar API enabled
- Groq API key
- Tavily API key
git clone <your-repo-url>
cd PersonalAssistance
npm installCreate a .env file in the project root:
GROQ_API_KEY="your-groq-api-key"
TAVILY_API_KEY="your-tavily-api-key"
GOOGLE_CLIENT_ID="your-google-client-id"
GOOGLE_CLIENT_SECRET="your-google-client-secret"
OAUTH_REDIRECT_URI="http://localhost:3000/oauth/callback"
ENCRYPTION_KEY="your-random-32-character-secret-key"- AES-256-GCM Encryption at Rest: User refresh tokens stored in
data/lara.dbare encrypted using AES-256-GCM authenticated encryption usingENCRYPTION_KEY. - Git Ignored Database: The
data/directory is excluded from git via.gitignore, so SQLite databases and token keys are never committed to open-source repositories. - Dynamic Per-User OAuth: OAuth refresh tokens are scoped per session and managed safely via local popup authentication.
POST /chat
Content-Type: application/json
{
"message": "What's on my calendar this week?",
"sessionId": "user-123"
}Response:
{
"message": "You have 3 events this week: ..."
}| Endpoint | Method | Description |
|---|---|---|
/auth/google |
GET | Redirects to Google consent screen |
/oauth/callback |
GET | Handles OAuth callback and saves refresh token |
| Tool | Description |
|---|---|
webSearch |
Search the internet using Tavily |
listCalendarEvents |
List upcoming calendar events |
createCalendarEvent |
Create a new calendar event |
updateCalendarEvent |
Update an existing event |
deleteCalendarEvent |
Delete a calendar event |
getCalendarEvent |
Get full details of a specific event |
- Runtime: Node.js (ES Modules)
- LLM: Groq (
openai/gpt-oss-120b) - Framework: LangChain + LangGraph
- Web Search: Tavily
- Calendar: Google Calendar API v3
- Server: Express.js v5
ISC
