How ethank1234/multi-agent-code-generation-system works
This repository implements an LLM-assisted algorithm-solution generation and validation loop. The principal workflow builds task-specific tests and a brute-force reference with generated inputs, generates candidate solutions, filters them with pytest, and differentially checks passing candidates against cached reference answers before selecting or revising a candidate. The excerpts show the core orchestration and model client; no README documents further capabilities.
Main entry points: setup.py Build Artifacts · loop.py Candidate Selection · llm.py LLM Client
Components 12
Task Setup
- Build Artifacts
setup.py - Reference Generator
setup.py - Test Generator
setup.py - Reference Cache
setup.py
Candidate Generation
- Candidate Generator
loop.py
Validation Loop
- Pytest Runner
loop.py - Differential Checker
loop.py - Candidate Selection
loop.py - Iteration Controller
loop.py
Model Access
- LLM Client
llm.py
Other components
- Task Provider
- Gemini API
Connections 14
- Task Provider → Build Artifacts: provides task
setup.py - Build Artifacts → Reference Generator: generates reference
setup.py - Build Artifacts → Test Generator: generates tests
setup.py - Build Artifacts → Reference Cache: builds cache
setup.py - Reference Generator → LLM Client: requests generation
setup.py - Test Generator → LLM Client: requests tests
setup.py - Iteration Controller → Candidate Generator: requests candidates
loop.py - Candidate Generator → LLM Client: requests solution
loop.py - Iteration Controller → Candidate Selection: evaluates candidates
loop.py - Candidate Selection → Pytest Runner: runs tests
loop.py - Candidate Selection → Differential Checker: checks passing candidates
loop.py - Differential Checker → Reference Cache: compares answers
loop.py - Candidate Selection → Iteration Controller: returns feedback
loop.py - LLM Client → Gemini API: sends chat request
llm.py