AWS Builder Center
Achieving an Agentic Back-Office in Petroleum Refining

Achieving an Agentic Back-Office in Petroleum Refining

A Prescriptive Guide to 5–10X Productivity Gains | $0.40–$1.50 Reduction in Cash Opex per Barrel

AWS BUILDERS BLOG  |  GETTING STARTED ON AWS
Achieving an Agentic Back-Office in Petroleum Refining
A Prescriptive Guide to 5–10X Productivity Gains  |  $0.40–$1.50 Reduction in Cash Opex per Barrel
By Rob Girvan, Swami Natarajan, and Jun Choi
Refiners measure their back office in cents per barrel. For Fortune 2000 refiners — Marathon Petroleum, Valero, Phillips 66, PBF Energy, HF Sinclair, Delek, CVR Energy, Par Pacific, Calumet, Vertex Energy, and the refining segments of supermajors (ExxonMobil, Chevron, Shell, BP) — cash operating expense per barrel typically runs $4 to $10, with energy costs ($1–$2/bbl) and other operating costs (labor, maintenance, chemicals, hydrogen, regulatory compliance) making up the balance. Solomon Associates' Equivalent Distillation Capacity (EDC) and Energy Intensity Index (EII) frameworks govern industry benchmarking, and pacesetter refineries operate at meaningfully lower opex per EDC barrel than fourth-quartile peers. Net refining margin — gross margin minus operating costs per barrel — drives quarterly earnings and can swing from negative to $25/bbl based on market conditions.
Here's the opportunity: 50% to 65% of employee activities in refinery back-office functions are repetitive, manual processes — hydrocarbon mass balance reconciliation across crude, intermediates, and finished products, exchange and inventory accounting against pipeline tariffs, RFS RIN compliance and EPA reporting, MSDS and California CARB reporting, monthly close on hydrocarbon and energy positions, and product-line bulk plant accounting. AWS customers are achieving 5–10X productivity improvements when applying Agentic AI to these processes, translating to potential reductions of $0.40 to $1.50 per barrel in cash operating expense. For a 1 million BPD refining system, that's $145M to $550M in annual cost reduction — and because cash opex per barrel is the metric refining boards watch quarterly, every 10 cents matters.
This post walks you through the six mega-processes ripe for Agentic AI in petroleum refining, where to start based on a value-risk framework, the AWS services powering the transformation, and the production-ready partner platforms already delivering results.

The Six Mega-Processes Ripe for Agentic AI

Refining back-office work clusters into six mega-processes — five common to most industries plus one refining-distinct mega-process: Hydrocarbon Mass Balance & Exchange Accounting. Each carries a different level of manual intensity, which is the first lens for determining where AI agents deliver the fastest ROI.

Manual Intensity Rankings

Mega-ProcessManual
Intensity Level
% of Total
Manual Burden
Primary Manual
Burden
Hydrocarbon Mass Balance & Exchange AccountingExtreme28%Crude/intermediate/product mass balance,
exchange agreements, pipeline ticket
reconciliation, terminal allocation
Regulatory & Renewable ComplianceExtreme22%RFS RIN tracking and EPA EMTS,
California LCFS, MSAR/CARB reporting,
FERC rate-base reporting (refinery pipelines)
Procure-to-Pay & Crude SettlementVery High17%Crude purchase invoice settlement,
feedstock contract reconciliation,
additive/chemical/hydrogen P2P
Customer Billing & Wholesale O2CVery High13%Branded and unbranded rack sales billing,
bulk pipeline transactions, jet fuel into-plane
settlement, marine bunker billing
Record-to-Report (R2R)High12%LIFO/FIFO inventory accounting,
monthly hydrocarbon close, hedge accounting
(ASC 815), excise tax reporting
Hire-to-RetireMedium8%Turnaround crew scheduling, contractor
OQ/safety qualification, USW collective
bargaining administration
 

1. Hydrocarbon Mass Balance & Exchange Accounting — Extreme Manual Intensity | 28% of Manual Burden

This is the refining-distinct mega-process and the largest single manual burden in the industry. Refineries process hundreds of thousands of barrels per day of crude into dozens of finished products, with continuous mass balance tracking across crude receiving (pipelines, ships, rail), processing units, intermediate streams, finished product tanks, and terminal/pipeline shipments. Exchange agreements between refiners — extremely common because finished products often move through pipelines and terminals shared with competitors — add another reconciliation layer. The Solomon Equivalent Distillation Capacity (EDC) and Cash Operating Cost Index frameworks normalize this complexity for industry benchmarking.
•         Daily/Monthly Hydrocarbon Mass Balance — Reconciling crude inputs to product outputs at refinery, terminal, and pipeline level with measurement variance accounting
•         Exchange Agreement Settlement — Reconciling product exchanges with other refiners (e.g., sending gasoline at Refiner A's terminal in exchange for diesel at Refiner B's terminal) with location and quality differentials
•         Pipeline Ticket Reconciliation — Reconciling tens of thousands of monthly pipeline movement tickets (Colonial, Plantation, Magellan, Enterprise, Buckeye) against shipper allocations
•         Terminal Inventory Reconciliation — Reconciling terminal inventory (across hundreds of terminals industry-wide for major refiners) between refinery records and terminal-operator statements
•         LIFO Layer & Hydrocarbon Carrying Value — Maintaining LIFO inventory layers, computing lower-of-cost-or-market adjustments, and reconciling hydrocarbon carrying value at each close

2. Regulatory & Renewable Compliance — Extreme Manual Intensity | 22% of Manual Burden

U.S. refining is one of the most regulated industries on the planet. EPA's Renewable Fuel Standard (RFS) generates millions of Renewable Identification Numbers (RINs) per year that must be tracked, traded, and retired. California's Low Carbon Fuel Standard (LCFS), Cap-at-the-Rack (CAR) program, and CARB MSAR reporting add state-specific complexity. Federal excise tax (IRS Form 720), TSCA, MSDS/SDS, and OSHA PSM/EPA RMP reporting compound the burden. California's SB X1-2 monthly cost-disclosure regime now requires line-by-line disclosure of operational cost per barrel.
•         RFS RIN Tracking & EPA EMTS — Tracking RIN generation, trading, retirement, and EMTS (EPA Moderated Transaction System) reporting for monthly and annual compliance
•         California LCFS & Cap-at-the-Rack — Computing LCFS deficit/credit positions and CAR program valuations on every gallon sold into California
•         MSAR / CARB Monthly Reporting — Producing California Energy Commission Petroleum Market Advisory Committee (MSAR) and CARB compliance filings
•         Federal Excise Tax (Form 720) — Computing federal excise tax obligations on gasoline, diesel, jet, and other fuel products with refundable credits and biodiesel mixture credits
•         EPA RMP / OSHA PSM Compliance — Maintaining compliance documentation under Risk Management Plan and Process Safety Management requirements

3. Procure-to-Pay & Crude Settlement — Very High Manual Intensity | 17% of Manual Burden

Refiner P2P is dominated by crude oil purchases — the single largest cost category, with refiner acquisition cost averaging around $80/bbl in 2024. Crude purchase contracts use complex pricing formulas (NYMEX WTI, Brent, ANS, Bakken differentials) with quality bank adjustments for API gravity and sulfur. Beyond crude, refiners purchase additives, hydrogen (often via merchant or on-site supply contracts), catalysts, and turnaround/maintenance services.
•         Crude Purchase Settlement — Reconciling crude invoices against contract pricing formulas, quality bank adjustments, and physical receipt tickets
•         Feedstock Trader Settlement — Settling intermediate feedstock trades (VGO, naphtha, gas oil) against ETRM positions and bilateral contracts
•         Hydrogen & Industrial Gas Settlement — Reconciling hydrogen, nitrogen, and other industrial gas invoices against on-site supply contracts and meter readings
•         Catalyst & Chemical Procurement — Three-way matching catalyst, chemical, and additive invoices against POs and unit consumption records
•         Turnaround & Maintenance Contractor Settlement — Reconciling turnaround service contractor invoices (often $50M–$300M per major turnaround) against contract rates and field tickets

4. Customer Billing & Wholesale O2C — Very High Manual Intensity | 13% of Manual Burden

Refiner customers span branded and unbranded rack sales (jobbers and station operators), bulk pipeline customers, jet fuel into-plane sales at airports, marine bunker fuel, and asphalt/specialty product customers. Pricing is dynamic (rack price changes daily; bulk pipeline transactions price off futures), and credit terms range from prepayment to net-30.
•         Rack Sales Billing — Producing daily branded and unbranded rack sales invoices with applicable taxes, RIN obligations embedded, and contractual margin
•         Bulk Pipeline Sales Settlement — Settling pipeline-batch sales against scheduled volumes and pricing formulas
•         Jet Fuel Into-Plane Settlement — Reconciling jet fuel into-plane delivery records, airport contract pricing, and IATA settlement procedures
•         Marine Bunker & Specialty Sales — Settling marine bunker fuel deliveries, asphalt, lubes, and specialty product sales with their respective tax and contract structures
•         Customer Credit & A/R Management — Managing credit lines for jobbers and large customers, processing A/R against complex payment terms, and managing dispute resolution

5. Record-to-Report (R2R) — High Manual Intensity | 12% of Manual Burden

Refiner R2R operates with substantial hedge accounting (ASC 815 — refiners hedge crude, product, and crack-spread positions extensively), LIFO inventory accounting (most US refiners), and complex SEC and tax reporting. ASC 805 acquisition accounting around portfolio rationalization moves regularly through refining R2R.
•         Hedge Accounting (ASC 815) — Running hedge effectiveness tests on crack-spread, calendar-spread, and product-specific hedges
•         LIFO Inventory Accounting — Maintaining LIFO inventory layers and computing the LIFO reserve at each close
•         Crude/Product Excise Tax Reporting — Producing federal excise tax (Form 720) and state excise tax filings
•         FERC Form 6 (Pipeline Affiliate) — For refiners with affiliated pipeline operations, producing FERC Form 6 annual reports
•         Bank & Cash Reconciliations — Reconciling internal cash records against statements across hundreds of accounts including credit/debit clearing accounts

6. Hire-to-Retire — Medium Manual Intensity | 8% of Manual Burden

Refining workforce management is shaped by USW (United Steelworkers) and other union agreements, OSHA PSM-driven training requirements, and the contractor-management complexity of major turnarounds (which can bring 1,000–3,000 contractors on-site for 30–60 days).
•         Turnaround Contractor Onboarding — Managing OQ qualifications, safety orientations, and contractor PSM-aligned credential validation for turnaround-scale workforce surges
•         USW Contract Administration — Applying USW collective bargaining provisions (shift premiums, callout pay, overtime tiers, safety incentives)
•         OSHA PSM Training & Certification Tracking — Monitoring required process safety management training and operator-qualification certifications
•         Onboarding & Identity Provisioning — Processing IT, badge, plant access, and PPE for new hires and turnaround contractors
•         Lifecycle Data Syncing — Updating employee profiles across payroll, training, OQ records, and benefits systems

Where to Start: The Standardization-Risk Framework

Manual intensity tells you where the value is. Standardization tells you where the risk is.

Standardization Rankings

Mega-ProcessCross-Industry
Standardization
Refining
Standardization
Why It Varies
in Refining
Record-to-Report (R2R)ExtremeVery HighGAAP, ASC 815, and LIFO are codified;
FERC and SEC reporting formats are
standardized
Regulatory & Renewable ComplianceN/A (Refining-Specific)Very HighRFS, LCFS, MSAR, and EPA EMTS schemas
are highly structured; California programs
follow prescribed monthly cycles
Hydrocarbon Mass Balance & ExchangeN/A (Refining-Specific)HighSolomon EDC and Cash Operating Cost
Index frameworks are industry-standard;
exchange agreement structures common
Procure-to-Pay & Crude SettlementVery HighHighPricing formulas and quality bank logic
are standardized; crude contracts have
boilerplate frameworks
Customer Billing & Wholesale O2CMediumMediumRack pricing follows industry conventions;
into-plane and marine bunker contracts vary
by customer and location
Hire-to-RetireHighMediumCore HR is standard, but USW agreements
and OSHA PSM training requirements vary
by site and union local
 

Key Standardization Drivers

•         Standards-Led (High Standardization): R2R, federal regulatory reporting, and RFS RIN compliance are governed by GAAP, ASC 815, EPA RFS, FERC, and IRS rules — automation simply codifies rules that are already codified externally.
•         Industry-Convention-Led (Medium-High Standardization): Hydrocarbon mass balance, exchange accounting, and crude pricing formulas follow industry conventions (Solomon EDC, NYMEX WTI/Brent benchmarks) but vary by counterparty contract.
•         Counterparty-Led (Medium Standardization): Customer billing varies by branded vs. unbranded, into-plane, marine, and specialty contract terms — requiring customer-specific configuration.

Recommended Implementation Priority

Combining manual intensity (value) and standardization (risk) yields a clear roadmap for refiners:
•         Start here → R2R and Regulatory Compliance: Highest standardization, lowest risk. Hedge accounting reconciliation, LIFO maintenance, RFS RIN tracking, and EPA EMTS reporting are externally codified.
•         Next → Hydrocarbon Mass Balance & Exchange Accounting: Extreme value with low-medium risk. Daily/monthly mass balance, pipeline ticket reconciliation, and exchange agreement settlement are high-volume rules-based work.
•         Then → P2P and Crude Settlement: Very high value with low-medium risk. Crude purchase reconciliation against pricing formulas, quality bank adjustments, and physical receipt tickets are high-volume work suited to agentic execution.
•         Then → Customer Billing & Wholesale O2C: Very high value with medium risk. Rack sales billing, pipeline-batch settlement, and into-plane reconciliation produce solid ROI.
•         Finally → Hire-to-Retire: Medium value for stabilizing turnaround contractor management and PSM training tracking.

Getting Started on AWS

AWS provides a comprehensive stack for building, deploying, and operating Agentic AI at enterprise scale. Three core services anchor the architecture for refining back-office automation:

Amazon Bedrock

Amazon Bedrock is the foundation for building generative AI applications on AWS. It provides access to high-performing foundation models from leading AI companies through a single API, along with built-in capabilities for customization, retrieval-augmented generation (RAG), and guardrails. For refining back-office automation, Bedrock powers the reasoning and language understanding that enables AI agents to read invoices and rate filings, interpret regulatory data, reconcile billing exceptions, and generate compliance reports — all with enterprise-grade security and privacy.

Amazon Bedrock AgentCore

While Bedrock helps you build generative AI applications, AgentCore provides the enterprise-grade infrastructure and operations layer for deploying and managing AI agents at scale. AgentCore handles identity and access management, code interpretation, secure execution environments, and VPC/PrivateLink integration — so your agents can access SAP, Oracle, customer information systems (CIS), and work management systems securely. Developers can stand up a working autonomous agent through configuration rather than orchestration code, dramatically reducing time-to-production.

Amazon Quick

Amazon Quick is AWS's unified AI-powered business intelligence and productivity suite. It brings together interactive dashboards, natural language querying, automated insights, and AI-driven research capabilities — enabling utility leaders to monitor back-office KPIs, track regulatory commitments, and surface anomalies across operations. Quick's agentic features — Flows, Automations, and Research — allow teams to build automated analytical workflows that complement back-office AI agents, creating a closed loop from data capture to executive insight.

Agentic AI Platforms Built on AWS

A growing ecosystem of AWS partners has built production-ready Agentic AI platforms specifically designed to tackle the back-office challenges described above. Four leading platforms:

BLP

BLP is the AI platform that transforms core business processes. Trusted by 450+ enterprises in 40+ countries and ranked among Europe's fastest-growing companies on the FT1000 (2026), BLP breaks each process into atomic tasks and assigns a specialized AI agent to each part, with orchestration across the entire workflow. Their focus areas — Finance, Procurement, Sales, and Logistics — map directly to the P2P, O2C, and R2R mega-processes where refiners sees the highest manual burden. Founded in Zurich in 2019 and backed by a $50 million investment from Goldman Sachs Alternatives, BLP evolved from deep ERP expertise into an AI-native automation company.

Karini AI

Karini AI is natively built on AWS and holds the AWS AI Specialization in Agentic AI — distinguishing it as an AWS Partner with proven technical expertise in delivering production-ready autonomous agentic systems that reason, plan, collaborate, utilize tools, execute tasks, and continuously improve. Karini enables refiners enterprises to build, deploy, scale, and nurture agentic workflows 20X faster, with governance, security, and business-level controls built into a single platform — particularly valuable for the regulatory variation that defines utility back-office work.

Gruve

Gruve combines infrastructure, data, and AI agents into a unified approach, helping refiners enterprises deploy AI systems that are scalable, efficient, and aligned with real business value. Their integrated methodology addresses the full stack — from the underlying compute and data layer to the agent orchestration that drives back-office automation — making them a strong fit for utilities that need end-to-end transformation rather than point solutions.

skie.io

skie.io offers a unified cloud platform that optimizes AWS costs, manages cloud operations, and automates enterprise workflows with AI agents. Their three-lever model is particularly compelling for refiners:
•         Sage — Continuous cloud cost optimization (customers report 20–40% AWS cost reductions)
•         Guardian — 24/7 automation-first managed cloud operations with enterprise-grade SLAs
•         Muse — AI agents for enterprise workflow automation, including ITSM, help desk, ERP exception handling, and procurement automation
skie.io's self-funding model — where optimization savings fund managed services and AI automation — offers refiners a low-risk entry point to agentic operations.

Calculating Value for Your Organization

Full deployment of Agentic AI across all six mega-processes could reduce cash operating expense by $0.40 to $1.50 per barrel at a Fortune 2000 refiner. To build a defensible, process-specific ROI calculation:
•         Identify high-volume manual processes (mass balance reconciliation, pipeline ticket processing, RIN tracking, exchange agreement settlement, crude purchase reconciliation)
•         Measure current cash opex per barrel by category using your Solomon CPA/EDC report or internal management reporting
•         Apply a conservative 5X productivity improvement based on AI automation
•         Layer in revenue and margin recovery — recovered exchange agreement settlements, accelerated RIN trading, and improved crude quality bank claims improve cash flow beyond pure cost reduction
This bottom-up approach produces a defensible per-barrel business case rather than a generic top-down revenue percentage, and aligns with the metric every refining investor watches.

Start Building Today

The refining back office is one of the highest-ROI targets for Agentic AI. The combination of high manual intensity, codified regulatory frameworks, and industry-standard mass balance and EDC benchmarking makes R2R, Regulatory Compliance, and Hydrocarbon Mass Balance ideal starting points. With Amazon Bedrock for AI reasoning, Amazon Bedrock AgentCore for secure agent deployment, and Amazon Quick for intelligent analytics — plus production-ready platforms from BLP, Karini AI, Gruve, and skie.io — refiners have everything they need to begin their agentic transformation on AWS.
The question isn't whether to automate your back office. It's which process to start with first.

Sources & References

Industry Research

•         Solomon Associates — Refining Operational Performance Benchmarking (EDC, EII, CPA, CWB)
•         U.S. Energy Information Administration (EIA) — Refining/Marketing FRS Performance Profiles
•         U.S. Environmental Protection Agency — Renewable Fuel Standard (RFS), EMTS, RIN Compliance
•         California Energy Commission — California Oil Refinery Cost Disclosure Act (SB X1-2) Monthly Reports
•         California Air Resources Board (CARB) — Low Carbon Fuel Standard (LCFS), Cap-at-the-Rack (CAR)
•         Boston Consulting Group — Future for Refiners is Dictated by Costs and Margins
•         Oil & Gas Journal — Best Practices Determine Refinery Pacesetter Performance (Solomon EDC framework)
•         ENERGY STAR — Focus on Energy Efficiency in Petroleum Refining
•         FASB — Hedge Accounting (ASC 815) and LIFO Inventory Methods
•         Internal Revenue Service — Federal Excise Tax (Form 720)
•         FERC — Form 6 Annual Report for Oil Pipelines
•         API / AFPM — Industry Operating Practices and Reporting Standards

AWS Services

•         Amazon Bedrock — https://aws.amazon.com/bedrock/
•         Amazon Bedrock AgentCore — https://aws.amazon.com/bedrock/agentcore/
•         Amazon Quick — https://aws.amazon.com/quicksight/

Agentic AI Platforms

•         BLP — https://blp.digital/
•         Karini AI — https://karini.ai/
•         Gruve — https://gruve.ai/
•         skie.io — https://skie.io/
 
Rob is an AWS specialist focused on Agentic AI for enterprise back-office transformation. Connect with your AWS account team to schedule a back-office assessment and identify your highest-value automation opportunities.
Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article