How I Built an AI Agent That Queries GitHub, Calendar, and Sleep Data With One SQL Interface

A practical guide to Coral — the local-first SQL runtime that gives your agents a single query layer over any API

I spent the better part of a week building an agent that could answer questions like "why am I not productive lately?" The idea was simple: pull data from GitHub, Google Calendar, and sleep tracking, cross-reference everything, and get an AI answer.

The hard part turned out to be the data plumbing. Every source has its own auth, its own pagination, its own quirks. By the time I had GitHub and Calendar talking to the same script, I had written more glue code than actual agent logic.

Then I found Coral.