0 cumulative citations
View corpus contextAmazon demonstrates that one typed-dataflow agent specification can run unchanged across streaming, durable-workflow and batch substrates with equivalent outputs; moving offline evaluation and generation to batch inference cuts per-query token costs at the expense of much higher end-to-end latency.
Citation observations
Cumulative provider counts captured on specific dates; providers are never combined.
Production LLM agents execute tool-calling loops, retrieval chains, and compositional workflows in multiple modes, yet execution semantics are often coupled to one runtime. We encountered this portability problem in Rufus, a conversational AI assistant with a large tool catalog that serves millions of Amazon customers. Rufus supports real-time serving, asynchronous background tasks, and high-volume batch workloads such as evaluation and content pregeneration. Each mode has distinct service-level objectives and typically uses a separate runtime. Reusing streaming orchestration makes asynchronous and batch workloads blocking and prevents use of batch inference APIs, which offer a 50 percent discount at published prices. We present a binding-adaptive agent execution platform that separates workflow definition from execution substrate. Developers define a workflow once as a typed dataflow graph. The platform compiles the graph to in-process streaming for real-time serving, durable AWS SWF orchestration for asynchronous execution, or distributed Apache Flink stream processing for batch inference. No workflow code changes are required. LLM inference is represented as a suspendable graph node whose behavior depends on the substrate: streaming delivery online, durable retry asynchronously, and batched submission offline. We validated dozens of production agent configurations across five orchestration patterns: single-inference RAG, iterative ReAct, compositional PreAct, conditional routing, and multi-agent deep research. Across all three bindings, we found no detectable difference in output quality. Batch execution reduced per-query inference cost in line with published batch API pricing while operating alongside the streaming path at production scale.
Summary
Main Finding
A binding-adaptive execution platform that separates workflow definition from execution substrate lets the same typed dataflow agent be compiled to (1) low-latency streaming for real-time serving, (2) durable asynchronous workflows (AWS SWF) for background tasks, or (3) batched distributed execution (Apache Flink) for high-volume offline workloads — without code changes. Outputs were statistically indistinguishable across bindings, while the batch binding delivered substantial per-query inference cost reductions (consistent with published batch API pricing) at the expense of much higher end-to-end latency.
Key Points
- Architectural innovation
- Workflows are authorable once as a typed dataflow graph (small combinator set: map, infer, iterate, branch, compose).
- Inference is a first-class graph node (.infer(...)) rather than an opaque blocking call, enabling substrate-specific execution strategies.
- A binder compiles the graph into a BoundGraph for the target substrate:
- Local binding → in-process synchronous calls and streaming token delivery (real-time).
- SWF binding → each node → SWF activity tasks (durable, traceable async).
- Flink binding → operators store suspended state, offload to SQS, and batch submission to Bedrock batch API (high-throughput offline).
- Empirical findings
- Quality equivalence: across five common orchestration patterns (RAG, ReAct, Routing, PreAct, Deep Research) and >500 prompts per pattern, no statistically detectable preference in output quality across bindings (Bradley-Terry 95% CIs include zero).
- Latency tradeoffs: SWF adds 1.1–3.4× latency vs streaming; Flink adds 33–152× (dominated by provider-side batch scheduling).
- Cost structure: token costs dominate (~100% of per-query cost in representative agents); compute/orchestration/messaging <0.5% collectively. Published batch inference pricing (≈50% discount referenced) is the primary lever to reduce workflow cost for offline workloads.
- Limits and portability boundaries
- Time-sensitive tool outputs (e.g., real-time prices) can diverge when executed in batch hours later.
- Substrate-specific failure modes and correlation/timeouts differ across bindings; handling must be explicit.
- Workflows that require token-level streaming timing or side-effectful operations cannot be fully substrate-portable and must isolate side effects or use binding-specific logic.
Data & Methods
- Models and environment
- Used Anthropic Claude family models hosted on Amazon Bedrock (Opus, Sonnet, Haiku) to avoid coupling to a single proprietary model.
- Deployed bindings in one AWS region: Local on ECS Fargate, SWF decider + workers on ECS, Flink on Amazon Managed Flink with horizontally scaled TaskManager cluster.
- Workloads / patterns evaluated
- Five orchestration patterns: single-infer RAG, iterative ReAct (2–5 iterations), Routing (classifier dispatch), PreAct (speculative planning + stronger compositional model), Deep Research (planner + parallel specialists + synthesizer; 5–12 inference calls).
- Benchmark: >500 expert-authored and synthetic prompts per pattern (same benchmark used for production releases).
- Metrics and analysis
- Quality equivalence: pairwise position-swapped human preference judgments; decisive rate (winner same in both orders); Bradley-Terry strength estimates with 95% bootstrap CIs. Result: no reliable quality differences across bindings.
- Latency: end-to-end latency normalized to streaming baseline; reported ranges per pattern (see Key Points).
- Cost analysis: per-query cost decomposition showing token dominance; evaluated batch API pricing impact consistent with public pricing (authors cite ~50% discount).
Implications for AI Economics
- Direct cost savings opportunity
- Because token costs dominate and batch inference APIs are priced substantially lower than real-time APIs, moving high-volume, latency-tolerant offline workloads (evaluation, cache generation, content pre-generation) to a batch binding can materially reduce overall inference spend while preserving output quality.
- The platform enables that shift without reauthoring orchestration logic, lowering migration engineering costs and time-to-adopt batch pricing.
- Resource allocation and provisioning
- Decoupling orchestration from inference submission prevents offline workloads from inheriting low-latency serving infrastructure (which is more expensive per token). This enables more efficient capacity planning and utilization (separate clusters/runtimes matched to SLOs).
- Tradeoffs and hidden costs
- Batch execution increases end-to-end latency massively (tens to hundreds of times), so economic benefits apply only where latency-tolerance exists. Provider-side batch scheduling variability can further affect latency and throughput guarantees.
- Fixed costs (e.g., Managed Flink cluster) can raise per-query infrastructure overhead at low utilization; however, infrastructure overhead remains a small share of total cost because token billing dominates. Thus utilization and volume matter for the economic case.
- Operational risk and quality drift: time-sensitive tool outputs and substrate-specific failures require guardrails (e.g., side-effect isolation, staleness-aware predicates, error correlation/timeouts). Mitigation adds engineering and potentially operational cost.
- Evaluation and tooling economics
- Batch evaluation can replace higher-cost streaming evaluation for many agent architectures while still detecting regressions and model downgrades — improving evaluation throughput per dollar and enabling broader/regressive testing at scale.
- Practical decision rule (applied implication)
- Use Local (streaming) binding for customer-facing, latency-sensitive traffic (sub-second TTFT).
- Use SWF binding for durable, traceable background tasks that need per-invocation auditability and moderate latency tolerance.
- Use Flink (or similar batch binding) for large-volume offline workloads (evaluation, pre-generation) when latency can be tolerated and aggregated batch discounts justify the fixed and scheduling costs.
- Broader economic impact
- Platforms that make inference substrate-portable reduce duplicate engineering effort across execution modes, lower switching costs to cheaper inference APIs, and enable more precise cost-performance SLO tradeoffs — all of which can materially affect the unit economics of production LLM systems at scale.
If you want, I can extract the key numeric tables (latency multipliers, Bradley–Terry CI summaries) into a short reference sheet for quick operational decision-making.
Assessment
Claims (10)
| Claim | Direction | Outcome | Confidence & Evidence | Details |
|---|---|---|---|---|
| The platform allows developers to define an agent workflow once as a typed dataflow graph and execute it on local streaming, durable asynchronous, or distributed batch substrates without changing the workflow code. Organizational Efficiency | positive | Execution portability across operational modes |
Reading fidelity
high
Study strength
medium
|
not reported
|
| Across the evaluated orchestration patterns and execution bindings, the paper found no statistically detectable difference in output quality. Output Quality | null_result | Agent output quality preference across Local, SWF, and Flink bindings |
Reading fidelity
high
Study strength
medium
|
All reported 95% Bradley-Terry confidence intervals included zero
|
| The evaluated benchmark contained more than 500 expert-authored and synthetic prompts for each of the five orchestration patterns. Other | positive | Evaluation coverage |
Reading fidelity
high
Study strength
medium
|
more than 500 prompts per pattern
|
| SWF execution took between 1.1 and 3.4 times as long as the Local streaming baseline in the evaluated workflows. Task Completion Time | negative | Mean end-to-end execution latency |
Reading fidelity
high
Study strength
medium
|
1.1–3.4× the Stream baseline
|
| Flink batch execution took between 33 and 152 times as long as the Local streaming baseline in the evaluated workflows, primarily because of provider-side batch scheduling. Task Completion Time | negative | Mean end-to-end execution latency |
Reading fidelity
high
Study strength
medium
|
33–152× the Stream baseline
|
| Batch execution reduced per-query inference cost in a manner consistent with the published pricing discount for batch inference. Firm Productivity | positive | Per-query inference cost |
Reading fidelity
high
Study strength
low
|
not reported
|
| For the representative Sonnet ReAct agent, tokens accounted for approximately 100% of per-query cost in every binding, while compute, orchestration, messaging, and other infrastructure accounted for less than 0.5%. Firm Productivity | positive | Composition of per-query operating cost |
Reading fidelity
high
Study strength
medium
|
approximately 100% token cost; less than 0.5% other infrastructure cost
|
| The batch binding detected operationally relevant changes, including model downgrades and prompt regressions, despite its different execution mode. Decision Quality | positive | Detection of model and prompt quality regressions |
Reading fidelity
high
Study strength
medium
|
not reported
|
| The platform provides functional portability but does not make latency, failures, or other operational behavior identical across execution bindings. Organizational Efficiency | mixed | Cross-substrate operational equivalence and failure behavior |
Reading fidelity
high
Study strength
medium
|
not reported
|
| Time-sensitive tools can produce different results in batch execution because the batch workflow may run hours later, and these differences can alter the workflow's continuation predicate. Output Quality | negative | Consistency of workflow outputs under time-sensitive tool calls |
Reading fidelity
high
Study strength
medium
|
not reported
|