A production-ready multi-agent system that analyzes software repositories, generates comprehensive documentation, and provides intelligent question-answering capabilities. Built with LangGraph, integrated with Cohere LLM, Jina embeddings, and Qdrant vector database.
cd multiagent-repo-assistant python -m venv venv venv\Scripts\activate # Windows # source venv/bin/activate # macOS/Linux
pip install -r requirements.txt
.env file):# Qdrant Cloud QDRANT_URL=https://your-instance.qdrant.io QDRANT_API_KEY=your_api_key QDRANT_COLLECTION=repo_chunks EMBEDDING_DIM=1024 # Cohere COHERE_API_KEY=your_api_key # Jina JINA_API_KEY=your_api_key JINA_EMBEDDING_MODEL=jina-embeddings-v3
# Using LangGraph orchestrator (default) python main.py analyze --repo path/to/repo # Save results to JSON python main.py analyze --repo path/to/repo --output results.json # Use simple orchestrator python main.py analyze --repo path/to/repo --orchestrator simple
# Interactive QA python main.py ask --repo path/to/repo --query "how to install?" # Specify number of context results python main.py ask --repo path/to/repo --query "what is this project?" --top-k 10
# Run complete analysis pipeline python main.py pipeline --repo path/to/repo --output analysis.json
# Start interactive Q&A session python main.py interactive --repo path/to/repo
from orchestrator.langgraph_flow import run_langgraph_pipeline from agents.qa_agent import QAAgent # Run complete pipeline result = run_langgraph_pipeline("path/to/repo") # Use QA agent qa = QAAgent() answer = qa.answer("How to use this project?", top_k=5) print(answer)
βββββββββββββββββββ
β Repository β
β Input β
ββββββββββ¬βββββββββ
β
βΌ
βββββββββββββββββββ ββββββββββββββββββββ
β Repo Analyzer ββββββββ File Processing β
ββββββββββ¬βββββββββ ββββββββββββββββββββ
β
βΌ
βββββββββββββββββββ ββββββββββββββββββββ
β Text Splitter ββββββββ Chunk Content β
ββββββββββ¬βββββββββ ββββββββββββββββββββ
β
βΌ
βββββββββββββββββββ ββββββββββββββββββββ
β Embedding Agent ββββββββ Jina Embeddings β
ββββββββββ¬βββββββββ ββββββββββββββββββββ
β
βΌ
βββββββββββββββββββ ββββββββββββββββββββ
β Vector Store ββββββββ Qdrant Cloud β
ββββββββββ¬βββββββββ ββββββββββββββββββββ
β
ββββββ΄βββββ¬ββββββββββ¬βββββββββββ
βΌ βΌ βΌ βΌ
ββββββββββββββββββββββββββββββββββββββ
βMetadata βContentβReview βQA Agent β
βRecomm. βImprover β β
ββββββββββββββββββββββββββββββββββββββ
β β β β
ββββββ¬βββββ΄βββββ¬βββββ΄βββββ¬ββββ
βΌ βΌ βΌ
βββββββββββββββββββββββββββββββ
β Analysis Results JSON β
βββββββββββββββββββββββββββββββ
Analyze Repo
β
Embed Repository Content
β
Suggest Metadata
β
Improve Content
β
Review Results
β
Complete
multiagent-repo-assistant/
βββ agents/ # 7 specialized agents
β βββ repo_analyzer.py # Repository structure analysis
β βββ embedding_agent.py # Semantic embeddings
β βββ metadata_recommender.py # Metadata suggestions
β βββ content_improver.py # README enhancement
β βββ reviewer.py # Content validation
β βββ qa_agent.py # Question answering
β βββ __init__.py
βββ tools/ # 5 utility tools
β βββ file_loader.py # File extraction
β βββ text_splitter.py # Text chunking
β βββ code_analyzer.py # Code analysis
β βββ web_search.py # Web search integration
β βββ test_llm_embeddings.py # LLM testing
β βββ test_qdrant.py # Database testing
βββ orchestrator/ # Workflow orchestration
β βββ langgraph_flow.py # LangGraph pipeline
β βββ simple_pipeline.py # Alternative pipeline
βββ config/ # Configuration
β βββ config.py # Service initialization
βββ data/ # Sample data
β βββ sample_repo/ # Test repository
βββ main.py # CLI entry point
βββ requirements.txt # Python dependencies
βββ .env # Environment variables
βββ README.md # This file
qdrant-client - Vector DB clientcohere - LLM SDKrequests - HTTP clientpython-dotenv - Environment managementExtracts and analyzes repository structure, files, languages, and metadata.
Manages text embeddings using Jina API, stores vectors in Qdrant for semantic search.
Suggests project metadata, titles, and tags based on README content.
Enhances README using Cohere LLM with structured suggestions.
Validates improved content and identifies gaps (installation, usage, etc.).
Retrieves context from vector database and generates answers using LLM.
Coordinates communication between agents and external services.
# Test LLM and embeddings python tools/test_llm_embeddings.py # Test Qdrant integration python tools/test_qdrant.py
# Full pipeline test python main.py analyze --repo data/sample_repo --output test_results.json
{ "title_alternatives": ["Repo Assistant", "Multi-Agent Analyzer"], "one_line_summary": "Intelligent repository analysis system", "tags": ["python", "multi-agent", "langchain", "ai"] }
{ "issues": [ "README lacks Installation section", "No usage examples provided" ], "evidence": [...] }
.env, never commit to repositorypython-dotenv for configurationQDRANT_URL # Qdrant Cloud instance URL QDRANT_API_KEY # Qdrant authentication QDRANT_COLLECTION # Collection name (default: repo_chunks) EMBEDDING_DIM # Vector dimension (default: 1024) COHERE_API_KEY # Cohere API key JINA_API_KEY # Jina API key JINA_EMBEDDING_MODEL # Model name (default: jina-embeddings-v3)
docker build -t multiagent-repo-assistant . docker run -e COHERE_API_KEY=xxx -e QDRANT_URL=xxx multiagent-repo-assistant
FastAPI-based REST API can be added for:
This project demonstrates core multi-agent concepts. Areas for enhancement:
Educational project demonstrating Module 2 concepts of multi-agent systems.
Built with: