We use cookies to distinguish you from other users and to provide you with a better experience on our websites. Close this message to accept cookies or find out how to manage your cookie settings. Learn more about our Privacy Notice... [opens in a new tab]

Empirical Research on Utilizing LLM-based Agents for Automated Bug Fixing via LangGraph

31 January 2025, Version 1
This content is an early or alternative research output and has not been peer-reviewed by Cambridge University Press at the time of posting.

Abstract

This paper presents a novel framework for automated code generation and debugging, designed to improve accuracy, efficiency, and scalability in software development. The proposed system integrates three core components—LangGraph, GLM-4-Flash, and ChromaDB—within a four-step iterative workflow to deliver robust performance and seamless functionality. LangGraph serves as a graph-based library for orchestrating tasks, providing precise control and execution while maintaining a unified state object for dynamic updates and consistency. It supports multi-agent, hierarchical, and sequential processes, making it highly adaptable to complex software engineering workflows. GLM-4-Flash, a large language model, leverages its advanced capabilities in natural language understanding, contextual reasoning, and multilingual support to generate accurate code snippets based on user prompts. ChromaDB acts as a vector database for semantic search and contextual memory storage, enabling the identification of patterns and the generation of context-aware bug fixes based on historical data. The system operates through a structured four-step process: (1) Code Generation, which translates natural language descriptions into executable code; (2) Code Execution, which validates the code by identifying runtime errors and inconsistencies; (3) Code Repair, which iteratively refines buggy code using ChromaDB’s memory capabilities and LangGraph’s state tracking; and (4) Code Update, which ensures the code meets functional and performance requirements through iterative modifications. By combining advanced task orchestration, semantic reasoning, and memory-driven insights, the system achieves precise and iterative debugging, significantly enhancing software development workflows. This work represents a substantial advancement in automated software engineering, addressing critical challenges in code reliability and runtime error resolution.

Keywords

Large Language Model
Agent
LangGraph
GPT-4o
GLM-4-Flash
LangChain
Bug Fix

Comments

Comments are not moderated before they are posted, but they can be removed by the site moderators if they are found to be in contravention of our Commenting and Discussion Policy [opens in a new tab] - please read this policy before you post. Comments should be used for scholarly discussion of the content in question. You can find more information about how to use the commenting feature here [opens in a new tab] .
This site is protected by reCAPTCHA and the Google Privacy Policy [opens in a new tab] and Terms of Service [opens in a new tab] apply.