StackPilot: Autonomous Function Agents for Scalable and Environment-Free Code Execution

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autori principali: Zhao, Xinkui, Zhang, Yifan, Zhou, Zhengyi, Xu, Yueshen
Natura: Preprint
Pubblicazione: 2025
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866917197660553216
author Zhao, Xinkui
Zhang, Yifan
Zhou, Zhengyi
Xu, Yueshen
author_facet Zhao, Xinkui
Zhang, Yifan
Zhou, Zhengyi
Xu, Yueshen
contents Recent advances in large language models (LLMs) have substantially enhanced automated code generation across a wide range of programming languages. Nonetheless, verifying the correctness and executability of LLM-generated code remains a significant challenge, as traditional methods rely on language-specific compilers and environment-dependent runtimes. To overcome these limitations, we introduce StackPilot, an LLM-native, multi-agent framework designed for language-agnostic code verification and execution, which operates independently of conventional toolchains. StackPilot offers three principal innovations: (1) a Function-as-Agents paradigm, in which each function is modeled as an autonomous agent capable of fine-grained reasoning and collaborative verification; (2) an LLM-as-Executor strategy, which enables scalable verification via stack-based scheduling; and (3) a novel snapshot mechanism that preserves complete execution contexts, facilitating deterministic and lossless context switching during verification. Empirical evaluations demonstrate that StackPilot achieves framework reliability rates between 89% and 97%, substantially outperforming baseline approaches. These results indicate that StackPilot can reliably verify and execute a significantly larger proportion of LLM-generated code across diverse programming tasks compared to existing methods.
format Preprint
id arxiv_https___arxiv_org_abs_2508_11665
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle StackPilot: Autonomous Function Agents for Scalable and Environment-Free Code Execution
Zhao, Xinkui
Zhang, Yifan
Zhou, Zhengyi
Xu, Yueshen
Programming Languages
Multiagent Systems
Recent advances in large language models (LLMs) have substantially enhanced automated code generation across a wide range of programming languages. Nonetheless, verifying the correctness and executability of LLM-generated code remains a significant challenge, as traditional methods rely on language-specific compilers and environment-dependent runtimes. To overcome these limitations, we introduce StackPilot, an LLM-native, multi-agent framework designed for language-agnostic code verification and execution, which operates independently of conventional toolchains. StackPilot offers three principal innovations: (1) a Function-as-Agents paradigm, in which each function is modeled as an autonomous agent capable of fine-grained reasoning and collaborative verification; (2) an LLM-as-Executor strategy, which enables scalable verification via stack-based scheduling; and (3) a novel snapshot mechanism that preserves complete execution contexts, facilitating deterministic and lossless context switching during verification. Empirical evaluations demonstrate that StackPilot achieves framework reliability rates between 89% and 97%, substantially outperforming baseline approaches. These results indicate that StackPilot can reliably verify and execute a significantly larger proportion of LLM-generated code across diverse programming tasks compared to existing methods.
title StackPilot: Autonomous Function Agents for Scalable and Environment-Free Code Execution
topic Programming Languages
Multiagent Systems
url https://arxiv.org/abs/2508.11665