Alex, a learning assistant for Slack

Alex turns everyday work questions in Slack into short, personalised learning paths. I built it alone: a Slack bot on a LangGraph state machine, with a FastAPI backend, Supabase and deployment on Google Cloud Run.

When
around Jan to Feb 2026
Status
Offline The Cloud Run service is switched off.
Where
Own project
Built with
LangGraph, Slack Bolt, FastAPI, Supabase, GCP
Made as
Individual project

About the project

People ask Alex what they want to learn, right in Slack. After two short questions (why, and how experienced they are), Alex proposes a learning path of three milestones, each with a starting point and a goal. The learner can edit a milestone, regenerate the path or start over before accepting it.

Alex then teaches each milestone in short chunks with a progress bar, asks the learner to reflect in their own words, and closes with a quick check. Every answer gets an explanation, and the path moves on to the next milestone.

Under the hood, a LangGraph state machine routes each message through guardrails, onboarding, intent detection, content generation, fact grounding with Perplexity (Gemini as backup) and a check that the content matches the learning goal, regenerating when it does not. Lessons can also be read aloud with Gemini text-to-speech, falling back to Google Cloud text-to-speech, and learners can answer by voice.

Sessions and conversation history live in Supabase (PostgreSQL), runs are traced in LangSmith, and a FastAPI service reports health and metrics. The bot is packaged with Docker; it ran locally for the demo and was deployed to Google Cloud Run for testing, not kept online. The repository has a suite of about 245 automated tests.

Double-tap the left or right side to jump 10 seconds back or forward, or use the arrow keys.

In Slack, a manager asks Alex to learn about giving feedback. Alex asks why and how experienced they are, proposes a three-milestone learning path that can be edited, then teaches in short lessons with quick checks and feedback on every answer. Recorded in a Slack workspace; waiting times are sped up. Music: “Carefree” by Kevin MacLeod, licensed under CC BY 4.0.

How it is built

How Alex for Slack is builtSlack talks to a Slack Bolt app over a Socket Mode WebSocket. A LangGraph learning engine keeps each learner's session in Supabase and uses OpenAI, Perplexity and Gemini. A FastAPI service reports health and usage.SlackDocker container on Cloud RunSupabaseAI providersSlack workspacemessages, buttons, voicenotesSlack Bolt appSocket Mode: no public endpointLearning enginea LangGraph state machineMetrics APIFastAPI: health and usageDatabasesessions, learners,organisationsOpenAIGPT-4o and GPT-4o miniPerplexitychecks the factsGeminivoice notes, backup model192837456

A lesson in Slack

Alex runs as a single container. The Slack connection uses Socket Mode, an outgoing WebSocket from the bot to Slack, so nothing has to be open to the internet; a small FastAPI service next to it answers health checks and reports usage per organisation.

Every message goes through a LangGraph state machine that checks it against guardrails, knows where the learner is (onboarding, path, milestone, lesson) and picks the model for each job. The session lives in Supabase and is written in one atomic upsert, because two Slack events for the same person can arrive at the same moment.

Get in touch

Let’s talk if you have a project in mind.