arXiv:2610.37242cs.AIOct 2026

Manuscript Offprint

arXiv:2610.37242

Grounding LLM Agents in Business Processes: Process-Aware Knowledge Graphs for Reliable Multi-Step Service Invocation

Saiful Khan, Afrah Farea

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Large language model (LLM) agents that call enterprise APIs must select the correct endpoints, follow process order, use valid payload keys, and choose coded values from predefined lists. However, current retrieval-augmented service discovery treats endpoints independently and therefore misses process and schema constraints. We address this limitation by integrating Open Data Protocol (OData) metadata and Business Process Model and Notation (BPMN) reference processes in a typed property graph. A hybrid retriever identifies candidate endpoints using dense embeddings and follows process edges to retrieve subsequent endpoints. We evaluate the method on 42 enterprise services with process-chain ground truth. For queries with low lexical overlap between the query and downstream entities, it improves Recall@3 by 5.7 points (n = 74), with consistent gains across embedding models and cut-offs. It matches dense retrieval on other queries and provides no improvement on OpenAPI services without a process layer, indicating that the gains arise from process structure. We also evaluate an LLM agent on 81 multi-step queries. It completes 38.7% of tasks, compared with 10.3% for a chunk-based baseline. In an elicitation probe, providing valid code lists eliminates invented codes but leaves invalid keys in 46% of write runs. Full typed context reduces invalid calls to 3% (3 of 101 runs), with no invented codes. These results show that exposing process and schema constraints during retrieval improves the reliability of agent-driven API calls.

Keywords: Service discovery, Knowledge graphs, Retrieval-augmented generation, LLM agents, Business process modeling

1 Introduction

Imagine an AI assistant that must arrange a business trip. It has to find a flight, book it, and then reserve a hotel using the booking reference, in that order. Each booking form also has required fields and fixed code lists, such as cabin class or fare type. The assistant can pick the right booking API and still fail: it may invent a fare code, leave out a required reference, or book the hotel before the flight. Such a call fails just as badly as a call to the wrong API. Reliable multi-step automation therefore needs more than the right endpoint. It also needs two kinds of constraints around each call: sequential constraints (what comes next) and parametric constraints (which keys and code values are valid).

Enterprise software has the same problem at a much larger scale. Large companies expose thousands of APIs. A typical SAP S/4HANA system, for example, ships hundreds of Open Data Protocol (OData) services, each with many collections, fields, and cross-references. Suppose a developer asks: “create a purchase order for supplier X with a valid status code, then confirm goods receipt.” Choosing the right endpoint is only the first step. The payload keys must match the schema, the coded values must be valid, and the calls must follow the business process. Each of these rules gives a language model a chance to produce a call that looks right but is invalid.

Recent work on retrieval-augmented service discovery [1, 2] improves endpoint retrieval with chunking and embedding-based filtering. However, it treats each endpoint as an isolated unit. It leaves out three kinds of context: (a) process, what comes next in the workflow; (b) structure, which entities and value-help codes are valid; and (c) execution, how an agent builds and sends the call. The Discovery Agent [1], for example, ranks endpoints but stops at retrieval, and it has no process-chain ground truth. Its authors suggest knowledge graphs as a way to improve accuracy, but note that graphs are costly to build. We address this gap.

Our approach links two open, machine-readable standards. OData $metadata describes the entity collections, fields, and references of a service, but not the order in which they are used. BPMN describes the order of business tasks, but not the data each task uses. We load both sources into one typed property graph and link process activities to the entity sets they use. A hybrid retriever finds the closest entity sets by embedding similarity and then follows process edges to the ones that come next. It returns each endpoint with its schema context, which an execution agent uses to issue validated GET and POST calls through a mock HTTP layer.

This paper makes four contributions:

(a) A typed property-graph schema that combines service metadata with business processes, and an ingestion pipeline for OData $metadata and BPMN 2.0. We evaluate this design with a construction-fidelity audit (Sec. 5.3) and an ablation study (Sec. 5.5).

(b) A hybrid retriever that combines dense embedding seeds with a bounded expansion along process-sequence edges. We evaluate it in Sec. 5.4 and test where it stops working in Sec. 5.8.

(c) An execution-capable ReAct [3] agent that uses the retrieved value-help and cardinality context

to build its calls. We evaluate it in Secs. 5.6 and 5.7, including a baseline that receives the value lists as plain text, which separates the effect of seeing the values from the effect of the typed representation.

(d) OData-Proc, a public benchmark of 42 enterprise services, 14 BPMN reference processes, and 288 queries with two-annotator, process-chain ground truth. To our knowledge it is the first benchmark that scores service discovery against business-process chains.

Sec. 2 explains the main terms for readers who are new to OData, or BPMN. Sec. 3 reviews related work, Sec. 4 describes our method, and Sec. 5 reports the experiments.

References (31)