agentic-workflows-portfolio

Open Brain

A personal AI memory that listens, remembers, classifies your tasks, and books them on your calendar, all from a Telegram voice note.

hero

The Problem

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.

The Solution

Open Brain is a personal database with AI superpowers that acts like a live-in executive assistant. Here’s how it works:

  1. Capture anything from Telegram. Send a voice note, text, or forwarded email. Transcribed, understood, stored, in seconds.
  2. Auto-classified at the moment of capture. An LLM reads each capture and decides: is this a next action, something I’m waiting on someone else for, a project, or just a thought? What’s the context (@computer, @phone, @errands)? What’s the priority? When is it due? Did I say “on Friday” (do it Friday) or “by Friday” (deadline: do it before)?
  3. Auto-booked on your calendar. When a task has a due date, Open Brain picks the earliest open 30-minute slot in your work blocks (mid-morning, afternoon, evening) and creates the event on a dedicated “Open Brain” Google Calendar. It respects your existing meetings but ignores multi-day busy blocks like travel or OOO. On reclassification or edits, the event reschedules itself.
  4. Block-aware briefings throughout the day. Morning ping at 6 AM (“ready to work?”); when you reply, it piggybacks a full morning briefing with your calendar, priorities, and overdue items. Mid-morning at 10:30, afternoon at 3, nightly review at 9 PM. All timed to actual work blocks, not round-number office hours.
  5. One-tap edits in plain English. Every confirmation comes with a 💬 “Edit in words” button. Reply “due Friday instead” or “change to @phone”. The LLM patches the task, reconciles the calendar event, confirms.
  6. Search by meaning. Ask “what did I say about the Ecuador project?” and it finds relevant thoughts even if you never used those exact words.
  7. Integrates with everything else. Meeting Notetaker pushes action items as tasks. JobMatch AI funnel commands flow through the same router. Notetaker summaries land in the same memory. One brain for all of it.
  8. Works with any AI. Built on the MCP protocol: Claude Code, Claude Desktop, and any future AI tool can plug into the same memory.

What Changed Since April 2026

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.

Screenshots

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.

Result

Key Decisions

Under the Hood

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).

How to Demo It

  1. Open Telegram. Send a voice note: “Remind me to follow up with Maria about the carbon credits proposal by next Friday.”
  2. Show the instant reply: task classified as a next-action, @computer, due Friday, scheduled for Thursday 3:00 PM on the Open Brain calendar (note: “by Friday” = buffer day).
  3. Send a second voice note: “Call Ana on Friday at the cooperative.” Show it scheduled for Friday itself (note: “on Friday” = action day).
  4. Show Google Calendar: both events on the Open Brain calendar, correctly placed.
  5. Tap 💬 Edit in words on one of them: “change to Monday.” Watch the calendar event update in place.
  6. Send /status: GTD dashboard shows both tasks.
  7. Open Claude Code and use search_thoughts MCP tool with the same query: same memory accessible from any AI tool.

Limitations & Setup

Demo Pitch

“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.”

Changelog