I built an AI agent that queries GitHub + Notion + Google Calendar as SQL — here's how
The Problem
Every morning I waste 20 minutes checking three different tools — GitHub for open issues, Google Calendar for meetings, and Notion for tasks. I wanted one place that shows me everything at once.
The Solution: Morning First Mate
Morning First Mate is a personal AI agent that queries GitHub, Google Calendar, and Notion simultaneously using Coral SQL and delivers a pirate-themed morning briefing every day.
What is Coral?
Coral is an open-source query layer that turns any API into a SQL table. Instead of writing separate API integrations for each tool, you write one SQL query across all of them.
For example, this single query fetches my GitHub repos:
SELECT full_name, description FROM github.user_repos LIMIT 5
No API wrapper. No pagination code. No auth handling. Coral does it all automatically — and everything runs 100% locally on your machine.
Architecture
Coral CLI — connects GitHub, Google Calendar, Notion as SQL tables
Python + Flask — backend agent server
Mistral AI — generates the morning briefing from real data
Vanilla HTML/CSS/JS — beautiful pirate-themed frontend
How I Built It
Step 1 — Install Coral on Windows
Invoke-WebRequest -Uri "https://github.com/withcoral/coral/releases/latest/download/coral-x86\_64-pc-windows-msvc.zip" -OutFile "coral.zip" Expand-Archive -Path "coral.zip" -DestinationPath "coral" -Force Copy-Item "coral\coral.exe" "$env:USERPROFILE.local\bin\coral.exe"
Step 2 — Add Your Data Sources
coral source add --interactive google_calendar coral source add --interactive notion coral source add --interactive github
Coral walks you through authentication for each source interactively. Google Calendar uses OAuth, Notion uses an API token, and GitHub uses a Personal Access Token.
Step 3 — Query Everything as SQL
coral sql "SELECT full_name, open_issues_count FROM github.user_repos WHERE open_issues_count > 0 LIMIT 5"
This returns a clean table of your GitHub repos with open issues. No API calls, no pagination, no rate limit handling — Coral does it all.
Step 4 — Build the Python Agent
The agent runs Coral SQL queries using subprocess, collects results from all three sources, and passes them to Mistral AI:
def get_morning_briefing(): github_repos = run_coral_query("SELECT full_name, description FROM github.user_repos LIMIT 5") calendar_today = run_coral_query("SELECT summary FROM google_calendar.events LIMIT 10") notion_pages = run_coral_query("SELECT * FROM notion.search LIMIT 5")
# Pass real data to Mistral AI
response = client_ai.chat.complete(
model="mistral-small-latest",
messages=[{"role": "user", "content": f"Generate morning briefing from: {github_repos} {calendar_today} {notion_pages}"}]
)
return response.choices[0].message.content
Step 5 — Flask API + Beautiful Frontend
A Flask server exposes /briefing and /chat endpoints. The frontend is a dark ocean-themed single HTML file with pirate aesthetics showing the briefing in organized cards.
The Result
Every morning I get a briefing like this:
"Ahoy Captain VignanNallani! Your fleet of repositories stands ready. One open issue awaits your keen eye on vectorshift-assessment. The seas are clear on your calendar today — chart your own course!"
What I Learned
Coral completely changes how AI agents access data. Instead of 100 lines of API glue code per source, I write 3 SQL queries. The cross-source joining capability is incredibly powerful for building personal agents.
The biggest surprise was how fast Coral is — queries return in under 2 seconds even across multiple sources simultaneously.
Try It Yourself
GitHub: https://
