← All papers  /  Oct 24, 2026
Agents

FlashScript: Compiling Recurring Agent Workflows into Reusable Neuro-Symbolic Programs

First page
FlashScript: Compiling Recurring Agent Workflows into Reusable Neuro-Symbolic Programs
The curator’s take

Sadra Sabouri, Hosein Hasanbeig, Adam Sage, Ashish Tiwari, Sumit Gulwani and colleagues (University of Southern California, Microsoft) present FlashScript, guidelines for compiling a successful agent run into a reusable neuro-symbolic program in which actions become code and only judgment calls remain LLM calls.

Ask this paper

Key points
01

Compilation. Actions and data transformations become code, instance-specific values become parameters, and each decision needing model judgment becomes a typed llm<T> call at a fixed point in the program.

02

Three layers, three techniques. LLM calls belong in the input, computation and output layers. Caching observed values behind a guard, codifying judgments as rules and batching independent questions into one call replace most of them with code.

03

Results. On 120 WorkBench analytics tasks with Claude Haiku 4.5, the programs were correct and made identical tool calls on every run, using about 70x fewer input tokens and a third of the runtime of a skill-guided agent whose runs were inconsistent.

04

Composite tasks. On composite tasks the skill-guided agent fell to 23% accuracy while the programs stayed correct and identical across runs, and they generalized to all 108 unseen instances of the same templates.

Abstract

Many agent tasks recur with new data or small changes, yet agents regenerate their reasoning and actions on each run, producing different results. Distilling a prior run into a skill helps the agent avoid earlier mistakes, but it still re-runs the full process each time, so runs can vary and incur that cost. We compile a successful agent run into a reusable neuro-symbolic program (NSP) with a set of guidelines we call FlashScript. Actions and data transformations become code, instance-specific values become parameters, and decisions that need model judgment become LLM calls. We identify three layers where these calls belong and three techniques that replace most of them with code. The compilation does not remove nondeterminism; it localizes it, so the deterministic program and its neural calls can be reviewed and tested separately. Across 120 WorkBench analytics tasks with Claude Haiku 4.5, the NSPs were correct and made identical tool calls on every run, using about 70 times fewer input tokens and a third of the runtime of a skill-guided agent whose runs were inconsistent. In a composite version of the tasks, the skill-guided agent's accuracy fell to 23%, and its output inconsistency increased, while the NSPs remained correct and identical across all runs. The NSPs successfully generalized to all 108 unseen instances of the same templates. Our findings suggest that NSPs from agent trajectories can be considered cumulative software assets for end-users to test, maintain, and reuse in their recurring workflows.

Every Monday
Get next week’s papers.
Subscribe on Substack