SAP’s AI vision can be summarized in one sentence: Autonomous ERP — a future where the system understands, decides, and executes business processes without human intervention. The foundation of that future is SAP Business Technology Platform (BTP); its brain is SAP Joule. In this post we break down the BTP AI stack, Joule’s technical position, and agent design patterns for Autonomous ERP — all with architecture diagrams.
SAP BTP AI Stack: Technical Architecture
SAP BTP delivers AI capabilities on a single platform built around three core components: SAP AI Core, SAP AI Launchpad, and the Generative AI Hub. Each layer complements the others — from the business application surface all the way down to hyperscaler infrastructure.

The key insight is the LLM-agnostic design of the Generative AI Hub: both SAP standard products and custom developments can switch between GPT-4o, Claude 3.5, Mistral, Llama 3, and SAP-proprietary models through a single unified AI API — without re-engineering the consuming application.
SAP Joule: Landscape Integration
SAP Joule was introduced in September 2023 and is embedded across SAP’s entire application portfolio. What sets Joule apart from generic AI assistants is its deep understanding of SAP business context. The diagram below shows how Joule integrates across the full SAP landscape — from the end user’s browser, through SAP Cloud Identity Services, into the BTP subaccount, and out to external knowledge sources via Document Grounding (RAG).

Joule Capabilities (2024–2025)
- Cross-Application Skills: Operates across S/4HANA, SuccessFactors, Ariba, and SAP Build Code from a single Fiori-embedded panel
- Document Grounding (RAG): Analyzes contracts, invoices, and technical documents via HANA Cloud Vector Engine and Microsoft SharePoint
- Process Automation: Executes PO creation, PR approval, and payment proposals via Released APIs
- Code Generation: Generates ABAP, UI5, and CAP code in SAP Build Code; validates Clean Core compliance inline
- Custom Skill Extension: Partners build their own skills on BTP using OpenAPI specifications, registered in Joule Skill Registry
Autonomous ERP: Agent Architecture Patterns
SAP’s Autonomous ERP vision targets a model where the system decides and acts autonomously toward a defined goal. The building block is the AI Agent: a software entity that plans and executes multi-step tasks without human prompting at each step.

Pattern 1: ReAct Agent (Reason + Act)
The ReAct pattern alternates between thinking (LLM reasoning) and acting (tool invocation) in a loop until the goal is reached. Example: a payment proposal agent queries FI-AP for overdue invoices, checks payment terms via OData, and assembles the proposal — all autonomously.
Pattern 2: Multi-Agent Orchestration
Complex end-to-end processes like Order-to-Cash span multiple SAP modules. A central Orchestrator Agent in Joule decomposes the goal and delegates to specialized agents — Sales Agent (SD), Inventory Agent (MM/WM), Finance Agent (FI) — each calling only Released OData APIs.
Pattern 3: Human-in-the-Loop (HITL)
Not every action should run fully autonomously. The HITL pattern routes through a risk gate: low-risk actions execute automatically; high-risk actions surface in the Joule Panel for Approve / Reject / Modify. Every decision is logged to the SAP AI Launchpad audit trail.
The Golden Rule: Clean Core Compliance for AI Agents
❌ WRONG — Clean Core Violation
Agent → SELECT * FROM EKKO WHERE BUKRS = '1000' (direct table access)
Agent → BAPI_MATERIAL_GETLIST (unreleased BAPI)
Agent → Custom Z-table direct write (classic extensibility)
✅ CORRECT — Clean Core Compliant
Agent → GET /sap/opu/odata4/sap/api_purchaseorder_2/... (Released OData v4)
Agent → API_PURCHASEORDER_PROCESS_SRV (Released SOAP)
Agent → BTP Integration Suite iFlow → S/4 Released API (loose coupling)
Agent → SAP Event Mesh → Event-driven (no direct coupling)
Real-World Use Cases
Scenario 1: Intelligent Procurement
User tells Joule: “Get the best quote from approved vendors for monitors and create a PO if budget allows.” A Sourcing Agent queries Ariba, compares prices, validates budget via FI Agent, and creates the PO in S/4HANA through a Released API — all logged to the Audit Trail.
Scenario 2: Predictive Maintenance
A model on SAP AI Core analyzes IoT sensor data in real time. On anomaly detection, a Maintenance Agent creates a work order in SAP PM, checks spare-part stock via MM, and notifies the nearest technician through Joule — zero manual steps.
Scenario 3: Intelligent Financial Close
A Financial Close Agent checks open items, runs intercompany reconciliation, identifies mis-coded documents, surfaces them in Joule for accountant approval, then automatically posts correction entries. Month-end close drops from weeks to days.
Conclusion: Your 3-Phase Roadmap
- Foundation: Activate SAP AI Core + Generative AI Hub · identify highest-value agent use case
- Pilot: Quick wins with Joule out-of-the-box skills (e.g., PR approval via Joule)
- Scale: Build custom agents on AI Core · orchestrate with BTP Integration Suite · connect via Released APIs
At Clean Core ABAP, we provide technical consulting, custom agent development, and BTP AI architecture design. Contact us to discuss your project.
Sources: SAP Help Portal — SAP AI Core Service Guide, Generative AI Hub Documentation, SAP BTP Architecture Overview, SAP Joule Documentation (help.sap.com/joule)

