S Shortlisted
Home / Blog / Agent Studio workflow patterns
AI Agents · From a real build

Inside a production Agent Studio workflow: 8 patterns that actually ship.

Most Oracle AI Agent Studio content is written by people who have never deployed one. This isn't. What follows is the anatomy of a real, working production agent — one that reads a request from chat, allocates it against thousands of open purchase-order lines using strict FIFO, gets a human's approval, and creates an Advance Shipment Notice in Fusion. Company details, identifiers and business context have been removed; the engineering patterns are exactly what shipped.

By the Shortlisted team · From a working consultant's production build · Published July 2026

The workflow in one paragraph

A user types a natural request — "ship these items, these quantities." The agent parses it, bulk-fetches every open PO line for the supplier via REST, runs a deterministic FIFO allocation against available quantities, presents the allocation to a human for approval, then generates a shipment number and posts the ASN through Fusion's receiving API — and finally reports back in plain language, including anything it couldn't fulfil. Total AI involvement: two nodes out of thirty. That ratio is the first lesson.

Pattern 1 — The LLM belongs at the edges, never in the middle

The single most important design decision in the whole build: the language model only parses the user's request and writes the final report. Everything between — the allocation math, the payload building, the API calls — is deterministic Code nodes and Business Object calls.

Why this matters: an allocation that moves real inventory must produce the same answer every time for the same inputs. It must be auditable ("why did PO 4711 get 40 units?" — because FIFO by due date, look at the code), and it must be trusted by the approver. An LLM doing arithmetic across 8,000 PO lines is none of those things. The rule we'd defend in any design review: LLM for language, code for logic, APIs for facts.

Pattern 2 — The human gate, done properly

Before anything touches the ledger of reality, the workflow hits a HUMAN node: a chat approval showing exactly what will happen — items requested vs allocated, every partial fulfilment flagged, total line count. Three details worth stealing:

Pattern 3 — Pagination is your problem, not the platform's

Fusion REST resources cap what one call returns (this build pulls in pages of 499 rows). The workflow needed all open PO lines — thousands of them — before allocation could start. The production answer is unglamorous: a chain of page-fetch nodes with increasing offsets, then a merge node that concatenates every page into one array before the logic runs.

Two field notes the docs won't give you:

Pattern 4 — Deterministic allocation: boring code, total trust

The FIFO core is ~60 lines of deliberately boring JavaScript: filter matching lines per item, sort by due date with a stable tie-breaker (oldest document id), walk the list allocating min(remaining, available), and record a shortfall entry the moment demand can't be met. Then a summary pass labels every item FULL or PARTIAL.

Notice what that gives the business : the approval message (Pattern 2) and the final report both come straight from the allocation output — one source of truth, three audiences (the code, the approver, the requester).

Pattern 5 — Never trust the clock, never invent a number

Two subtle production habits worth copying:

Pattern 6 — The skip-flag: agents must know how to do nothing

What if none of the requested items have open PO availability? The naive agent errors out or, worse, creates an empty transaction. This build sets a skip flag: if the allocation produced zero lines, the transaction step is bypassed entirely and the report says, in plain language, "nothing created — here's what was unavailable and why." Graceful no-op is a feature you must design, not a default you inherit.

Pattern 7 — Custom Business Objects are your API contract

The REST calls aren't scattered through the workflow — they're wrapped as custom Business Objects with tokenized parameters (the page offset is a token, the payload is a token) and saved sample queries. That makes each call testable in isolation, reusable across workflows, and readable by the next consultant. Treat BO definitions like code: named, documented, versioned in your head if nowhere else.

Pattern 8 — The reporting prompt is a contract, not a vibe

The final LLM report node doesn't say "summarize the result." It defines strict branching rules: if nothing was created, say exactly this and list shortfalls; if success, state the document number, the count — not every line — and any partials; if error, show the return message and what was attempted. Plus a hard length cap. An LLM with rules is a UI; an LLM without rules is a liability.

What this means for your interviews

Agent questions are arriving in Fusion interviews faster than prep material exists. If you can narrate even three of these patterns — LLM-at-the-edges, the human gate, graceful no-op — you will sound like the one candidate in the stack who has actually shipped one. And if a panel asks "how would you automate shipment creation safely?", this article is the senior answer, pattern by pattern.

Disclosure: this article describes a real production build with all customer-identifying details, identifiers and business context removed or altered. Patterns and node architecture are as deployed. Verify platform capabilities against your release — Agent Studio evolves quarterly (Release Radar).

Get drilled on agent-era scenarios.

The Panel now asks the questions this article answers — before a real interviewer does. Scored like a real panel.

Face the Panel — →

Published July 2026 · Related: Oracle Fusion AI Agents field guide · Payables scenario questions · Release Radar.