Live Link: Will be deployed soon using paid service with sufficient amount of memory
Demo Video 1 : Demo video of the agent
Demo Video 2 : Demo video of the agent working as an MCP server with Crew AI
Built an agent using LangChain, Hybrid RAG, SurrealDB memory, and GitHub MCP tools, Django, capable of answering repository-specific questions through vector search, graph retrieval, and live GitHub metadata. The project also exposes itself as an MCP (Model Context Protocol) server so that other AI agents can communicate with it using standardized Agent-to-Agent (A2A) communication.
- Chat with any public GitHub repository
- Hybrid Retrieval (Vector Search + Graph Search)
- Live GitHub repository information through MCP
- Repository-aware conversations
- Long-term memory using SurrealDB
- Agent-to-Agent communication through MCP
- Django web interface
| Technology | Purpose |
|---|---|
| Python | Core programming language |
| Django | Backend framework and web interface |
| LangChain | AI orchestration and RAG pipeline |
| Google Gemini | Large Language Model |
| Sentence Transformers | Text embeddings |
| Graphfy | Knowledge graphs |
| SurrealDB | Long-term memory and short-term memory |
| GitHub MCP Server | Live GitHub repository access |
| Official MCP Python SDK | Standardized communication between AI agents |
| Hybrid RAG | Combines vector search and graph retrieval |
| Git | Version control |
External AI Agent
(CrewAI, LangGraph, etc.)
│
│ MCP Client
▼
GitHub Engineering Mentor MCP Server
│
▼
+--------------------------------------------------------------------------------+
| GitHub Engineering Mentor |
| |
| User |
| │ |
| ▼ |
| Django Web Interface |
| │ |
| ▼ |
| Chat Service |
| │ |
| ├──────────────► Conversation History |
| │ |
| ├──────────────► Memory Manager |
| │ ├── Short-term Memory (SurrealDB) |
| │ └── Long-term Memory (SurrealDB) |
| │ |
| ├──────────────► Hybrid Retrieval |
| │ ├── Vector Search |
| │ └── Graph Search |
| │ |
| ├──────────────► GitHub MCP Service |
| │ ├── Repository Metadata |
| │ ├── Commit History |
| │ └── Pull Requests |
| │ |
| │ |
| │ |
| ├──────────────► Context Builder |
| │ │ |
| │ ├── Hybrid Retrieval Context |
| │ ├── Memory Context |
| │ ├── GitHub MCP Context |
| │ └── Conversation Context |
| │ |
| ▼ |
| Gemini LLM (LangChain) |
| │ |
| ▼ |
| Final Response |
+--------------------------------------------------------------------------------+
- The user paste a repository URL and asks a question from the Django web application.
- The chat service collects useful information from multiple sources.
- The Hybrid Retrieval system searches both vector embeddings and the repository knowledge graph.
- The Memory Manager provides short-term conversation history and long-term memories stored in SurrealDB.
- The GitHub MCP Service fetches live repository information such as files, commits, branches, pull requests, and code search results.
- The Context Builder combines all retrieved information into a single prompt.
- LangChain sends the complete context to the Gemini model.
- The model generates a repository-aware answer and returns it to the user.
- The same mentor is also exposed as an MCP server, allowing external AI agents to communicate with it through standard MCP clients for A2A collaboration.
SurrealDB
│
├── repository ← Repository metadata
│
├── chunk ← RAG chunks + embeddings
│
├── conversation ← Short-term memory
│
└── memory ← Long-term memory
git clone https://github.com/Parisa-Reza/github-brainstorming-agent.git
cd github-brainstorming-agentpython -m venv venvvenv\Scripts\activatesource venv/bin/activatepip install -r requirements.txtCreate a .env file in the project root.
Example:
SECRET_KEY=your_secret_key
DEBUG=True
GEMINI_API_KEY=your_gemini_api_key
SURREAL_URL=ws://localhost:8001
SURREAL_USERNAME=root
SURREAL_PASSWORD=root
SURREAL_NAMESPACE=mentor
SURREAL_DATABASE=memory
GITHUB_TOKEN=github_pat_tokenThe project already includes a docker-compose.yml.
Start the database with:
docker compose up -dVerify that the container is running:
docker psYou should see a container similar to:
github-engineering-mentor-db
Run the initialization script once to create the required SurrealDB tables.
python mentor/database/init_db.pyThis creates the following tables if they do not already exist:
- repository
- chunk
- conversation
- memory
This step only needs to be performed once for a new database.
python manage.py migrateThis creates Django's relational database tables (authentication, sessions, admin, and other Django models). It is separate from the SurrealDB setup.
python manage.py runserverThe application should now be available at:
http://127.0.0.1:8000
To expose the application as an MCP server for A2A comuunication, read from Use the agent using MCP client
- Support private GitHub repositories
- Better visualization of repository structure
- Streaming responses
- User authentication
- Repository indexing optimization
Parisa Reza
GitHub: https://github.com/Parisa-Reza