ExecuGraph: A Multi-Agent, Execution-Grounded Framework for Reliable Backend Code Synthesis with Large Language Models
Summary
ExecuGraph is a multi-agent framework designed to enhance the reliability of backend code synthesis using Large Language Models by centering execution-based validation. It coordinates six specialized agents—Planner, Code Generator, Logical Reviewer, Evaluator, Optimizer, and Explainer—within a typed directed workflow on LangGraph, utilizing locally hosted models like Qwen2.5-Coder-7B-Instruct (4-bit quantized) and an optional retrieval layer. The system employs a subprocess-isolated sandbox for robust code evaluation. Evaluated on a curated 30-problem DSA suite, HumanEval (n=64), and an APPS-introductory subset, ExecuGraph demonstrates improved accuracy, particularly with more capable base models. For instance, with DeepSeek-Coder-V2-Lite, graph-category accuracy increased from 57.5% (one-shot) to 80.0% (multi-full), a +22.5 pp improvement. The framework's key methodological contribution is a single codebase configurable for one-shot, execution-retry, and per-agent ablation conditions, allowing precise measurement of each component's impact.
Key takeaway
For AI Engineers building reliable backend code generation systems, prioritize execution-grounded validation within a multi-agent framework like ExecuGraph. While 7B-parameter models may find single-retry configurations more cost-efficient, consider the full multi-agent setup for larger base models or complex graph reasoning tasks. You should leverage the framework's configurable nature to measure the marginal contribution of each agent and optimize for your specific model scale and problem distribution.
Key insights
Execution-based validation within a multi-agent workflow significantly improves LLM-generated backend code reliability.
Principles
- Execution outcomes are the sole acceptance signal.
- Decouple agent roles from execution feedback.
- Compiled workflow graphs ensure deterministic control.
Method
ExecuGraph uses a LangGraph-orchestrated workflow with six agents (Planner, Generator, Reviewer, Evaluator, Optimizer, Explainer). Code is generated, reviewed (advisory), and then rigorously evaluated in a sandboxed environment with a wall-clock timeout.
In practice
- Use a multi-agent system for complex code synthesis.
- Prioritize execution-based validation over static review.
- Configure retry budgets for cost-efficiency.
Topics
- Multi-Agent Systems
- Code Generation
- Large Language Models
- Execution-Grounded Validation
- Software Reliability
- LangGraph
Code references
- rohithreddybc/multi-agent-dsa-backend-logic-synthesis
- langchain-ai/langgraph
- Significant-Gravitas/Auto-GPT
Best for: Research Scientist, AI Scientist, Machine Learning Engineer, AI Engineer
Related on AIssential
See Counsel's argued verdicts on the open AI decisions leaders are weighing →
Editorial summary, takeaway, and curation by AIssential. Original article published by cs.SE updates on arXiv.org.