ContextKeeper is a local-first AI agent that connects GitHub, Slack, and Documentation to provide contextual memory for your team. It answers "why" questions about code decisions by leveraging a Knowledge Graph and RAG (Retrieval-Augmented Generation).
π New to ContextKeeper? Check out the complete documentation for detailed guides, or jump to Usage Examples to see it in action.
- Features
- Architecture
- Prerequisites
- Installation
- Quick Start
- Usage
- API Reference
- Contributing
- License
- Support
- π Robust Error Handling: Automatic retries, rate limit handling, and graceful error recovery.
- π¬ Slack Integration: Collect team discussions and decisions from Slack channels.
- πΈοΈ Real Knowledge Graph: Automatically discover relationships between people, modules, and decisions.
- ποΈ Multi-Repository Support: Separate ChromaDB instances for each repository (Path:
./chroma_db_{repository_name}). - π€ Context-Aware Answers: Uses Hugging Face's Llama-3.2-3B-Instruct model and SentenceTransformer embeddings.
- Orchestration: Kestra (Docker)
- Backend API: Node.js + Express
- AI Engine: Python (Hugging Face + ChromaDB)
- Frontend: React + Vite
- Database: MongoDB (Local or Atlas) & ChromaDB (Vector)
π For detailed architecture information, see the Developer Guide and Architecture Overview.
This project implements specific features to qualify for the following Hackathon tracks:
- Implementation: The
kestra/flows/unified-contextkeeper-flow-v2.ymldefines a comprehensive workflow that collects data from Slack, GitHub, and Notion. - AI-Driven Logic: It uses the Interface-based AI Agent pattern with the
io.kestra.plugin.ai.completion.ChatCompletiontask (usingmeta-llama/Llama-3.1-70B-Instruct) to:- Summarize team activity across all platforms.
- Identify urgent items (bugs, blockers).
- Make Decisions: It generates a structured decision report (
ai_decisions.json) categorizing items as CRITICAL, HIGH, MEDIUM, or LOW, and recommends specific actions.
- Implementation: ContextKeeper acts as the "memory layer" for autonomous agents like Cline, providing them with the context needed to make informed changes.
- Workflows: We utilize
.github/workflows/cline-responder.yml(and other agentic workflows) to enable autonomous interactions where Cline can be triggered to respond to repository events, effectively acting as an autonomous maintainer.
- Implementation: We have fully integrated CodeRabbit for autonomous PR reviews and keeping the codebase clean.
- Configuration: The
.coderabbit.yamlfile is customized to:- Enable high-level summaries and detailed code review.
- Auto-reply to chat interactions (
chat.auto_reply: true). - Enforce stringent checks (
shellcheck,actionlint,eslint,prettier).
- Workflow: The system is set up to provide immediate feedback on every Pull Request, ensuring high code quality and documentation standards.
- Docker & Docker Compose
- Node.js (v16+)
- Python (v3.9+)
- MongoDB (Running locally or have an Atlas URI)
π‘ Need help? See the Troubleshooting Guide if you encounter any issues during installation.
Configure and start the API server and AI engine.
π For detailed backend documentation, including all API endpoints and Python scripts, see Backend README.
-
Navigate to the backend directory:
cd backend -
Install Node.js dependencies:
npm install
-
Install Python dependencies:
pip install -r requirements.txt
-
Environment Configuration:
- Copy
.env.exampleto.env:cp .env.example .env
- Edit
.envand add your credentials:- HUGGINGFACE_API_KEY: Your Hugging Face API key
- GITHUB_TOKEN: Your GitHub Personal Access Token
- GITHUB_REPO: Repository in format
owner/repo - SLACK_TOKEN: Your Slack Bot Token (xoxb-...)
- SLACK_CHANNELS: Comma-separated channel names
- MONGODB_URI: MongoDB connection string
- Copy
-
Start the Server:
npm start
Server runs on
http://localhost:3000.
Launch the user interface.
π For detailed frontend documentation, including component architecture and development workflow, see Frontend README.
-
Navigate to the frontend directory:
cd frontend -
Install dependencies:
npm install
-
Start Development Server:
npm run dev
Access the UI at
http://localhost:5173. -
Go to the Frontend URL (
http://localhost:5173). -
Type a question like "Why did we choose Redis?".
-
The system will query ChromaDB and Hugging Face to provide a context-aware answer.
-
View the knowledge graph to see relationships between people, modules, and decisions.
π For detailed Kestra workflow documentation, see Kestra README and Kestra Developer Guide.
- Kestra instance (version 0.15.0+)
- API tokens for:
- Slack (Bot Token with appropriate scopes)
- HuggingFace (for AI model access)
- GitHub (optional, but recommended for higher rate limits)
- Notion (optional)
-
Clone or download this workflow YAML file
-
Import into Kestra:
# via Kestra UI # Navigate to Flows β Create β Import YAML
# my testing kestra server with docker
docker-compose --env-file .env up -d
#for windows - local kestra server with docker
docker run --pull=always --rm -it -p 8080:8080 --user=root ^
-e HUGGINGFACE_API_KEY=hf_your_token_here ^
-v "/var/run/docker.sock:/var/run/docker.sock" ^
-v "C:/Temp:/tmp" kestra/kestra:latest server local- Configure your tokens in the execution inputs
| Input | Description | Example |
|---|---|---|
slack_token |
Slack Bot Token | xoxb-your-token |
huggingface_token |
HuggingFace API Token | hf_xxxxx |
github_repo |
Repository to monitor | owner/repo |
slack_channels |
Channels to monitor | general,dev-team |
| Input | Description | Default |
|---|---|---|
github_token |
GitHub PAT (increases rate limits) | None |
notion_token |
Notion Integration Token | None |
hours |
Time period for data collection | 24 |
user_query |
Custom analysis query | Auto-generated |
π For comprehensive usage examples and tutorials, see Usage Examples.
Collect from GitHub:
curl -X POST http://localhost:3000/api/collect/githubCollect from Slack:
curl -X POST http://localhost:3000/api/collect/slackFor Specific Repository:
curl -X POST http://localhost:3000/api/collect/github \
-H "Content-Type: application/json" \
-d '{"repository": "owner/repo"}'π For complete API documentation, including all endpoints, request/response formats, and examples, see API Reference and Backend README.
POST /api/query
Body: { "question": "Why did we choose Redis?", "repository": "owner/repo" }GET /api/knowledge-graph?repository=owner/repoGET /api/status?repository=owner/repoWe welcome contributions! Please see our CONTRIBUTING.md for details on how to get started, our code of conduct, and the process for submitting pull requests.
π οΈ Developer Resources:
- Developer Guide - Comprehensive development guide
- Development Setup - Development environment setup
- Code of Conduct - Community guidelines
This project is licensed under the Apache 2.0 License - see the LICENSE file for details.
For support, please refer to SUPPORT.md or open an issue in the issue tracker.
π Need Help?
- Troubleshooting Guide - Common issues and solutions
- Documentation Index - Complete documentation
- Usage Examples - Practical examples
Yadnyesh Kolte
- GitHub: @yadnyeshkolte
- Email: yadnyeshkolte@gmail.com
- Hugging Face for the amazing models.
- The Open Source community for the tools and libraries used in this project.