Book Google Calendar meetings in plain English β powered by LLaMA 4, LangChain, and FastAPI.
Type a natural language message like:
"Book a 30-minute call tomorrow at 3 PM with john@example.com about design review"
TailorTalk parses the intent, checks availability, and creates a real event on your Google Calendar β no forms, no clicking.
Stack:
- Frontend β Streamlit (
streamlitApp/app.py) - Backend β FastAPI (
app/main.py) - AI Agent β LangChain + Groq LLaMA 4 Scout (
app/agent.py) - Calendar β Google Calendar API via service account (
app/calendarUtils.py)
python3 -m venv .venv
source .venv/bin/activate
pip install --upgrade pip
pip install -r requirements.txtcp .env.example .envGROQ_API_KEY=your_groq_api_key
GOOGLE_SERVICE_ACCOUNT_FILE=your-service-account.json
GOOGLE_CALENDAR_ID=your-email@gmail.com
APP_TIMEZONE=Asia/Kolkata # optional, default: Asia/Kolkata
BACKEND_PORT=8000 # optional
FRONTEND_PORT=8501 # optional- Go to Google Cloud Console β enable Google Calendar API
- Create a Service Account β download the JSON credentials β place it in the project root
- Open Google Calendar β Settings β your calendar β Share with specific people
- Add your service account email (found in the JSON as
client_email) with "Make changes to events" permission - Run the one-time setup to link the calendar:
python -c "
from dotenv import load_dotenv; load_dotenv()
import os
from google.oauth2 import service_account
from googleapiclient.discovery import build
creds = service_account.Credentials.from_service_account_file(
os.getenv('GOOGLE_SERVICE_ACCOUNT_FILE'),
scopes=['https://www.googleapis.com/auth/calendar']
)
service = build('calendar', 'v3', credentials=creds)
result = service.calendarList().insert(body={'id': os.getenv('GOOGLE_CALENDAR_ID')}).execute()
print('Linked:', result.get('id'))
"python start.py| Service | URL |
|---|---|
| Frontend | http://localhost:8501 |
| Backend | http://localhost:8000 |
| API Docs | http://localhost:8000/docs |
Or run manually in two terminals:
# Terminal 1
uvicorn app.main:app --reload --host 0.0.0.0 --port 8000
# Terminal 2
streamlit run streamlitApp/app.py --server.port 8501| Intent | Example |
|---|---|
| Book a meeting | Book a 30-min call tomorrow at 3 PM with john@example.com about onboarding |
| Schedule for next week | Schedule a 1-hour sprint planning next Monday at 10 AM with team@company.com |
| View schedule | Show my upcoming meetings |
| General help | What can you do? |
# Health check
curl http://localhost:8000/health
# Test booking via API directly
curl -X POST http://localhost:8000/chat \
-H "Content-Type: application/json" \
-d '{"user_input": "Book a meeting tomorrow at 3 PM with john@example.com", "chat_history": []}'| Error | Fix |
|---|---|
Failed to initialize Google Calendar service |
Check GOOGLE_SERVICE_ACCOUNT_FILE path in .env |
Calendar service not available (404) |
Run the one-time calendar link script in step 3 above |
forbiddenForServiceAccounts (403) |
Ensure attendees are not passed as formal invites β stored in description instead |
ModuleNotFoundError |
Activate your virtualenv: source .venv/bin/activate |
| Frontend shows backend offline | Make sure python start.py is running and backend is on port 8000 |
tailorTalk/
βββ app
βΒ Β βββ __init__.py
βΒ Β βββ __pycache__
βΒ Β βΒ Β βββ __init__.cpython-310.pyc
βΒ Β βΒ Β βββ agent.cpython-310.pyc
βΒ Β βΒ Β βββ calendarUtils.cpython-310.pyc
βΒ Β βΒ Β βββ main.cpython-310.pyc
βΒ Β βββ core
βΒ Β βΒ Β βββ __init__.py
βΒ Β βΒ Β βββ __pycache__
βΒ Β βΒ Β βββ config.py
βΒ Β βββ main.py
βΒ Β βββ models
βΒ Β βΒ Β βββ __init__.py
βΒ Β βΒ Β βββ __pycache__
βΒ Β βΒ Β βββ schemas.py
βΒ Β βββ routers
βΒ Β βΒ Β βββ __init__.py
βΒ Β βΒ Β βββ __pycache__
βΒ Β βΒ Β βββ chat.py
βΒ Β βββ services
βΒ Β βββ __init__.py
βΒ Β βββ __pycache__
βΒ Β βββ agent_service.py
βΒ Β βββ booking.py
βΒ Β βββ calendar_service.py
βββ public
βΒ Β βββ tailortalk architecture.png
βββ README.md
βββ .env.example
βββ requirements.txt
βββ start.py
βββ streamlitApp
βββ app.py
- OAuth2 login β let any user connect their own Google Calendar
- Cancel meetings by title/date
- Telegram bot interface
- Deployed public demo
MIT
