GitHub

Watch this video

Technical details: https://github.com/muratcankoylan/actual_code/blob/main/ActualCode-TechnicalDeepDiveforJury.md

Transform GitHub repositories into realistic coding challenges using multi-agent AI

Built with Google Gemini Python 3.11+ A2A Protocol


๐ŸŒŸ 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

  1. Input: Any GitHub repository URL + difficulty level
  2. AI Magic: 7 specialized AI agents collaborate using A2A protocol
  3. 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

  1. Python 3.11+
  2. GitHub Personal Access Token - Get here
  3. Google Cloud Account - With Vertex AI enabled
  4. 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

  1. assessment_{timestamp}.json - Complete assessment with:

    • Problem statement
    • Requirements & acceptance criteria
    • Starter code
    • Hints
    • Evaluation rubric
    • QA validation scores
  2. 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


๐Ÿ—๏ธ 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 application
  • test_github_connection.py - GitHub API tester
  • test_my_repo.py - Repository-specific tester
  • verify_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


๐Ÿš€ Get Started Now!

git clone https://github.com/muratcankoylan/actual_code.git
cd actual_code
pip install -r requirements.txt
python cli_runner.py

Generate your first AI-powered coding assessment in 2 minutes! ๐ŸŽ‰

Read the original on github.com โ†—