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 View this paper on Syntology, its page in Syntology's graph. That page adds which of its functions are also present in other papers' code Syntology holds, with dates, and its dated run record as JSON and a README badge. It also lists the repositories linked to the paper, the abstract and the calls for agents.

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

For agents, on Syntology's MCP service (how to connect):

Code

Syntology 13 code samples harvested from 1 repository linked to this paper: 10 ran (of which 0 constructed an object rather than computing a result; 3 with no instrument failure: 1 honoured, 0 violated, 2 with no contract checked; 7 where Syntology's instrument failed) · 3 unverified. Where Syntology's instrument failed: 7 where our contract draft was wrong; failures of Syntology's instrument, not of the code.

By repository: found in paper text by Syntology: 13 samples from 1 repository, 10 ran (3 with no instrument failure; 7 where Syntology's instrument failed). The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

Levels written on 2026-09-24 (UTC): the dates Syntology's graph wrote each sample's verification level, not when the code executed.

UMass-Embodied-AGI/FlowCompile found in paper text by SyntologySyntology: 13 samples, 10 ran (7 instrument-failed) · 3 unverified 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 (of which 0 constructed an object rather than computing a result; 3 with no instrument failure: 1 honoured, 0 violated, 2 with no contract checked; 7 where Syntology's instrument failed) · 3 unverified. “Where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code. Syntology's record for this page last changed ; when this build read Syntology's graph is in the build record. That date is not when the samples ran.

1ran · honoured contract
7ran · our draft was wrong
2ran
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. A line beginning “fixture:” under a sample that ran gives the arguments Syntology's fixture called the sample with, each as name:type/rank/element kind (? where none was recorded), and the type of what the fixture's run returned, exactly as the harness recorded them; the arguments and the returned type were recorded by two separate runs of the same fixture. No output value is shown, and a returned type says nothing about whether the output was right. “Level recorded” gives the UTC date when Syntology's graph wrote the sample's verification level, not when the code executed; where the level was written before Syntology's graph kept that date, the row says “level recorded, date not recorded”. For 1 sample that ran, the graph records a signature this page does not show: an argument's recorded type or element kind is a printout of an object in Syntology's harness (such as a mock object, a class or a pandas printout), not the type of an input, so it does not describe the call's shape. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself. “Our draft was wrong” and “the contract check could not run” are failures of Syntology's instrument, not of the code: the sample ran on Syntology's synthesized input, and then the drafted contract did not describe it, or the check itself raised an error (RAISES), lacked a dependency (DEP_MISSING) or ran out of time (TIMEOUT); hover the label for which. A metamorphic tier, where shown, is evidence of the output's shape, not that the sample implements the method.

Each sample ends with its code_sha256. A sample's code_sha256 is Syntology's identity for that exact code. It is printed in full (16 hexadecimal characters for every sample in this build), and get_code(code_sha256="…") takes it exactly as printed. An agent calls it on Syntology's MCP service (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 are grouped by repository: a repository marked official first, then by how directly the repository is tied to the paper, then in the archive's order; never by how many ran. 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 six 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; the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar); this paper's copy was not located, so its licence is not recorded; or this paper's copy is cleared, but the stored copy of the same code that Syntology serves is not. 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.

UMass-Embodied-AGI/FlowCompile found in paper text by Syntology 13 samples, 10 ran (7 instrument-failed) · 3 unverified
analyze_agent_usage src/flowcompile/compiler/ground_truth.py ran · our draft was wrong MIT (permissive) · 53e1a9cea473a26a · report fixture: signature trace_file:PosixPath/0/? · returned dict · level recorded 2026-09-24
create_problem_to_metadata_map src/flowcompile/compiler/complete_pipeline.py ran · our draft was wrong MIT (permissive) · 4f0ceea9b18f67dd · report fixture: signature trace_training_data:dict/0/? · returned dict · level recorded 2026-09-24
find_trace_files src/flowcompile/compiler/agent_dataset.py ran · our draft was wrong fingerprinted MIT (permissive) · 8f77cedd313681e6 · report fixture: signature path:str/0/str · returned list · level recorded 2026-09-24
generate_random_indices src/flowcompile/benchmarks/utils.py ran · honoured contract MIT (permissive) · 1f9b1fdd47db32fc · report fixture: signature n:int/0/int, n_samples:int/0/int, test:bool/0/bool · returned ndarray · level recorded 2026-09-24
load_azure_config src/flowcompile/compiler/agent_dataset.py ran · our draft was wrong MIT (permissive) · 8e5c19fe5b2726c3 · report fixture: signature config_path:str/0/str, requested_model:NoneType/0/? · returned tuple · level recorded 2026-09-24
load_trace_file src/flowcompile/compiler/agent_dataset.py ran · our draft was wrong MIT (permissive) · 925a652e082f2f3a · report fixture: signature trace_file_path:str/0/str · returned list · level recorded 2026-09-24
measure_batch src/flowcompile/compiler/latency.py ran MIT (permissive) · 94b4397c2eaf6bd6 · report fixture: signature engine:MockEngine/0/?, tokenizer:callable/0/?, prompt_text:str/0/str, batch_size:int/0/int, max_new_tokens:int/0/int, seed:int/0/int · returned coroutine · level recorded 2026-09-24
measure_batch_openai src/flowcompile/compiler/latency.py ran MIT (permissive) · afda4a0e9231ef2b · report fixture: returned coroutine · level recorded 2026-09-24
register_benchmark src/flowcompile/benchmarks/registry.py ran · our draft was wrong MIT (permissive) · 63ef8b11c6d66fdc · report fixture: signature name:str/0/str, aliases:list/1/str · returned function · level recorded 2026-09-24
split_data_set src/flowcompile/benchmarks/utils.py ran · our draft was wrong MIT (permissive) · 4cefb9c263e68fc6 · report fixture: signature file_path:str/0/str, samples:int/0/int, test:bool/0/bool · returned list · level recorded 2026-09-24
format_float src/flowcompile/compiler/latency.py unverified MIT (permissive) · 90c15666efa6571b · report
get_benchmark_class src/flowcompile/benchmarks/registry.py unverified MIT (permissive) · f625baf4f4ac84b0 · report
get_benchmark_info src/flowcompile/benchmarks/registry.py 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.

Placed on leaderboards by Syntology Syntology

This paper's own results, placed by Syntology on archive leaderboards: a model pointed at the cell in the paper's own table, the number was read from that cell and checked against the leaderboard's metric, dataset, split and scale, and an independent check accepted it. Not reviewed by the paper's authors or by the archive's editors; listed below each leaderboard's archive rows, never ranked among them.

Leaderboard (task · dataset)Method (configuration)ValuesWhere in the paperReport
Code Generation · Livecodebench Ours (Acc.-first) · Pass@1 Acc 78.98 Table 5, row “Ours (Acc.-first)” report

Syntology's extractor, the model Claude Sonnet 4.5, also judged this paper's tables to report on 4 other leaderboards (a model's judgement, not a result) and has not placed the paper on any of them: Arithmetic Reasoning · GSM8K (rejected by the independent check); GSM8K · GSM8K (rejected by the independent check); Math Word Problem Solving · MATH (rejected by the independent check); Question Answering · HotpotQA (refused by a rule: the table's column header does not name the leaderboard's metric). What is not shown.

Syntology has checked 8,886 of the 18,637 papers on this site that are newer than the archive (for 3,717 of them no archive leaderboard matched the paper's tables, so there was nothing further to check); 733 were read and have nothing to place (arXiv has no HTML version of the paper, or that version has no tables), 41 could not be read (the extractor's reply could not be parsed), and results from the other 8,977 appear after they are checked.

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