TaskPilot is a Slack agent that extracts tasks/meetings from natural language, stores them in PostgreSQL, supports Google Calendar/Drive meeting workflows, and provides a Streamlit overview dashboard.
- Extract task or meeting fields (
task,title,description,owners,deadline,urgency) from Slack messages. - Clarification loop for missing fields.
- Meeting flow:
- book a user-provided time
- or suggest common availability after Google OAuth connection.
- Conflict checking before meeting booking.
- Materials flow to append links/Drive files to event descriptions.
- Google backend service for OAuth + Calendar + Drive APIs.
- Reminder pipeline:
- hourly scheduler checks tasks due within the next 14 days
- Slack reminders to assignees
- email reminders via backend Gmail (
/gmail/send) using Google-connected profiles (not desktopclient_secretsflow)
- Streamlit board for DB overview (this week, open tasks, reminder readiness).
app.py
Flask Slack event handler, orchestration flow, meeting booking/materials, scheduler startup.services/google_api.py
FastAPI service for Google OAuth, Calendar, and Drive endpoints.agent/parser.py,agent/prompts.py
Gemini extraction + clarification behavior.agent/scheduler.py
Hourly reminder scheduler (Slack + email).utils/slack.py,utils/gmail_utils.py,utils/gemini.py,utils/time.py
Integrations and shared helpers.databases/db.py,databases/tasks.sql,databases/profiles.sql
PostgreSQL persistence.frontend/streamlit_app.py
Streamlit dashboard over DB state.
- Python 3.12+
- PostgreSQL database
- Slack app and bot token (at least
app_mentions:read,chat:write,users:read) - Gemini API key
- Google OAuth client credentials for Calendar/Drive backend
- ngrok for local Slack event tunneling
Use root .env (and optionally agent-backend/.env) with values such as:
DATABASE_URL=...
GEMINI_API_KEY=...
SLACK_BOT_TOKEN=...
SLACK_SIGNING_SECRET=...
GOOGLE_CLIENT_ID=...
GOOGLE_CLIENT_SECRET=...
BACKEND_API_KEY=...
STATE_SIGNING_SECRET=...
APP_EXTERNAL_URL=http://localhost:8000
API_ENDPOINT=http://localhost:8000pip install -r <your requirements export> # optional style
pip install apscheduler streamlit tzdataOr your existing project sync workflow (uv sync / lock-based flow).
Open separate terminals.
- Flask bot:
flask --app app run --port 3000 --reload- FastAPI Google backend:
uvicorn services.google_api:app --host 127.0.0.1 --port 8000- ngrok tunnel to Flask:
ngrok http 3000If ngrok is not in PATH, run by full executable path.
- Streamlit overview board:
streamlit run frontend/streamlit_app.pySet Slack Event Subscriptions URL to:
https://<ngrok-id>.ngrok-free.app/slack/events
- Initial “task saved” and recurring reminder emails go through
utils/gmail_utils.send_email, which calls the FastAPI backendPOST /gmail/sendwithX-Backend-Key. - The sender profile must have completed
/connect/google(same OAuth as Calendar/Drive, including Gmail send scope). - Reminder cadence is urgency-aware; the scheduler runs hourly and considers deadlines in the next 14 days, with per-recipient spacing stored in Postgres (
last_email_reminder_by_recipient).
- Mention bot in Slack with a task/meeting message.
- Confirm task saved message and DB insert.
- For meetings, connect Google via link and ask for suggestions.
- Book a suggested time and verify event creation.
- Open Streamlit board to confirm task visibility.
- Create a near-term task and verify reminder behavior in Flask logs/inbox.