Back to projects
Preview coming soon

Second Brain — Aira, a Personal AI Assistant

The idea

Everything I need to know about my own life and work is scattered across a dozen apps: calendar, email, GitHub, Linear, Slack, Strava, Apple Health, a password manager, my university notes. Second Brain is one assistant, Aira, that sits on top of all of them. I just ask, the way I would ask a human assistant, with no commands to remember. Every source is queried live instead of being copied into a database, so the answers are never stale.

Every message, typed or spoken, goes through a single shared pipeline. A few exact shortcuts handle the unambiguous cases in plain code with no model call. Everything else goes to an intent classifier that routes it to the right source: a RAG knowledge base on Supabase pgvector (with full-text search) for notes and university material, structured workout logs with automatic personal-record detection, or live API calls to Google Calendar, Gmail, GitHub, Linear, Slack, Strava and Apple Health. Voice messages are transcribed, answered, and replied to with synthesized speech, and photos are described by a vision model so a meal, a receipt or a gym machine can enter the same pipeline as text.

The same pipeline powers several front ends: a Telegram bot running as a Vercel webhook (so it works without my computer switched on), a full-screen web interface with a hands-free voice mode over the OpenAI Realtime API that shows in real time which data sources each answer came from, installable web push notifications, and an MCP server that exposes every capability to Claude Code and Cursor. A password-protected Next.js dashboard brings the data together: a daily timeline that overlays heart rate, steps, meals, lessons and workouts, a study planner, a training view, and a view that correlates different sources and refuses to show a correlation until enough data exists to back it.

It is also proactive. Scheduled jobs send a web-researched morning news digest and an evening briefing with tomorrow's agenda and workout, a daily "knowledge pill" with a monthly review, a mood diary check-in with one-tap buttons, and reminders. At midnight it summarises my day from the commits and calendar calls and logs my work hours, which I confirm with a one-word reply.

The latest layer is an agent. From Telegram I can hand a job to a worker running on my own machines: in read-only mode it investigates an issue or a codebase and reports back, and in write mode it works on an isolated git worktree, runs the typecheck and tests, and commits locally. It has no shell, it cannot touch lockfiles, CI or secrets, and nothing is pushed until I tap Approve in Telegram. The push itself is then done by deterministic code, not by the model.

Routing quality is treated as something to test, not guess. A Vitest suite covers the core logic, and an eval set of real phrases that the bot once misrouted is replayed against the live model whenever the router changes.

What it does

Live integrations

  • Google CalendarReads my agenda and can create and edit events from a sentence.
  • GmailRead-only search across my email, queried live.
  • GitHub & LinearRepository info and issue status on demand, like "how is the audio issue going?".
  • SlackRead-only access. Message text is treated as data, never as instructions.
  • Strava & Apple HealthActivities, steps, heart rate and other health metrics, correlated with the rest of my day.
  • BitwardenPasswords fetched through the local CLI. They never pass through the language model and are never read aloud.

Ways to talk to it

  • TelegramText, voice notes and photos. No commands needed for normal use.
  • Web voice modeHands-free voice-to-voice over WebRTC and the Realtime API, with sub-second replies, and I can interrupt it by speaking.
  • MCP serverEvery capability exposed as a tool to Claude Code and Cursor.
  • Push notificationsInstallable web push for reminders and digests.

Automations

  • Morning newsA daily digest researched on the web, with the day's AI breakthrough.
  • Evening briefingTomorrow's agenda, the workout to do and open reminders, in one message.
  • RemindersScheduled in the database, checked every five minutes. Each job is booked once per day, so it never fires twice.
  • Knowledge pills & mood diaryA daily pill with a monthly review, and a nightly mood check-in answered with one tap.
  • Work logAt midnight it reads the day's commits and calendar calls, drafts the entry and asks for the hours. Replying "2,5h" completes it. It also tracks what is still to be invoiced.
  • StudyLecture slides and handwritten notes uploaded as PDFs are converted by Claude into clean Markdown with LaTeX formulas, plus an exam planner.

Coding agent

  • Read-only jobs"Look at this issue and tell me what you would do" runs a Claude Agent SDK session on my repositories.
  • Write jobs with approvalWorks in an isolated git worktree, runs typecheck and tests, commits locally. No push, install or free shell commands.
  • Human in the loopAnything with external effects waits for an Approve tap on Telegram, then deterministic code performs it.
  • Multi-machineSeveral workers can be online. Jobs are claimed atomically, with a preferred machine and a fallback.

Reliability & safety

  • Asks instead of guessingLow-confidence requests get a clarifying question, and anything it has no data for is reported as unsupported rather than forced into the closest category.
  • Remembers the threadKeeps the active topic for 20 minutes so short follow-ups like "and yesterday?" work.
  • No duplicate memoriesNear-identical notes are skipped, and similar ones are offered as a replacement with confirm buttons.
  • Tested routingA Vitest suite across dozens of modules and a replayable eval set of real misrouted phrases.
  • Locked downThe dashboard and the voice and chat APIs sit behind a password and fail closed in production if it is missing.
My role

Designed and built solo, end to end: the routing pipeline, every integration, the voice loop, the scheduled automations, the MCP server, the dashboard, the agent worker and the test and eval tooling. It's the tool I use most every day.