Skip to content

anmol0b/tailorTalk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

21 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

TailorTalk πŸ—“οΈ

Book Google Calendar meetings in plain English β€” powered by LLaMA 4, LangChain, and FastAPI.

Python FastAPI Streamlit LangChain


What it does

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.


Architecture

TailorTalk Architecture

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)

Quickstart

1. Environment

python3 -m venv .venv
source .venv/bin/activate
pip install --upgrade pip
pip install -r requirements.txt

2. Configure .env

cp .env.example .env
GROQ_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

3. Google Calendar setup

  1. Go to Google Cloud Console β†’ enable Google Calendar API
  2. Create a Service Account β†’ download the JSON credentials β†’ place it in the project root
  3. Open Google Calendar β†’ Settings β†’ your calendar β†’ Share with specific people
  4. Add your service account email (found in the JSON as client_email) with "Make changes to events" permission
  5. 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'))
"

4. Run

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

Example prompts

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?

Verify it's working

# 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": []}'

Troubleshooting

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

Project structure

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

Roadmap

  • OAuth2 login β€” let any user connect their own Google Calendar
  • Cancel meetings by title/date
  • Telegram bot interface
  • Deployed public demo

License

MIT

About

TailorTalk 🧡 β€” AI Calendar Booking Assistant

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages