A personal AI memory that listens, remembers, classifies your tasks, and books them on your calendar, all from a Telegram voice note.
I was using multiple AI tools (Claude, ChatGPT, voice notes, meeting transcripts) but none of them remembered anything from last week. Every conversation started from scratch. Insights I’d shared with one tool were invisible to the others.
Meanwhile, my task management was scattered across sticky notes, chat threads, and mental lists. Things I committed to in meetings would slip through the cracks because they never made it into a system.
Even when I did capture thoughts, the system was passive. It stored them and waited. I still had to remember to process my inbox, pick priorities, book time on my calendar. The friction wasn’t gone. It had just moved.
I needed one place where all my thinking lives, where any AI I use can access it, and where action items don’t just get stored: they get scheduled.
Open Brain is a personal database with AI superpowers that acts like a live-in executive assistant. Here’s how it works:
Recurring tasks and habits. The classifier now spots a repeat rule (“every Monday”, “the 15th of each month”) and a time hint in a voice note. A recurring task gets a 🔁 marker, its calendar events, and Done / Skip / Stop buttons. /habit setup creates a set of recurring tasks and calendar blocks from workout templates.
It asks what happened after a meeting. A job runs every 15 minutes, finds calendar events that just ended, and sends a Telegram prompt to capture notes and next steps. A dedup table makes sure each event is asked about once.
Email capture runs on the server. Gmail is read through OAuth on a pg_cron schedule, so capture works with the laptop closed.
It connects to my other systems. An applied <id> command sends a job to the JobMatch AI queue. The same Supabase project hosts the Wedding Planner backend. Meeting transcripts from the Meeting Notetaker switched to Deepgram’s multilingual model in May, so calls that move between Spanish and English come out clean.
Security and reliability. Row-level security with deny-all rules for anonymous access now covers seven system tables. Scheduled briefings are idempotent per time slot, so a retried job never sends the same briefing twice.
Send a voice note or text to Telegram. It gets transcribed, classified, auto-scheduled on the calendar, and confirmed, with an edit button if you want to tweak it.
The GTD dashboard from Telegram: task counts by state, overdue items, stale waiting-fors.
schedule_intent) disambiguates action day vs deadline. “Friday” alone = on; “by Friday” = by. Scheduler builds different day preferences for each.pg_cron regardless; the briefing only fires if/when the user replies during the morning window. Atomic claim RPC (claim_morning_briefing) prevents double-fires from race conditions between concurrent messages.Stack: Supabase (PostgreSQL + pgvector + Edge Functions + pg_cron), Deno/TypeScript, MCP Protocol (Model Context Protocol), OpenRouter (text-embedding-3-small + Claude Sonnet for classification), Google Calendar API v3 (service-account JWT), Claude Code, Telegram Bot API.
The telegram-capture edge function is the router: receives Telegram webhooks, transcribes voice via Groq Whisper, classifies via OpenRouter, persists the thought with embedding, auto-creates GTD tasks, and auto-books calendar events. The classifier returns a gtd_decisions[] array: one capture can produce multiple tasks (e.g. “text Carlos and schedule with Ana for Friday” = two decisions).
The scheduler module (schedule_event.ts) is a pure block-selection algorithm on top of an async Google Calendar writer. It generates candidate 30-minute slots across four fixed work blocks, queries freeBusy across the user’s main + Open Brain calendars, filters out meetings but keeps all-day blocks out of scope, and picks the earliest conflict-free slot in the intent-aware day preference order.
The free-text edit flow uses a pending_edits table with a 10-minute TTL window. Tap “Edit in words”, type a reply, an LLM patches the row, the calendar event reconciles, a new confirmation replaces the old one. All callbacks are prefixed (ed: for edit, rv: for review) to keep the two flows separate.
The MCP server runs as a Supabase Edge Function exposing capture_thought, search_thoughts, list_thoughts, thought_stats, and the GTD management tools (gtd_add_task, gtd_update_task, gtd_list_tasks, gtd_process_inbox, gtd_manage_project, gtd_dashboard, gtd_weekly_review).
@computer, due Friday, scheduled for Thursday 3:00 PM on the Open Brain calendar (note: “by Friday” = buffer day)./status: GTD dashboard shows both tasks.search_thoughts MCP tool with the same query: same memory accessible from any AI tool.--no-verify-jwt.calendar scope and a user-created “Open Brain” calendar shared with the service-account email.“I send a voice note to Telegram. By the time I finish talking, the task is classified, booked on my calendar in my next free work block, and confirmed with a tap-to-edit button. Meanwhile every thought is semantically searchable from any AI tool I use. It’s the glue between my voice, my tasks, my calendar, and every AI I use.”
applied command, wedding backend, Deepgram multilingual transcripts, RLS on system tables, per-slot briefing idempotency.gtd_decisions[] array) at capture time, free-text “Edit in words” flow with 10-minute TTL, Google Calendar auto-scheduling with on vs by intent semantics, ignore-multi-day-busy-blocks policy, 30-min slot picker across four fixed work blocks, atomic claim RPC for briefing race-safety. ~25 commits across three feature branches fast-forwarded to main; 4 edge functions redeployed. 105/105 Deno tests passing.daily_state table, English-only prompts, atomic claim for morning-briefing piggyback (Codex-reviewed race fix).