Papers › FlowCompile: An Optimizing Compiler for Structured LLM Workflows

FlowCompile: An Optimizing Compiler for Structured LLM Workflows

13 May 2026arXiv:2605.13647added by Syntology

Junyan Li, Zhang-Wei Hong, Maohao Shen, Yang Zhang, Chuang Gan

Title, abstract, authors and date from arXiv's metadata (CC0); this paper is not in the Papers with Code archive (frozen 2025-07-28).

Structured LLM workflows, where specialized LLM sub-agents execute according to a predefined graph, have become a powerful abstraction for solving complex tasks. Optimizing such workflows, i.e., selecting configurations for each sub-agent to balance accuracy and latency, is challenging due to the combinatorial design space over model choices, reasoning budgets, and workflow structures. Existing cost-aware methods largely treat workflow optimization as a routing problem, selecting a configuration at inference time for each query according to the accuracy-latency objective used during training. We argue that structured LLM workflows can also be optimized from a compilation perspective: before deployment, the system can globally explore the workflow design space and construct a reusable set of workflow-level configurations spanning diverse accuracy-latency trade-offs. Drawing inspiration from machine learning compilers, we introduce FlowCompile, a structured LLM workflow compiler that performs compile-time design space exploration to identify a high-quality, reusable trade-off set. FlowCompile decomposes a workflow into sub-agents, profiles each sub-agent under diverse configurations, and composes these measurements through a structure-aware proxy to estimate workflow-level accuracy and latency. It then identifies diverse high-quality configurations in a single compile-time pass, without retraining or online adaptation. Experiments across diverse workflows and challenging benchmarks show that FlowCompile consistently outperforms heuristically optimized workflow configurations and routing-based baselines, delivering up to 6.4x speedup. The compiled configuration set further serves as a reusable optimization artifact, enabling flexible deployment under varying runtime preferences and supporting downstream selection or routing.

PaperPDFCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2605.13647")

Code

Syntology Ran 10 of 13 code samples harvested from 1 repository linked to this paper; 3 have no recorded run. Of those that ran: 10 ran with no contract checked.

By repository: found in paper text by Syntology: 13 samples from 1 repository, 10 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

UMass-Embodied-AGI/FlowCompile found in paper text by Syntology report

Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

13 samples harvested; 10 ran; 0 honoured the contract we drafted; 3 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

10ran
3unverified

Licence: 0 of the 13 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from UMass-Embodied-AGI/FlowCompile. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

analyze_agent_usage UMass-Embodied-AGI/FlowCompile/src/flowcompile/compiler/ground_truth.py found in paper text by Syntology ran MIT (permissive) · 53e1a9cea473a26a · report
create_problem_to_metadata_map UMass-Embodied-AGI/FlowCompile/src/flowcompile/compiler/complete_pipeline.py found in paper text by Syntology ran MIT (permissive) · 4f0ceea9b18f67dd · report
find_trace_files UMass-Embodied-AGI/FlowCompile/src/flowcompile/compiler/agent_dataset.py found in paper text by Syntology ran fingerprinted MIT (permissive) · 8f77cedd313681e6 · report
generate_random_indices UMass-Embodied-AGI/FlowCompile/src/flowcompile/benchmarks/utils.py found in paper text by Syntology ran MIT (permissive) · 1f9b1fdd47db32fc · report
load_azure_config UMass-Embodied-AGI/FlowCompile/src/flowcompile/compiler/agent_dataset.py found in paper text by Syntology ran MIT (permissive) · 8e5c19fe5b2726c3 · report
load_trace_file UMass-Embodied-AGI/FlowCompile/src/flowcompile/compiler/agent_dataset.py found in paper text by Syntology ran MIT (permissive) · 925a652e082f2f3a · report
measure_batch UMass-Embodied-AGI/FlowCompile/src/flowcompile/compiler/latency.py found in paper text by Syntology ran MIT (permissive) · 94b4397c2eaf6bd6 · report
measure_batch_openai UMass-Embodied-AGI/FlowCompile/src/flowcompile/compiler/latency.py found in paper text by Syntology ran MIT (permissive) · afda4a0e9231ef2b · report
register_benchmark UMass-Embodied-AGI/FlowCompile/src/flowcompile/benchmarks/registry.py found in paper text by Syntology ran MIT (permissive) · 63ef8b11c6d66fdc · report
split_data_set UMass-Embodied-AGI/FlowCompile/src/flowcompile/benchmarks/utils.py found in paper text by Syntology ran MIT (permissive) · 4cefb9c263e68fc6 · report
format_float UMass-Embodied-AGI/FlowCompile/src/flowcompile/compiler/latency.py found in paper text by Syntology unverified MIT (permissive) · 90c15666efa6571b · report
get_benchmark_class UMass-Embodied-AGI/FlowCompile/src/flowcompile/benchmarks/registry.py found in paper text by Syntology unverified MIT (permissive) · f625baf4f4ac84b0 · report
get_benchmark_info UMass-Embodied-AGI/FlowCompile/src/flowcompile/benchmarks/registry.py found in paper text by Syntology unverified MIT (permissive) · 921caf54acaa9ca3 · report

Results from the paper

The Papers with Code archive ends with its 2025-07-28 snapshot. This paper's arXiv identifier, 2605.13647, was issued in May 2026, after that date, so the archive has no leaderboard rows for it.

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections