Skip to content

BillHuang2001/evogit

Repository files navigation

EvoGit Cover Image

Decentralized Code Evolution via Git-Based Multi-Agent Collaboration

🏆 EvoGit: 1st Place in AgentX Multi-Agent Track

Winner of the Multi-Agent Track at the AgentX Competition (Agentic AI Summit).

arXiv GitHub Stars Discord Server QQ Group


🎬 EvoGit Animation (click to hide) EvoGit Animation

👋 Table of Contents

  1. 🚀 Overview
  2. ✨ Key Features
  3. 📦 Live Demos
  4. 🧬 How to Explore the Results
  5. 📚 Paper

🚀 Overview

EvoGit is a decentralized multi-agent framework that reimagines software development as a collaborative, evolutionary process. It deploys a population of independent coding agents that evolve a shared codebase asynchronously, without centralized coordination, explicit message passing, or shared memory.

All coordination emerges implicitly through a Git-based phylogenetic graph that tracks the complete version lineage. This graph allows agents to read from and write to the repository, enabling scalable parallel exploration while preserving a consistent, auditable history of every change.

For detailed methodology and experimental results, refer to our paper.

✨ Key Features

  • 🧠 Decentralized Coordination: Agents operate independently and coordinate organically through the shared version graph. This resembles stigmergy in biological systems, where interactions are indirect and mediated by the environment.
  • ⚙️ Git-Native Evolution: The entire framework is built on Git. Evolutionary concepts map directly to Git primitives, making the process inherently compatible with standard developer tools.
  • 🌿 Traceable & Auditable Lineage: Every edit, merge, and decision is recorded as an immutable Git commit. This provides full transparency and reproducibility of the entire development process.
  • 🤝 Sparse Human Oversight: The human's role shifts from a coder to a high-level Product Manager. You define initial goals and provide periodic, lightweight feedback to prune unproductive branches and promote promising ones.

📦 Live Demos

Explore how EvoGit enables collaborative AI development across two real-world projects. For more details, please visit the respective GitHub repositories and inspect the Git history to see how multiple agents evolved the code.

A multi-agent AI system collaboratively builds a complete one-page interactive website—from layout and UI to animations and dark mode. The project was initialized by a human product manager and guided with ~10 feedback interventions.

🔍 Result (click to expand)

The final web page demonstrates a polished UI with support for both light and dark themes.

EvoGit Example Web Page Light Mode EvoGit Example Web Page Dark Mode


AI agents iteratively evolve a meta-level algorithm designer, which itself generates and refines a solver for the classic Bin Packing Problem. This creates a two-layer pipeline: EvoGit → Auto Algorithm Designer → Bin Packing Solver A human manager provided an initial setup and ~5 rounds of feedback throughout the optimization process.

🔍 Result (click to expand)

The AI-generated automatic algorithm design program efficiently found a solver that minimizes bin usage, as shown in the final output script:

def bin_packing_solver(items: list[float], budget: int) -> list[int]:
    import time

    if not items or not all(0 <= w <= 1 for w in items):
        return []

    start_time = time.time()

    items_sorted = sorted(enumerate(items), key=lambda x: x[1], reverse=True)
    bins = []
    bin_indices = [-1] * len(items)

    for index, weight in items_sorted:
        placed = False
        for bin_index, bin_weight in enumerate(bins):
            if bin_weight + weight <= 1:
                bins[bin_index] += weight
                bin_indices[index] = bin_index
                placed = True
                break
        if not placed:
            bins.append(weight)
            bin_indices[index] = len(bins) - 1

    best_solution = bin_indices[:]
    best_bin_count = len(bins)

    def refine_solution():
        nonlocal best_solution, best_bin_count
        for _ in range(100):  # attempt refinement a number of times
            new_bins = []
            new_bin_indices = [-1] * len(items)
            new_solution = []
            for i in range(len(items)):
                weight = items[i]
                placed = False
                for bi in range(len(new_bins)):
                    if new_bins[bi] + weight <= 1:
                        new_bins[bi] += weight
                        new_bin_indices[i] = bi
                        placed = True
                        break
                if not placed:
                    new_bins.append(weight)
                    new_bin_indices[i] = len(new_bins) - 1
            new_bin_count = len(new_bins)

            if new_bin_count < best_bin_count:
                best_solution = new_bin_indices
                best_bin_count = new_bin_count

            if (time.time() - start_time) * 1000 > budget:
                break

    refine_solution()

    return best_solution

The optimized code is automatically saved as best_solution.py after the search process completes.

🧬 How to Explore the Results

EvoGit uses Git not only as a version control tool, but also as a transparent window into the code evolution process. Here's how to inspect our demos:

  1. 🧑‍💻 The human-initialized seed lives in the main branch.
  2. 🤖 AI-generated code lives in branches named: host<i>-individual-<j>, where i = host node index, j = agent index.
  3. 🔍 Each agent branch contains an independent development trajectory. You can explore these using GitHub’s commit history or local Git tools.
  4. 📈 Git diffs and logs reveal the precise changes made in each commit.
  5. 🧭 Use git log --graph or GitHub’s branch visualization (under Insights -> Network) to see how code diverged and converged over time.
🔍 Example Git Graph (click to expand)

EvoGit Example Git Graph

All changes are versioned and traceable. Every commit represents an autonomous decision by an agent—captured, auditable, and reproducible through Git.

Note

GitHub may hide some branches. Click “View all branches” on the repo page to see the complete version graph.

📚 Paper

Read the full framework design, evaluation methodology, and results in our paper:

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published