Ask your Slack threads, don't scroll them
A Slack bot that saves long threads as knowledge and answers questions from them — with citations — so you stop scrolling back to the same thread for the fourth time.
Why I built it
At one company I worked at, a client dropped genuinely valuable information into Slack — but always as long, sprawling threads. Every time we built a feature, we had to dig back through those threads for the one detail we needed: scrolling for ages, coming back to the same thread three or four times, and losing the plot entirely when the answer was split across two of them.
I'd been reading about Retrieval-Augmented Generation and it clicked — this was the perfect use case. Plot twist: I got let go before I could ship it at work 😅. So I built the whole thing on my own time anyway and left it free and open-source, for anyone who's ever rage-scrolled a Slack thread.
How it works
The bot lives in Slack and does two things: save threads as knowledge, and answer questions grounded in what's been saved — always with sources.
When you mention it, a hybrid router figures out what you want: a keyword fast-path catches obvious "save" commands with no LLM call, and everything else goes to a small, fast model that classifies the intent as save, query, or unclear.
- Save: the thread is cleaned of noise (greetings, thanks, join messages), embedded, and stored in Postgres/pgvector — deduplicated per thread
- Query: your question is embedded, matched against saved threads by vector similarity, and answered by the main LLM using that context, with the source threads cited
Design decisions
A few things I cared about:
- Provider-agnostic: swap the whole AI stack (Claude + Voyage embeddings ↔ OpenAI) or the database with a single environment variable each
- Async-safe: Slack expects a response within ~3 seconds or it retries and you get duplicate replies, so the bot acknowledges immediately and does the real work in the background
- Idempotent saves: re-saving a thread replaces its old rows instead of duplicating them, which makes Slack's automatic retries harmless
Outcome
It works end to end, and it's open-source and free — anyone can point it at their own Slack workspace and Postgres, pick a provider, and get a searchable, cited memory of their threads. More than the tool itself, this was the project where RAG went from a buzzword I'd read about to something I'd actually built, wired up, and shipped.