SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2605.13647 · 2026

FlowCompile: An Optimizing Compiler for Structured LLM Workflows

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

arXiv · PDF · Open in the Atlas

Code that ran

10 of 13 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 1 honoured the contract we drafted, 0 violated it and 2 have no contract verdict; 7 failures of our instrument; 3 no recorded run), measured 2026-11-23; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2605.13647.json · badge: /api/ran/2605.13647.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
UMass-Embodied-AGI/FlowCompile canonical (classifier label)
classifier basis: census
10 ran · 3 no recorded run
FunctionStatusWhere it lives
analyze_agent_usage Ran
ran; our contract draft was wrong, not the code
UMass-Embodied-AGI/FlowCompile/src/flowcompile/compiler/ground_truth.py
code served (permissive licence) · get_code("53e1a9cea473a26a")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import json
import tempfile
from pathlib import Path

# Create a temporary trace file with sample data
temp_dir = tempfile.TemporaryDirectory()
trace_file = Path(temp_dir.name) / "trace.jsonl"

# Write sample trace data to the file
trace_data = [
    {
        "steps": [
            {
                "agent": "programmer",
                "metadata": {"status": "success"}
            },
            {
                "agent": "refine_solver",
                "metadata": {"status": "success"}
            },
            {
                "agent": "programmer",
                "metadata": {"status": "failed"}
            }
        ]
    },
    {
        "react_steps": [
            {
                "action": "programmer",
                "error": None,
                "tool_metadata": {"status": "success"}
            },
            {
                "action": "detailed_solver",
                "error": None,
                "tool_metadata": {"status": "success"}
            },
            {
                "action": "generate_solver",
                "error": "some error occurred",
                "tool_metadata": {"status": "failed"}
            }
        ]
    }
]

with open(trace_file, 'w', encoding='utf-8') as f:
    for item in trace_data:
        f.write(json.dumps(item) + '\n')

ARGS = {
    "trace_file": trace_file
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
create_problem_to_metadata_map Ran
ran; our contract draft was wrong, not the code
UMass-Embodied-AGI/FlowCompile/src/flowcompile/compiler/complete_pipeline.py
code served (permissive licence) · get_code("4f0ceea9b18f67dd")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

# Construct the trace_training_data argument
trace_training_data = {
    'training_data': [
        {
            'original_sample': {
                'problem': 'problem_1',
                'data': 'sample_data_1'
            },
            'problem': 'problem_1'
        },
        {
            'original_sample': {
                'problem': 'problem_2',
                'data': 'sample_data_2'
            },
            'problem': 'problem_2'
        },
        {
            'original_sample': {
                'problem': 'problem_3',
                'data': 'sample_data_3'
            }
        }
    ]
}

ARGS = {
    'trace_training_data': trace_training_data
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
find_trace_files Ran
ran; our contract draft was wrong, not the code
UMass-Embodied-AGI/FlowCompile/src/flowcompile/compiler/agent_dataset.py
code served (permissive licence) · get_code("8f77cedd313681e6")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import tempfile
from pathlib import Path

# Create a temporary directory structure with trace.jsonl files
temp_dir = tempfile.mkdtemp()
temp_path = Path(temp_dir)

# Create a trace.jsonl file at the root
trace_file_1 = temp_path / "trace.jsonl"
trace_file_1.write_text('{"event": "test"}\n')

# Create a subdirectory with another trace.jsonl file
subdir = temp_path / "subdir"
subdir.mkdir()
trace_file_2 = subdir / "trace.jsonl"
trace_file_2.write_text('{"event": "test2"}\n')

# Test with a directory path
ARGS = {
    "path": str(temp_path)
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
generate_random_indices Ran
ran, honoured the contract we drafted
UMass-Embodied-AGI/FlowCompile/src/flowcompile/benchmarks/utils.py
code served (permissive licence) · get_code("1f9b1fdd47db32fc")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned ndarray, ndim 1, dtype family int, shape (30,) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np

ARGS = {
    "n": 100,
    "n_samples": 30,
    "test": False
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 1, dtype family int, shape (30,) — shape (30,) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
load_azure_config Ran
ran; our contract draft was wrong, not the code
UMass-Embodied-AGI/FlowCompile/src/flowcompile/compiler/agent_dataset.py
code served (permissive licence) · get_code("8e5c19fe5b2726c3")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import tempfile
import os
from pathlib import Path
import yaml

# Create a temporary directory and config file for testing
temp_dir = tempfile.mkdtemp()
config_dir = os.path.join(temp_dir, 'configs')
os.makedirs(config_dir, exist_ok=True)

# Create a valid Azure config YAML file
config_data = {
    'models': {
        'gpt-5': {
            'api_type': 'azure',
            'azure_endpoint': 'https://myresource.openai.azure.com/',
            'azure_deployment': 'gpt-5-deployment',
            'api_key': 'test-api-key-123',
            'api_version': '2024-02-15-preview'
        },
        'gpt-5-mini': {
            'api_type': 'azure',
            'azure_endpoint': 'https://myresource2.openai.azure.com/',
            'azure_deployment': 'gpt-5-mini-deployment',
            'api_key': 'test-api-key-456',
            'api_version': '2024-02-15-preview'
        },
        'non-azure-model': {
            'api_type': 'openai',
            'model': 'gpt-3.5-turbo'
        }
    }
}

config_path = os.path.join(config_dir, 'config.yaml')
with open(config_path, 'w', encoding='utf-8') as f:
    yaml.dump(config_data, f)

# Define ARGS with test parameters
ARGS = {
    'config_path': config_path,
    'requested_model': None
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
yaml — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 1, dtype family float — a tuple output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
load_trace_file Ran
ran; our contract draft was wrong, not the code
UMass-Embodied-AGI/FlowCompile/src/flowcompile/compiler/agent_dataset.py
code served (permissive licence) · get_code("925a652e082f2f3a")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import json
import tempfile
import os

# Create a temporary JSONL file with sample trace data
temp_dir = tempfile.mkdtemp()
trace_file_path = os.path.join(temp_dir, "trace.jsonl")

# Write sample trace data to the temporary file
with open(trace_file_path, 'w') as f:
    f.write(json.dumps({"event": "start", "timestamp": 0.0, "id": 1}) + "\n")
    f.write(json.dumps({"event": "end", "timestamp": 1.5, "id": 1}) + "\n")
    f.write(json.dumps({"event": "start", "timestamp": 2.0, "id": 2}) + "\n")

ARGS = {
    "trace_file_path": trace_file_path
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
measure_batch Ran
ran on a synthesized input
UMass-Embodied-AGI/FlowCompile/src/flowcompile/compiler/latency.py
code served (permissive licence) · get_code("94b4397c2eaf6bd6")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned coroutine. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import asyncio
import time
from dataclasses import dataclass
from typing import Any, Dict, List, Optional, Tuple
import torch
import torch.nn as nn


@dataclass
class SamplingParams:
    max_tokens: int
    temperature: float
    top_p: float
    seed: int


@dataclass
class TokenOutput:
    token_ids: List[int]


@dataclass
class GenerateOutput:
    outputs: List[TokenOutput]


class MockTokenizer:
    def __call__(self, text: str, add_special_tokens: bool = True) -> Dict[str, List[int]]:
        # Simple mock: return input_ids based on text length
        token_count = max(1, len(text) // 5)
        return {"input_ids": list(range(token_count))}


class MockEngine:
    def __init__(self):
        self.call_count = 0
    
    async def generate(self, request_id: str, prompt: str, sampling_params: SamplingParams):
        """Mock async generator that yields GenerateOutput objects"""
        # Simulate a simple generation with a few tokens
        num_tokens = sampling_params.max_tokens
        
        # Emit outputs incrementally
        for i in range(1, num_tokens + 1):
            await asyncio.sleep(0.001)  # Small delay to simulate work
            token_ids = list(range(i))
            output = GenerateOutput(outputs=[TokenOutput(token_ids=token_ids)])
            yield output


torch.manual_seed(0)

ARGS = {
    "engine": MockEngine(),
    "tokenizer": MockTokenizer(),
    "prompt_text": "What is the meaning of life?",
    "batch_size": 2,
    "max_new_tokens": 5,
    "seed": 42,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type coroutine — a coroutine output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a coroutine output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
measure_batch_openai Ran
ran on a synthesized input
UMass-Embodied-AGI/FlowCompile/src/flowcompile/compiler/latency.py
code served (permissive licence) · get_code("afda4a0e9231ef2b")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned coroutine. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import asyncio
from unittest.mock import AsyncMock, MagicMock
from dataclasses import dataclass

# Create a mock OpenAI client with async streaming capabilities
class MockUsage:
    def __init__(self, prompt_tokens=10, completion_tokens=5):
        self.prompt_tokens = prompt_tokens
        self.completion_tokens = completion_tokens

class MockDelta:
    def __init__(self, content=None, reasoning_content=None):
        self.content = content
        self.reasoning_content = reasoning_content
        self.reasoning = None

class MockChoice:
    def __init__(self, delta):
        self.delta = delta

class MockChunk:
    def __init__(self, content=None, reasoning_content=None, usage=None, choices=None):
        self.delta = MockDelta(content=content, reasoning_content=reasoning_content)
        self.usage = usage
        self.choices = choices if choices is not None else []

async def mock_stream_generator():
    """Generator that yields mock chunks simulating streaming response"""
    # First chunk with content
    yield MockChunk(content="Hello ", choices=[MockChoice(MockDelta(content="Hello "))])
    yield MockChunk(content="world", choices=[MockChoice(MockDelta(content="world"))])
    # Final chunk with usage
    yield MockChunk(usage=MockUsage(prompt_tokens=10, completion_tokens=2), choices=[])

async def mock_create(**kwargs):
    """Mock create method that returns an async generator"""
    async def async_gen():
        async for item in mock_stream_generator():
            yield item
    return async_gen()

# Create mock client
mock_client = MagicMock()
mock_client.chat = MagicMock()
mock_client.chat.completions = MagicMock()
mock_client.chat.completions.create = AsyncMock(side_effect=mock_create)

ARGS = {
    "client": mock_client,
    "request_model": "gpt-4",
    "prompt_text": "What is the meaning of life?",
    "batch_size": 2,
    "max_new_tokens": 128,
    "seed": 42,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type coroutine — a coroutine output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a coroutine output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
register_benchmark Ran
ran; our contract draft was wrong, not the code
UMass-Embodied-AGI/FlowCompile/src/flowcompile/benchmarks/registry.py
code served (permissive licence) · get_code("63ef8b11c6d66fdc")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned function. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn
from typing import Optional, List, Type

# Initialize registry globals that the function uses
_REGISTRY = {}
_CANONICAL_NAME = {}
_ALIASES = {}
_ALIAS_TO_KEY = {}

# Create a minimal benchmark class to decorate
class MinimalBenchmark:
    BENCHMARK_NAME = "test_benchmark"
    ALIASES = ["alias1", "alias2"]
    WORKFLOW_TYPE = "math"
    METRIC_NAME = "accuracy"
    DEFAULT_SPLIT_PATHS = {"train": "/path/train", "test": "/path/test"}
    DEFAULT_INIT_KWARGS = {"param1": "value1"}

# Prepare arguments for register_benchmark function
ARGS = {
    "name": "MyBenchmark",
    "aliases": ["bench_alias", "my_bench"]
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
split_data_set Ran
ran; our contract draft was wrong, not the code
UMass-Embodied-AGI/FlowCompile/src/flowcompile/benchmarks/utils.py
code served (permissive licence) · get_code("4cefb9c263e68fc6")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import json
import tempfile
import os
import numpy as np

# Create a temporary file with sample JSON lines data
temp_file = tempfile.NamedTemporaryFile(mode='w', delete=False, suffix='.jsonl')
temp_file_path = temp_file.name

# Write sample JSON lines to the temporary file
sample_data = [
    {"id": 0, "text": "sample text 0"},
    {"id": 1, "text": "sample text 1"},
    {"id": 2, "text": "sample text 2"},
    {"id": 3, "text": "sample text 3"},
    {"id": 4, "text": "sample text 4"},
    {"id": 5, "text": "sample text 5"},
]

for item in sample_data:
    temp_file.write(json.dumps(item) + '\n')

temp_file.close()

ARGS = {
    'file_path': temp_file_path,
    'samples': 3,
    'test': False
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
format_float Not yet run
unverified (harvested, no recorded run)
UMass-Embodied-AGI/FlowCompile/src/flowcompile/compiler/latency.py
code served (permissive licence) · get_code("90c15666efa6571b")
How it ran

no invocation recorded.

get_benchmark_class Not yet run
unverified (harvested, no recorded run)
UMass-Embodied-AGI/FlowCompile/src/flowcompile/benchmarks/registry.py
code served (permissive licence) · get_code("f625baf4f4ac84b0")
How it ran

no invocation recorded.

get_benchmark_info Not yet run
unverified (harvested, no recorded run)
UMass-Embodied-AGI/FlowCompile/src/flowcompile/benchmarks/registry.py
code served (permissive licence) · get_code("921caf54acaa9ca3")
How it ran

no invocation recorded.

Also present in other papers' code

Of 13 samples lifted from this paper's linked repositories, 13 carry a function identity and 0 do not. Of the 13 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 13 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-23.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Structured LLM workflows, in which specialized LLM sub-agents are executed according to a predefined execution 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 fundamentally 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 specified during training. We argue that, beyond runtime routing, 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 such 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 a diverse set of 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 by a large margin, delivering up to 6.4× speedup while maintaining strong task performance. Furthermore, the compiled configuration set serves as a reusable optimization artifact, enabling flexible deployment under varying runtime preferences and naturally supporting downstream selection or routing for additional gains. Code is released at: https://github.com/UMass-Embodied-AGI/FlowCompile. Recent advances in machine learning compilers, such as TVM [Chen et al., 2018a], Glow [Rotem et al., 2018], and XLA [Sabne, 2020], have enabled efficient optimization of neural networks, including large language models (LLMs). TVM, in particular, illustrates a compiler-based approach that statically analyzes computation graphs, profiles low-level operator performance, and searches over Preprint.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2605.13647")
get_code_for_paper("2605.13647")
have("2605.13647")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2605.13647.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2605.13647.svg)](https://syntology.ai/paper/2605.13647)

Connect an agent — have() is free.