"I joined NCR and inherited 16 years of undocumented legacy code. Every question I couldn't find in the docs meant waiting hours for a teammate. I built LegacyBot so no new engineer ever has to feel that way again." — Himabindu Pyata, Builder
LegacyBot is a Slack AI assistant that helps new engineers on legacy codebases get unblocked instantly — without waiting for a senior teammate.
Instead of:
"I don't understand this code, let me wait for someone to be free..."
Engineers do:
@LegacyBot why does the ATM reconciliation job run at 2am?
And get an instant answer from 3 sources simultaneously:
- Company documents & runbooks (RAG pipeline)
- Past Slack discussions
- GitHub commit history — explains WHY code was written
This project was built for the Slack Agent Builder Challenge hackathon.
- Track: New Slack Agent + Slack Agent for Good
- Technologies used: Slack Bolt SDK + MCP + Real-Time Search API
- Problem solved: New engineer onboarding on legacy codebases
| Feature | Description |
|---|---|
| Document Q&A | Upload PDFs — LegacyBot answers from real company docs using RAG + FAISS |
| Slack History Search | Searches past channel discussions for relevant answers |
| GitHub Commit Search | Explains WHY code changes were made from git history |
| AI Fallback | Falls back to GPT-4o-mini general knowledge when no docs match |
| Fast Startup | FAISS index saved to disk — instant loading on restart |
| Live Reload | Add new docs without restarting: @LegacyBot reload docs |
| Help Command | @LegacyBot help shows all commands |
New engineer: @LegacyBot what changes were made to the payment service?
LegacyBot: Here's what I found:
Searched: Documents | Slack | GitHub
From your documents:
The payment service was refactored in Q3 2022 to support
multi-currency transactions per compliance requirement...
From past Slack discussions:
Team discussed switching from synchronous to async
processing to handle peak load during holidays...
From GitHub commit history:
[abc1234] 2022-09-14 by John Smith:
"Migrated payment service to async — reduced timeout
errors by 40% during Black Friday load testing"
| Technology | Purpose |
|---|---|
| Python | Core language |
| Slack Bolt SDK | Slack app framework |
| OpenAI GPT-4o-mini | Answer generation |
| LangChain | RAG pipeline orchestration |
| FAISS | Vector similarity search |
| OpenAI Embeddings | Document vectorization |
| PyGithub | GitHub commit search |
| Slack SDK | Channel history search |
| python-dotenv | Environment management |
git clone https://github.com/HimabinduPyata/legacybot.git
cd legacybotpython3 -m venv venv
source venv/bin/activatepip install slack-bolt openai faiss-cpu python-dotenv \
pypdf langchain langchain-openai \
langchain-community PyGithubtouch .envAdd to .env:
SLACK_BOT_TOKEN=xoxb-your-token
SLACK_SIGNING_SECRET=your-signing-secret
SLACK_APP_TOKEN=xapp-your-app-token
OPENAI_API_KEY=sk-your-openai-key
GITHUB_TOKEN=ghp-your-github-token
GITHUB_REPO=your-username/your-repo
mkdir documents
cp your-company-docs.pdf documents/python3 app.py| Command | Description |
|---|---|
@LegacyBot <any question> |
Search all sources and answer |
@LegacyBot help |
Show all commands |
@LegacyBot reload docs |
Reload documents without restart |
legacybot/
├── app.py # Main Slack bot + event handler
├── rag.py # RAG pipeline (FAISS + LangChain)
├── slack_search.py # Slack channel history search
├── github_search.py # GitHub commit history search
├── documents/ # Upload your PDFs here
├── .env # Secret keys (never commit!)
├── .gitignore
└── README.md
app_mentions:read
chat:write
channels:history
channels:read
files:read
groups:read
im:read
mpim:read
Himabindu Pyata — Software Engineer with 5 years experience in Java, Python, and cloud systems.
Built with ❤️ for the Slack Agent Builder Challenge 2026