AI-powered repository intelligence for public GitHub repositories.
[Interface Demo Placeholder]
repo-intel-Project-demo.mp4
RepoIntel analyzes public GitHub repositories by separating deterministic repository analysis from semantic AI analysis.
Instead of sending an entire codebase directly to an LLM, RepoIntel first scans the repository, selects high-value source evidence, and then uses task-routed Gemini models to generate an engineering review.
This approach reduces unnecessary context sent to the LLM while keeping the pipeline predictable and resilient to AI API failures.
GitHub URL
↓
Repository Scan
↓
Evidence Selection
↓
Engineering Analysis
↓
Model Cascade
↓
Engineering Intelligence Report
flowchart TD
User["🌐 User (Browser)"]
FastAPI["⚙️ FastAPI + WebSocket Server"]
Scanner["repo_scanner_agent"]
Clone["Shallow Clone"]
Structural["Structural Scan\n(files, languages, CI/CD, configs)"]
Evidence["evidence_selector.py\n(Dockerfiles, entry points, API files,\nCI/CD, config, source modules)"]
Skip{"_should_skip_analysis"}
Analyzer["engineering_analyzer_agent"]
Router["model_router.py"]
Primary["Gemini 3.5 Flash\n(Primary)"]
Fallback["Gemini 3.1 Flash Lite\n(Fallback)"]
Reporter["report_generator_agent"]
StructReport["Structural Fallback Report"]
FullReport["Engineering Intelligence Report"]
WS["WebSocket Progress Events"]
User -->|"POST /api/analyze\n(GitHub URL)"| FastAPI
FastAPI -->|"LangGraph Workflow"| Scanner
Scanner --> Clone
Clone --> Structural
Structural --> Evidence
Evidence --> Skip
Skip -->|"Scan OK"| Analyzer
Skip -->|"Scan Failed"| Reporter
Analyzer --> Router
Router --> Primary
Primary -->|"Rate limit / error"| Fallback
Primary -->|"Success"| Reporter
Fallback -->|"Success"| Reporter
Fallback -->|"All models failed"| Reporter
Reporter -->|"AI available"| FullReport
Reporter -->|"AI unavailable"| StructReport
FullReport --> WS
StructReport --> WS
WS -->|"ws://host/api/ws/{job_id}"| User
Scanner -.->|"progress events"| WS
Analyzer -.->|"progress events"| WS
Repository structure, file counts, language detection, and configuration detection do not require an LLM.
Keeping these operations deterministic makes the system:
- More predictable
- Easier to debug
- Less dependent on external APIs
- More efficient with model context
Sending an entire repository to an LLM wastes context and increases processing cost.
RepoIntel therefore selects high-value files before semantic analysis so the model can focus on the parts of the repository most relevant to engineering evaluation.
Not every operation requires the same model capability.
RepoIntel separates deterministic processing from semantic analysis and uses the configured Gemini models according to the task.
This avoids using expensive model reasoning for operations that can be handled deterministically.
RepoIntel uses a deterministic LangGraph workflow rather than an LLM-controlled supervisor loop.
This provides a predictable execution path and avoids unnecessary iterative model calls.
The workflow is therefore easier to reason about, debug, and control.
External AI APIs can fail because of:
- Rate limits
- Quota exhaustion
- Temporary availability issues
- API failures
RepoIntel therefore uses a model cascade and ultimately a deterministic structural fallback.
Even when semantic analysis cannot be completed, the system can still return useful structural information.
| Layer | Technology | Purpose |
|---|---|---|
| API Backend | Python, FastAPI | Serves the API and manages analysis jobs |
| Real-time Communication | WebSockets | Streams pipeline progress to the client |
| AI Orchestration | LangGraph | Defines the deterministic analysis workflow |
| LLMs | Gemini 3.5 Flash, Gemini 3.1 Flash Lite | Semantic repository analysis and fallback |
| Repository Analysis | Python | Deterministic scanning and evidence selection |
| Deployment | Docker, Docker Compose | Containerized deployment |
repo-intel/
├── src/
│ ├── agents/
│ │ ├── repo_scanner.py
│ │ ├── evidence_selector.py
│ │ ├── engineering_analyzer.py
│ │ └── report_generator.py
│ │
│ ├── api/
│ │ └── # FastAPI routes and WebSocket handlers
│ │
│ ├── graph/
│ │ └── workflow.py
│ │
│ └── providers/
│ └── # Gemini integrations and model cascading
│
├── frontend/
├── tests/
├── Dockerfile
├── docker-compose.yml
└── requirements.txt
RepoIntel successfully analyzed its own repository using the V2 runtime.
- 39 files scanned
- 2,595 lines of code
- 15 evidence files selected
- 31,354 evidence characters
- 2 successful AI calls
- 6.3/10 engineering score
- Analysis mode: AI Enhanced
- Python 3.12+
- Gemini API key
How to Open CMD -->Press Windows Key + R on your keyboard.Type cmd into the box.Press Enter.Basic Steps to FollowType cd followed by a space to change folders.Type your folder path or name.Press Enter to run the Below commandgit clone https://github.com/pepi-code-srt/repo-intelpython -m venv venv.\venv\Scripts\Activate.ps1source venv/bin/activateInstall dependencies:
pip install -r requirements.txtCreate a .env file in the root directory:
GEMINI_API_KEY=your_gemini_api_key_hereuvicorn src.main:app --reload --host 127.0.0.1 --port 8000Open:
http://127.0.0.1:8000
| Method | Endpoint | Purpose |
|---|---|---|
POST |
/api/analyze |
Initiates an analysis job and returns a job_id |
GET |
/api/report/{job_id} |
Retrieves the generated report |
RepoIntel uses WebSockets to provide real-time pipeline progress.
ws://<host>/api/ws/{job_id}
{
"type": "progress",
"agent": "...",
"message": "..."
}Reports stage progress and timing information.
{
"type": "error",
"message": "..."
}Reports analysis failures.
{
"type": "completed",
"report": "..."
}Delivers the final engineering report.
RepoIntel can be deployed using Docker Compose.
docker-compose up --buildThe configuration also provides a local .repo_cache volume for repository processing.
| Variable | Required | Purpose |
|---|---|---|
GEMINI_API_KEY |
Yes | Authentication for Google Gemini APIs |
GEMINI_MODEL_PRIMARY |
No | Overrides the primary Gemini model |
GEMINI_MODEL_FAST |
No | Overrides the fast/helper model |
GEMINI_MODEL_FALLBACK |
No | Overrides the fallback model |
ENABLE_FAST_HELPER |
No | Enables or disables the optional fast classification phase |
The pipeline is designed to avoid failing silently.
The engineering analysis can fall back to the configured fallback Gemini model when the primary model encounters a supported failure.
If the configured AI models are unavailable, RepoIntel generates a deterministic structural report containing information such as:
- File counts
- Programming languages
- Configuration information
- CI/CD presence
- Basic repository health information
If the target repository cannot be cloned or scanned successfully, the workflow skips semantic analysis and proceeds to structural report generation.
- Currently supports public GitHub repositories.
- Shallow cloning limits deep historical analysis such as commit history and contributor velocity.
- The system relies on static repository analysis and AI interpretation.
- It does not compile or execute the analyzed repository.
- It does not perform dynamic security testing.
- GitLab and Bitbucket repository support
- Streaming final LLM output through WebSockets
- Deeper repository analysis
- Additional repository security analysis
- Expanded automated evaluation of generated engineering reports
This project is licensed under the MIT License.