Technical details: https://github.com/muratcankoylan/actual_code/blob/main/ActualCode-TechnicalDeepDiveforJury.md
Transform GitHub repositories into realistic coding challenges using multi-agent AI
๐ Overview
ActualCode is a code assessment platform that analyzes real GitHub repositories and generates personalized, realistic coding challenges using a 7-agent AI architecture powered by Google's Gemini models and the A2A (Agent-to-Agent) protocol.
The Problem We Solve
- LeetCode is too generic - Candidates solve abstract algorithms, not real-world problems
- Hiring is time-consuming - Creating repository-specific assessments takes hours
- Context gap - Candidates who ace LeetCode still struggle with actual codebases
Our Solution
- Input: Any GitHub repository URL + difficulty level
- AI Magic: 7 specialized AI agents collaborate using A2A protocol
- Output: Realistic, implementable coding problem in ~2 minutes
๐๏ธ Architecture
User Input (GitHub Repo)
โ
Agent 1: Scanner (GitHub API)
โ
Agents 2-5: Parallel Analysis
โข Code Analyzer (Gemini 2.5 Pro)
โข PR Analyzer (Gemini 2.5 Flash)
โข Issue Analyzer (Gemini 2.5 Flash)
โข Dependency Analyzer (Gemini 2.5 Flash)
โ
Agent 6: Problem Creator (Gemini 2.5 Pro)
โ
Agent 7: QA Validator (Gemini 2.5 Flash)
โ
Personalized Assessment โจ
Multi-Agent System Features
- 7 Specialized Agents - Each with unique expertise
- A2A Protocol - Google's Agent-to-Agent communication
- Single-Pass Analysis - Optimized for speed (2 min vs 4+ min)
- QA Validation - Automated quality scoring with feedback
- Repository-Specific - Problems tailored to actual codebase
๐ Quick Start
Prerequisites
- Python 3.11+
- GitHub Personal Access Token - Get here
- Google Cloud Account - With Vertex AI enabled
- Service Account Key - For Google Cloud authentication
Installation
# Clone the repository git clone https://github.com/muratcankoylan/actual_code.git cd actual_code # Create virtual environment python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate # Install dependencies pip install -r requirements.txt # Set up environment variables cp .env.example .env # Edit .env with your credentials
Configuration
Create a .env file with:
# GitHub Token GITHUB_TOKEN=your_github_personal_access_token # Google Cloud GOOGLE_CLOUD_PROJECT=your-project-id GOOGLE_APPLICATION_CREDENTIALS=/path/to/service-account-key.json GOOGLE_CLOUD_REGION=us-central1 GOOGLE_GENAI_USE_VERTEXAI=True
Run
# Activate virtual environment source venv/bin/activate # Run the CLI python cli_runner.py
Follow the interactive prompts to generate your first assessment!
๐ Usage
Interactive CLI
$ python cli_runner.py GitHub Repository URL: facebook/react Select Difficulty: [2] medium Select Problem Type: [1] feature Time Limit: [3] 180 minutes Proceed? y [AI agents analyze the repository...] โ Assessment Generated Successfully! Problem Title: Implement Error Boundary with Recovery Tech Stack: JavaScript, React, TypeScript QA Score: 85/100 โ Assessment saved to: assessment_20250930_153045.json โ Detailed logs saved to: DETAILED_RUN_20250930_153045.txt
Output Files
-
assessment_{timestamp}.json- Complete assessment with:- Problem statement
- Requirements & acceptance criteria
- Starter code
- Hints
- Evaluation rubric
- QA validation scores
-
DETAILED_RUN_{timestamp}.txt- Complete logs with:- Repository data (all files)
- Agent analysis details
- Problem generation process
- QA validation feedback
๐ฏ Features
Real GitHub Integration
- โ Fetches actual repository data via GitHub API
- โ Analyzes real code structure, PRs, issues
- โ Uses actual tech stack and dependencies
- โ References real codebase patterns
Multi-Agent AI Pipeline
- โ 7 Specialized Agents working in concert
- โ A2A Protocol for agent communication
- โ Parallel Processing for speed
- โ Single-Pass Analysis (optimized)
- โ QA Validation with automated scoring
Repository-Specific Problems
- โ Problems match the input repository's tech stack
- โ Addresses actual weaknesses in the codebase
- โ Uses repository's architecture patterns
- โ Realistic and implementable within time limit
Quality Assurance
- โ 4-dimension validation (Feasibility, Quality, Technical, Educational)
- โ Automated scoring (0-100)
- โ Specific feedback for improvement
- โ Single-pass validation with refinement
๐งช Example
Input
Repository: https://github.com/expressjs/express
Difficulty: medium
Type: feature
Time: 180 minutes
Output
{
"problem": {
"title": "Implement Advanced Middleware Error Handling",
"description": "Add comprehensive error handling middleware to Express...",
"tech_stack": ["JavaScript", "Express", "Node.js"],
"requirements": [
"Create custom error classes",
"Implement middleware chain",
"Add error logging",
...
],
"acceptance_criteria": [...],
"starter_code": [...],
"hints": [...],
"estimated_time": 180,
"difficulty": "medium",
"evaluation_rubric": [...]
},
"validation": {
"overall_score": 85,
"scores": {
"feasibility": 90,
"quality": 85,
"technical": 82,
"educational": 83
}
}
}๐ Documentation
- QUICK_START.md - 5-minute setup guide
- CLI_GUIDE.md - Complete CLI documentation
- PRODUCTION_READY.md - Architecture details
- SETUP_GITHUB.md - GitHub token setup
- ALL_ISSUES_RESOLVED.md - Development changelog
- final_docs/ - Complete technical documentation
๐๏ธ Technical Stack
AI & Cloud
- Google Vertex AI - AI platform
- Gemini 2.5 Pro - Code analysis & problem creation
- Gemini 2.5 Flash - PR/Issue/Dependency analysis & QA validation
- Google ADK - Agent Development Kit
- A2A Protocol - Agent-to-Agent communication
Backend
- Python 3.11+ - Core language
- aiohttp - Async HTTP for GitHub API
- structlog - Structured logging
Integration
- GitHub API - Repository data fetching
- Vertex AI API - AI model access
๐ Performance
- Repository Fetch: 5-15 seconds
- Agent Analysis: ~60 seconds (single-pass)
- Problem Creation: 30-45 seconds
- QA Validation: 10-15 seconds
- Refinement: 20-35 seconds
Total: ~2 minutes (optimized from 4+ minutes)
๐ง Project Structure
hackathon_code/
โโโ cli_runner.py # Interactive CLI interface
โโโ orchestrator.py # Multi-agent coordinator
โโโ agents/ # 7 AI agents
โ โโโ scanner_agent.py # GitHub repository scanner
โ โโโ code_analyzer_agent.py # Code architecture analyzer
โ โโโ pr_analyzer_agent.py # Pull request analyzer
โ โโโ issue_analyzer_agent.py# Issue tracker analyzer
โ โโโ dependency_analyzer_agent.py # Tech stack analyzer
โ โโโ problem_creator_agent.py # Problem generator
โ โโโ qa_validator_agent.py # Quality validator
โโโ utils/ # Utilities
โ โโโ github_mcp.py # GitHub API integration
โ โโโ a2a_protocol.py # A2A protocol implementation
โ โโโ monitoring.py # Performance monitoring
โ โโโ json_parser.py # Robust JSON parsing
โโโ final_docs/ # Complete documentation
โโโ requirements.txt # Python dependencies
๐จ Key Innovations
1. Multi-Agent A2A Protocol
First production implementation of Google's A2A protocol with 7 specialized agents communicating seamlessly.
2. Repository-Specific Problems
Unlike generic platforms, problems are tailored to:
- Actual tech stack used
- Real code patterns found
- Specific weaknesses identified
- Genuine opportunities discovered
3. Single-Pass Optimization
Optimized from 3-loop analysis to single-pass:
- 2x faster generation
- 66% fewer API calls
- Same quality output
4. Quality Assurance
Built-in QA agent validates on 4 dimensions:
- Feasibility (time, context, dependencies)
- Quality (clarity, testability)
- Technical (stack match, patterns)
- Educational (skill assessment value)
๐ ๏ธ Development
Running Tests
# Test GitHub connection python test_github_connection.py # Test with your repository python test_my_repo.py # Verify setup ./verify_setup.sh
Key Scripts
cli_runner.py- Main CLI applicationtest_github_connection.py- GitHub API testertest_my_repo.py- Repository-specific testerverify_setup.sh- Environment checker
๐ Security
- โ No tokens in code or repository
- โ Environment variables for secrets
- โ .gitignore for sensitive files
- โ Service account keys excluded
- โ API rate limiting handled
๐ Contributing
This project was built for the Google AI Hackathon showcasing:
- Google Gemini 2.5 Pro/Flash
- Vertex AI integration
- A2A Protocol implementation
- Multi-agent architecture
๐ License
MIT License - See LICENSE file for details
๐ Acknowledgments
- Google Vertex AI - For powerful AI models
- Google ADK - For agent development framework
- A2A Protocol - For agent interoperability
๐ Contact
Murat Can Koylan
- GitHub: @muratcankoylan
- Repository: actual_code
๐ Get Started Now!
git clone https://github.com/muratcankoylan/actual_code.git
cd actual_code
pip install -r requirements.txt
python cli_runner.pyGenerate your first AI-powered coding assessment in 2 minutes! ๐