Table of Contents
Fetching ...

A Declarative Language for Building And Orchestrating LLM-Powered Agent Workflows

Ivan Daunis

TL;DR

The paper introduces a language-agnostic declarative DSL for building and orchestrating LLM-powered agent workflows, addressing enterprise needs for reliability, observability, and maintainability. By compiling pipelines to a JSON intermediate representation and employing a hybrid execution model, the approach separates business logic from deployment concerns and supports cross-language backends. Empirical results from PayPal deployments show substantial reductions in development time and improvements in reliability and latency, while enabling non-engineers to adjust agent behavior via configuration. The work outlines a production-ready architecture, formal semantics, and comprehensive evaluation, highlighting the potential of declarative pipelines to transform enterprise AI automation and governance.

Abstract

Building deployment-ready LLM agents requires complex orchestration of tools, data sources, and control flow logic, yet existing systems tightly couple agent logic to specific programming languages and deployment models. We present a declarative system that separates agent workflow specification from implementation, enabling the same pipeline definition to execute across multiple backend languages (Java, Python, Go) and deployment environments (cloud-native, on-premises). Our key insight is that most agent workflows consist of common patterns -- data serialization, filtering, RAG retrieval, API orchestration -- that can be expressed through a unified DSL rather than imperative code. This approach transforms agent development from application programming to configuration, where adding new tools or fine-tuning agent behaviors requires only pipeline specification changes, not code deployment. Our system natively supports A/B testing of agent strategies, allowing multiple pipeline variants to run on the same backend infrastructure with automatic metric collection and comparison. We evaluate our approach on real-world e-commerce workflows at PayPal, processing millions of daily interactions. Our results demonstrate 60% reduction in development time, and 3x improvement in deployment velocity compared to imperative implementations. The language's declarative approach enables non-engineers to modify agent behaviors safely, while maintaining sub-100ms orchestration overhead. We show that complex workflows involving product search, personalization, and cart management can be expressed in under 50 lines of DSL compared to 500+ lines of imperative code.

A Declarative Language for Building And Orchestrating LLM-Powered Agent Workflows

TL;DR

The paper introduces a language-agnostic declarative DSL for building and orchestrating LLM-powered agent workflows, addressing enterprise needs for reliability, observability, and maintainability. By compiling pipelines to a JSON intermediate representation and employing a hybrid execution model, the approach separates business logic from deployment concerns and supports cross-language backends. Empirical results from PayPal deployments show substantial reductions in development time and improvements in reliability and latency, while enabling non-engineers to adjust agent behavior via configuration. The work outlines a production-ready architecture, formal semantics, and comprehensive evaluation, highlighting the potential of declarative pipelines to transform enterprise AI automation and governance.

Abstract

Building deployment-ready LLM agents requires complex orchestration of tools, data sources, and control flow logic, yet existing systems tightly couple agent logic to specific programming languages and deployment models. We present a declarative system that separates agent workflow specification from implementation, enabling the same pipeline definition to execute across multiple backend languages (Java, Python, Go) and deployment environments (cloud-native, on-premises). Our key insight is that most agent workflows consist of common patterns -- data serialization, filtering, RAG retrieval, API orchestration -- that can be expressed through a unified DSL rather than imperative code. This approach transforms agent development from application programming to configuration, where adding new tools or fine-tuning agent behaviors requires only pipeline specification changes, not code deployment. Our system natively supports A/B testing of agent strategies, allowing multiple pipeline variants to run on the same backend infrastructure with automatic metric collection and comparison. We evaluate our approach on real-world e-commerce workflows at PayPal, processing millions of daily interactions. Our results demonstrate 60% reduction in development time, and 3x improvement in deployment velocity compared to imperative implementations. The language's declarative approach enables non-engineers to modify agent behaviors safely, while maintaining sub-100ms orchestration overhead. We show that complex workflows involving product search, personalization, and cart management can be expressed in under 50 lines of DSL compared to 500+ lines of imperative code.
Paper Structure (59 sections, 2 theorems, 10 equations, 1 figure, 2 tables)

This paper contains 59 sections, 2 theorems, 10 equations, 1 figure, 2 tables.

Key Result

Theorem 1

For conversation with average turn length $L$ and relevance decay $\lambda$, optimal window size is: where $\epsilon$ is minimum relevance threshold.

Figures (1)

  • Figure 1: System architecture showing the complete pipeline lifecycle. User-defined pipelines are validated and compiled to a JSON intermediate representation (IR). The executor maintains variable state and execution context while orchestrating calls to tools, LLMs, and custom functions. Responses from all services are aggregated and can either feed back into the executor for continued processing or produce the final output.

Theorems & Definitions (6)

  • Definition 1: Pipeline Grammar
  • Definition 2: Agent Coordination Model
  • Definition 3: Agent Working Memory
  • Theorem 1: Optimal Context Window
  • Definition 4: Conversation State
  • Theorem 2: Agent Scalability