# AI Units and SAP's commercial model for AI: what is included, what is metered, how to plan

> How SAP sells AI on 29 November 2026 (Base AI, Premium AI, custom-built AI), how AI Units are bought and drawn, and how to size and watch a purchase.

- Course: Orchestrate, Unit 23 · Joule and the AI platform: the architect's view
- Page: https://erpfde.com/topics/ai-units-and-commercial-model/
- Updated: 2026-11-29
- Reading time: Foundational 9 min, Deep 36 min

Independent learning resource. Not affiliated with, sponsored by or endorsed by SAP SE. SAP and other SAP products mentioned are trademarks of SAP SE in Germany and other countries.

## Foundational layer

### The 60-second version

SAP sells its AI in three layers. **Base AI** comes with every SAP cloud subscription at no extra charge: Joule's everyday help and the AI built into SAP's applications. **Premium AI** is paid in **AI Units**, a prepaid currency: SAP's agents, document AI, document grounding and a few per-user offers such as SAP Joule for Consultants. **Custom-built AI**, what you build yourself, is free to design and paid when it runs, through your SAP BTP agreement ([SAP AI plans and pricing](https://www.sap.com/products/artificial-intelligence/pricing.html), read 29 November 2026).

AI Units are bought once a year, in blocks of 100, into one pool that every premium feature draws from. They expire after 12 months. Each feature has a published conversion rate: so many AI Units per agent action, per request, per document or per user.

The model is changing as you read this. SAP says most generative AI features that need AI Units today move into Base AI, its per-user "Joule Premium" packages retire, and Premium AI becomes mostly about agents. SAP's own pages give no single effective date. The decision this topic prepares you for: **what to buy, how much, and what to settle with SAP before you sign.**

### Why it matters to the business

AI spend at SAP is no longer one line in the subscription. It now sits in three places that different people watch.

- **Included, but not automatic.** Base AI costs nothing extra, but someone still activates it, trains people and measures whether it is used. A "pilot" of an included feature needs a plan, not a budget.
- **Prepaid and expiring.** AI Units bought in January and not used by the end of the contract year are lost. Buy too few and features stop or run into excess-use billing; buy too many and money lapses.
- **Metered by work, not by people.** SAP's agents are charged per action they take. Two agents with the same users can cost very different amounts, and a looping agent can burn a month's budget in an hour.
- **Two meters for one thing.** An agent you build in Joule Studio may be billed in AI Units or in BTP credits, depending on which SAP page you read. That needs settling in writing.

Take **Calder Pumpworks**, the fictional pump maker this course uses. It holds no AI Units today. For 2027 it plans: Joule for 60 clerks and buyers, a document grounding pipeline over its policy library, SAP's Dispute Creation Agent once it is enrolled, two Joule for Consultants seats for the six months of the Augsburg (`CP20`) rollout, its own order-exception agent, and a planning agent on BTP. A partner also proposes a per-user Joule Premium package for 25 planners.

> **Note** Calder's volumes and the 8.00 USD per AI Unit used in this topic are course values. SAP shows no cash price per AI Unit on its public pages; your contract sets it.

Run through SAP's published rates, that plan needs about 712 AI Units in 2027, and 420 of them are the two consultant seats. The agents everyone talks about are small; the per-seat offer is the big line. The planners' package is one SAP says it is retiring.

### How SAP does it

As read on SAP's pages on 29 November 2026:

- **Base AI** is "included at no extra cost", with no AI Units required: Joule Base and embedded AI, whose scope varies by product ([SAP AI plans and pricing](https://www.sap.com/products/artificial-intelligence/pricing.html)). SAP Learning says a customer without AI Units accepts SAP's AI terms once by adding a zero-priced item, SKU 8019544, before activation ([SAP Learning](https://learning.sap.com/courses/introducing-joule/understanding-the-commercial-model_a778010e-ba84-4378-ab3f-6c4b31d360eb)).
- **Premium AI** draws AI Units. SAP-delivered agents cost **0.02 AI Units per agent action** in 2026, where an action is one step such as a service call. Joule Assistants, which coordinate agents, carry no separate charge. Other AI features are charged per request or per record. SAP Joule for Consultants costs 35 AI Units per user per month.
- **Custom-built AI** is free to design and paid at runtime "through the SAP BTP Enterprise Agreement". The same page says custom agents run free in a productive Joule Studio runtime through the end of 2026. [Pricing custom agents after the free runtime](https://erpfde.com/topics/pricing-custom-agents-after-the-free-runtime/) covers that promotion.
- **AI Units** are bought annually (SKU 8019164), in blocks of 100 at the list price at contract start less your discount, on contracts of 12 to 36 months that renew automatically ([sap.com AI Units](https://www.sap.com/india/products/artificial-intelligence/ai-units.html)). Every conversion rate is in the [AI Features Guide Price List](https://www.sap.com/products/artificial-intelligence/price-list/list.pupm-ai-automation.world.html).
- **Watching it** happens in SAP for Me, which shows the balance, units expiring soon, monthly consumption and consumption by product ([SAP for Me help](https://support.sap.com/content/s4m/help/finance/business-ai-tab.html)).

> **Warning** SAP's pages disagree on timing. The pricing page says the model evolves "later this year". SAP Learning planned a phased rollout during Q3 2026, yet the price list still lists the Joule Premium packages. A 27 November 2026 article reports that SAP's October whitepaper puts the move in January 2027 ([The D\*AI\*LY BRIEF](https://www.beri.net/article/sap-ai-units-pricing-joule-agents-per-action-base-ai-premium-ai-2026)); the whitepaper itself couldn't be opened for this topic. Ask your account team for the date that applies to your contract.

### The three layers on one page

| | Base AI | Premium AI | Custom-built AI |
| --- | --- | --- | --- |
| What it is | Joule Base, embedded AI in SAP applications | SAP's agents, AI features (document AI, document grounding, Joule for Developers), Joule for Consultants | Your own agents, apps and workflows on SAP's AI platform |
| How it is paid | Included in the cloud subscription | AI Units, at a rate per action, request, record or user | Design free (fair use); runtime through BTP credits |
| What it costs Calder in 2027 | Nothing extra; activation and training effort | About 712 AI Units planned | About 420 USD of BTP credits planned, more if its custom agent is billed on BTP |
| Who watches it | Product owner for adoption | Whoever owns the AI Unit pool, in SAP for Me | BTP global account administrator, in the BTP cockpit |
| What to settle first | Which features are Base for your product and edition | The rate, status and edition of each feature; the transition date | Which meter applies to Joule Studio agents after 2026 |

> **Note** **For functional consultants.** Premium features are metered on **productive use only**, according to a footnote in SAP's price list, so test runs in a test system don't draw the pool. In production, though, every agent action counts. When you design an agent's process, record how many actions a typical case takes beside the expected answer, and add the agent's feature to the role and test-case documents so owners know it consumes AI Units.

### Questions to ask

Ask your SAP account team:

1. On which date does the new model apply to our contract, and what do we accept in the terms step?
2. Which of the features we plan to use move from Premium AI into Base AI, for our products and editions?
3. For each SAP agent we want: its rate per action, its status (generally available, early adopter, beta) and whether it runs on our edition.
4. From January 2027, are our Joule Studio agents billed in AI Units, in BTP credits, or both?
5. What is our price per AI Unit, and does excess use carry the same discount?
6. Do any of our features carry a minimum usage period after provisioning?

Ask your own team:

1. Who owns the AI Unit pool, and who is alerted when a month runs above plan?
2. Which planned item is the largest line, and is it the one that creates the most value?
3. Can we switch a feature or agent off quickly if consumption runs away?

### Common misconceptions

- **"Joule is free, so AI is free."** Joule Base is included. Agents, document grounding and per-seat offers draw AI Units, and your own agents run on BTP credits.
- **"Agents are priced per user."** SAP-delivered agents are priced per action. Per-user pricing remains for SAP Joule for Consultants and the packages SAP says it is retiring.
- **"Buy plenty of AI Units, they'll keep."** They expire after 12 months. A buffer protects against running out but costs money if unused.
- **"One rate for all agents."** The price list shows most agents at 0.02 AI Units per action, but some at 0.01, 0.025, 0.005 or 0.20.
- **"A new per-user package is a safe buy."** SAP says those packages are retiring and their features move to Base AI. Ask before signing.

### Key terms

- **Base AI:** SAP AI included in a cloud subscription, such as Joule Base and embedded AI, consuming no AI Units.
- **Premium AI:** SAP's agents and advanced AI features, paid in AI Units.
- **Custom-built AI:** agents and apps a customer builds on SAP's AI platform; free to design, runtime billed through BTP.
- **AI Units:** SAP's prepaid currency for Premium AI, bought yearly in blocks of 100 into one pool and expiring after 12 months.
- **Conversion rate:** the number of AI Units one unit of use costs, such as 0.02 per agent action; listed in the AI Features Guide Price List.
- **Agent action:** one step an agent takes, such as calling a service or generating a response; the meter for SAP's agents.
- **Excess use:** consumption beyond the AI Units bought, billed at the applicable rate.
- **SAP for Me:** SAP's customer portal, where the AI Unit balance, expiry and consumption are tracked.

### Check yourself

1. Calder's clerks will use Joule's everyday navigation and information help. What does that need commercially?
   - A. A block of 100 AI Units before any user can sign in
   - B. No AI Units: it is Base AI, after a one-time terms acceptance
   - C. A per-user Joule Premium package for every clerk who uses it
   - D. BTP credits, because Joule runs on SAP BTP behind the scenes

   Answer: B. Joule Base is part of Base AI, included in the cloud subscription with no AI Units. SAP Learning describes a one-time terms acceptance for customers that hold no AI Units yet.

2. How does SAP charge for its own delivered agents in 2026?
   - A. Per named user per month, through a Joule Premium package
   - B. Per document the agent reads, at a flat fee per document
   - C. In AI Units per agent action, 0.02 for most agents
   - D. Through BTP credits, metered on the tokens each model call uses

   Answer: C. SAP's pricing page gives 0.02 AI Units per agent action for SAP-delivered agents in 2026. The price list shows a few agents at other rates, so check each one.

3. Why should a leader care that AI Units expire after 12 months?
   - A. Units not used by the end of the contract year are lost
   - B. Expired units turn into BTP credits that only the BTP team can spend
   - C. Every feature stops working on the expiry date until a new contract is signed
   - D. Expiry only applies to partners' test units, never to customers' production units

   Answer: A. SAP's pages say unused AI Units expire after 12 months. Buying a large buffer protects against running out but turns into lost money if the use doesn't arrive.

4. In Calder's 2027 plan, which line needs the most AI Units?
   - A. The Dispute Creation Agent, because agents are the premium layer
   - B. Document grounding over the policy library, because it indexes documents
   - C. The two Joule for Consultants seats during the Augsburg rollout
   - D. Joule for 60 clerks and buyers, because it has the most users

   Answer: C. Two seats at 35 AI Units a month for six months are 420 of the roughly 712 planned. The agent and grounding lines are small, and Joule Base for clerks draws nothing.

5. A partner proposes a per-user Joule Premium package for 25 planners. What is the right first question?
   - A. Whether SAP will discount the package if Calder signs for three years
   - B. Whether SAP is retiring the package and moving its features into Base AI
   - C. Whether the planners can share one seat to keep the cost down
   - D. Whether the package can be paid from BTP credits instead of AI Units

   Answer: B. SAP's pricing page says the per-user packages for Finance, HCM, Supply Chain, Spend Management and Customer Experience retire and most of their features move to Base AI. Signing a new one before that is settled risks paying for something that becomes included.

6. SAP's pages give different dates for the change to the commercial model. What should you do?
   - A. Use the earliest date, because SAP Learning is the most technical source
   - B. Assume nothing changes until SAP publishes a press release about it
   - C. Use the date in the newest trade article, since it is the most recent
   - D. Ask the account team for the date that applies to your contract, in writing

   Answer: D. The pricing page, SAP Learning and the price list disagree, and the whitepaper a trade article cites couldn't be opened. Only your contract settles which terms apply and when.

## Deep layer

### Mental model

Think of SAP's AI commercial model as **three meters in two places**.

| Meter | Unit | Where you see it | Who pays it |
| --- | --- | --- | --- |
| Base AI | none | Usage only, in SAP for Me's functional usage view | Nobody; it is in the subscription |
| Premium AI | AI Units, by conversion rate | SAP for Me: balance, consumption, statements | The AI Unit pool, prepaid per contract year |
| Custom-built AI | BTP capacity units (compute, storage, tokens) | BTP cockpit: usage and cost | The BTP agreement (BTPEA, CPEA or pay-as-you-go) |

An architect's job is to put each planned AI use on exactly one of these meters, with a volume, a rate and an owner, and to keep that mapping current as SAP moves features between them. Everything below is that job made concrete. The BTP meter itself is taught in [BTP commercial models and cost](https://erpfde.com/topics/btp-commercial-models-and-cost/); this topic covers the AI Unit meter and the line between the two.

### How it works

#### The three layers as SAP describes them

As read on 29 November 2026 on [SAP AI plans and pricing](https://www.sap.com/products/artificial-intelligence/pricing.html):

- **Base AI** has two parts. **Joule Base** is the conversational assistant across SAP applications (find, navigate, guide). **Embedded AI** is AI built into applications that works without a separate AI interaction; availability "varies by SAP solution". No AI Units.
- **Premium AI** has three parts. **Joule Agents** run multi-step work and are reached through Joule Assistants, which SAP calls an orchestration layer with no separate charge. **AI Features** are on-demand capabilities such as document grounding, document AI and Joule for Developers, charged per request or per record. **SAP Joule for Consultants** is the one per-user offer.
- **Custom-built AI** is split into a free access layer (SAP AI Agent Hub, development spaces), a free authoring environment within fair-use guidelines, and a paid productive runtime billed on compute, storage, transactions and AI tokens through the SAP BTP Enterprise Agreement. SAP Learning adds CPEA and pay-as-you-go as routes ([SAP Learning](https://learning.sap.com/courses/introducing-joule/understanding-the-commercial-model_a778010e-ba84-4378-ab3f-6c4b31d360eb)).

#### How AI Units are bought and drawn

```mermaid
flowchart LR
  O[Order form<br/>SKU 8019164<br/>blocks of 100] --> P[(AI Unit pool<br/>one per contract year)]
  P --> A[Agents<br/>per action]
  P --> F[AI features<br/>per request or record]
  P --> S[Per-user offers<br/>per seat per month]
  A --> M[SAP for Me<br/>balance, consumption,<br/>statements]
  F --> M
  S --> M
  P -. unused after 12 months .-> X[Expired]
  P -. used beyond the pool .-> E[Excess use<br/>billed at the rate]
```

- **Purchase.** AI Units are sold in blocks of 100 per year, at the standard list price at contract start less negotiated discounts, on 12 to 36 month contracts with automatic renewal ([sap.com AI Units](https://www.sap.com/india/products/artificial-intelligence/ai-units.html); [price list](https://www.sap.com/products/artificial-intelligence/price-list/list.pupm-ai-automation.world.html)). The minimum is 100. SAP Learning notes that AI Units bought under an older SKU must be bought separately under 8019164 ([SAP Learning, Joule for Consultants](https://learning.sap.com/courses/introducing-sap-joule-for-consultants/evaluating-the-commercial-model)).
- **Pool.** One shared pool serves every Premium AI capability. Units are drawn "only when Premium AI actively performs work".
- **Expiry.** Unused units expire after 12 months; SAP for Me's help says "at the end of each contract year" ([SAP for Me help](https://support.sap.com/content/s4m/help/finance/business-ai-tab.html)).
- **Beyond the pool.** Use past the purchased volume is billed "under excess-use (pay-per-use) terms at the applicable AI Unit rate". SAP doesn't state that rate publicly.
- **Access.** The price list's footnotes say rates apply to productive use only, that access to a service needs a service request ticket, and that some services must be used for at least six months from provisioning. The footnotes aren't mapped clearly to rows, so ask which apply to your features.

#### Conversion rates: one pool, many meters

The [AI Features Guide Price List](https://www.sap.com/products/artificial-intelligence/price-list/list.pupm-ai-automation.world.html) converts each feature's business metric into AI Units. A few rows as read on 29 November 2026:

| Feature | Metric | AI Units per unit of metric |
| --- | --- | --- |
| SAP Joule Base | Request | 0.00 |
| SAP Analytics Cloud, data actions | Request | 0.23 |
| Document Grounding | Record | 0.005 |
| SAP Document AI, workspace | User | 100.00 |
| Most listed agents (for example Spare Parts Request Processing Agent) | Action | 0.02 |
| Collection Agent | Action | 0.01 |
| Tender Analysis Agent | Action | 0.025 |
| Digital Service Agent, Shopping Agent | Action | 0.20 |
| SAP Joule for Consultants | Per user per month | 35.00, with up to 22,900 requests |

A footnote says the metric **"Action" replaces the earlier "Request" and "Step"** for agents. That matters because older SAP Learning content, still online, gives per-step rates by agent category: Basic 0.005, Standard 0.01, Advanced 0.025 AI Units, and says custom Joule Studio agents generally count as Basic ([SAP Learning, earlier version](https://learning.sap.com/courses/introducing-joule/understanding-the-commercial-model)). The 27 November article reports Standard and Advanced action rates of 0.02 and 0.05 from SAP's October whitepaper, which couldn't be opened here. Model all of them as rates you confirm, not constants.

#### Per-user offers and pooled requests

Per-seat offers bill each assigned user a fixed number of AI Units a month and give each a request allowance, pooled across the offer. For Joule for Consultants: 35 AI Units per user, 22,900 requests per user, overage at 2 AI Units per 1,000 requests, billed on the **high-watermark** (the most users assigned in the month), users assigned in SAP Cloud Identity Services ([SAP Learning](https://learning.sap.com/courses/introducing-sap-joule-for-consultants/evaluating-the-commercial-model)). The per-user Joule Premium packages work the same way; the price list's Customer Experience package falls from 8.00 AI Units per user up to 100 users to 5.00 from 2,500 users, with up to 5,200 requests. SAP says those packages are retiring.

#### The transition

SAP's pricing page FAQ says the model evolves "later this year": most generative AI capabilities that need AI Units today move into Base AI at no extra cost; the Joule Premium packages for Finance, HCM, Supply Chain, Spend Management and Customer Experience retire; Premium AI is refocused on agents and priced by the actions they perform; features already active continue, after a terms acceptance step. SAP Learning planned a phased rollout during Q3 2026. No SAP page opened for this topic gives an effective date; the secondary report says January 2027. For a design, that means every Premium AI line that is a generative AI feature (not an agent) carries a flag: **may become Base AI**.

#### Where the custom-built line sits

Agents you build outside Joule Studio, for example on SAP AI Core with the generative AI hub, are billed on BTP. The AI Core documentation (2026-05-12) says the generative AI hub is only in the **extended** plan; tokens are converted to capacity units, the BTP billing metric, with per-model factors in SAP Note 3437766, and grounding, content filtering and data masking are metered separately ([SAP AI Core documentation](https://help.sap.com/doc/c31b38b32a5d4e07a4488cb0f8bb55d9/CLOUD/en-US/f17fa8568d0448c685f2a0301061a6ee.pdf)). For Joule Studio agents, SAP's pages point both ways: the pricing page bills the productive runtime through BTPEA, while the older Learning page and the agent builder's product page speak of AI Units. That is the main open question in most AI budgets for 2027.

#### Watching consumption

SAP for Me's Business AI tab shows AI Units available (with units expiring this month and in the next three), monthly consumption (the current month an estimate until the balance statement is final), units consumed by product, a functional usage view of Base and Premium AI by tenant with no billing detail (exportable to CSV or XLS), and monthly balance statements with opening and closing balance and overage ([SAP for Me help](https://support.sap.com/content/s4m/help/finance/business-ai-tab.html)). SAP Learning says consumption by product and feature updates hourly ([SAP Learning](https://learning.sap.com/courses/selling-sap-business-ai/evaluating-how-customers-utilize-ai-features-and-manage-ai-unit-usage)). The pricing page says you can deactivate agents or features there when you approach the purchased volume. For estimating, SAP offers the Business AI Feature Catalog and an AI Unit Estimator in SAP Discovery Center; KBA 3521432 explains the estimator in SAP for Me.

### Build it yourself

You will build Calder's AI Unit plan for 2027: classify each planned AI use onto a meter, size the purchase in blocks of 100, see what the open questions do to the number, then monitor four months of synthetic consumption and forecast the year. The output is the sizing table an account team and a controller can argue about.

**Before you start:** complete [Set up your computer for this course](https://erpfde.com/topics/set-up-your-computer/) and [Set up for Unit 23](https://erpfde.com/topics/set-up-for-unit-23/). This script needs no account and no network.

```mermaid
flowchart LR
  I[--init] --> P[unit23/aiunits/plan.json<br/>7 planned items]
  I --> U[unit23/aiunits/usage_2027.csv<br/>Jan to Apr actuals]
  P --> PL[plan:<br/>meter, AI Units,<br/>blocks to buy]
  P --> MO[monitor:<br/>plan vs actual,<br/>run-out, waste]
  U --> MO
```

> **Note** New words in this walkthrough:
> - **JSON:** a plain text format for structured data; `plan.json` lists Calder's planned AI uses.
> - **CSV:** a plain text table with comma-separated values, like a spreadsheet export; `usage_2027.csv` mimics a monthly consumption export.
> - **Exit code:** the number a program returns when it ends. This script returns 2 when something needs a decision, so a scheduler could alert on it.
> - **Buffer:** extra AI Units bought above the plan, as a share of it (20% here).

#### What you need

- Your course folder `orchestrate-course` with `.venv`.
- About 30 minutes.
- Cost: free. No account, no network, no model calls.

#### Step 1: Open your course folder and turn on the virtual environment

1. Open VS Code, choose **File > Open Folder**, and open `orchestrate-course`.
2. Open a terminal: **Terminal > New Terminal**.
3. If the prompt doesn't start with `(.venv)`, turn it on:

   - **Windows (PowerShell):**

     ```powershell
     .venv\Scripts\Activate.ps1
     ```

   - **macOS / Linux:**

     ```bash
     source .venv/bin/activate
     ```

4. Make sure the `unit23` folder exists. The command does nothing if it is already there.

   - **Windows (PowerShell):**

     ```powershell
     New-Item -ItemType Directory -Force unit23
     ```

   - **macOS / Linux:**

     ```bash
     mkdir -p unit23
     ```

#### Step 2: Create the script

1. In VS Code, create the file `unit23/ai_unit_plan.py`, paste the code below, and save.

```python
"""Plan and monitor Calder's AI Units for 2027 (Orchestrate, Unit 23).

Built-in modules only, no randomness, no network. All values are course values.

  python unit23/ai_unit_plan.py --init           write the sample plan and usage files
  python unit23/ai_unit_plan.py plan             classify each item and size the AI Unit purchase
  python unit23/ai_unit_plan.py plan --custom-meter btpea
  python unit23/ai_unit_plan.py monitor          compare actual use with the plan and forecast the year
"""
import argparse
import csv
import json
import math
import sys
from pathlib import Path

HERE = Path(__file__).resolve().parent / "aiunits"
PLAN = HERE / "plan.json"
USAGE = HERE / "usage_2027.csv"
MONTHS = [f"2027-{m:02d}" for m in range(1, 13)]

SAMPLE_PLAN = {
    "company": "Calder Pumpworks (fictional)",
    "as_of": "2026-11-29",
    "contract_start": "2027-01",
    "price_usd_per_ai_unit": 8.00,
    "buffer": 0.20,
    "block": 100,
    "items": [
        {"id": "F01", "name": "Joule for CP10 clerks and buyers", "layer": "base",
         "meter": "none", "owner": "00100290", "start": "2027-01", "end": "2027-12",
         "users": 60},
        {"id": "F02", "name": "Document grounding: Calder policy library (P1)", "layer": "premium",
         "meter": "record", "owner": "00100292", "start": "2027-01", "end": "2027-12",
         "volume": 1200, "rate": 0.005, "status": "GA"},
        {"id": "F03", "name": "Dispute Creation Agent (SAP-delivered)", "layer": "premium",
         "meter": "action", "owner": "00100241", "start": "2027-02", "end": "2027-12",
         "tasks": 30, "actions_per_task": 6, "rate": 0.02, "status": "EAC"},
        {"id": "F04", "name": "Joule for Consultants: CP20 fit-gap team", "layer": "premium",
         "meter": "seat", "owner": "00100292", "start": "2027-01", "end": "2027-06",
         "seats": 2, "rate": 35.0, "requests_per_seat": 22900, "expected_requests_per_seat": 21000,
         "overage_per_1000": 2.0, "status": "GA"},
        {"id": "F05", "name": "AGT_ORDER_EXC in Joule Studio (custom)", "layer": "custom",
         "meter": "custom", "owner": "00100296", "start": "2027-01", "end": "2027-12",
         "runs": 600, "steps_per_run": 5, "rate_per_step": 0.005, "btp_usd_month": 60.00},
        {"id": "F06", "name": "AGT_SUPPLY_WATCH on BTP (generative AI hub)", "layer": "custom",
         "meter": "btp", "owner": "00100153", "start": "2027-01", "end": "2027-12",
         "btp_usd_month": 35.00},
        {"id": "F07", "name": "Joule Premium for Supply Chain, 25 planners (partner proposal)",
         "layer": "premium", "meter": "package", "owner": "", "start": "2027-01", "end": "2027-12",
         "seats": 25},
    ],
}

# Synthetic SAP for Me-style monthly consumption (AI Units) for January to April 2027.
SAMPLE_USAGE = [
    ("2027-01", "F02", 5.1), ("2027-01", "F04", 70.0), ("2027-01", "F05", 13.2),
    ("2027-02", "F02", 5.4), ("2027-02", "F04", 74.0), ("2027-02", "F03", 2.9), ("2027-02", "F05", 14.8),
    ("2027-03", "F02", 5.9), ("2027-03", "F04", 84.0), ("2027-03", "F03", 4.1), ("2027-03", "F05", 16.0),
    ("2027-04", "F02", 6.2), ("2027-04", "F04", 80.0), ("2027-04", "F03", 4.4), ("2027-04", "F05", 17.5),
]


def init():
    HERE.mkdir(parents=True, exist_ok=True)
    PLAN.write_text(json.dumps(SAMPLE_PLAN, indent=2) + "\n", encoding="utf-8")
    with USAGE.open("w", newline="", encoding="utf-8") as f:
        w = csv.writer(f)
        w.writerow(["month", "item", "ai_units"])
        w.writerows(SAMPLE_USAGE)
    print(f"Wrote {PLAN.name} ({len(SAMPLE_PLAN['items'])} items) and {USAGE.name} ({len(SAMPLE_USAGE)} rows) in {HERE}")


def load_plan():
    if not PLAN.exists():
        sys.exit("No plan file. Run: python unit23/ai_unit_plan.py --init")
    return json.loads(PLAN.read_text(encoding="utf-8"))


def active(item, month):
    return item["start"] <= month <= item["end"]


def monthly_units(item, custom_meter):
    """AI Units one active month of this item consumes, and the verdict for it."""
    m = item["meter"]
    if m == "none":
        return 0.0, "INCLUDED (Base AI: accept SAP's AI terms once)"
    if m == "record":
        return item["volume"] * item["rate"], "AI UNITS"
    if m == "action":
        units = item["tasks"] * item["actions_per_task"] * item["rate"]
        if item.get("status") != "GA":
            return units, f"AI UNITS, CONFIRM ({item['status']}: enrollment needed)"
        return units, "AI UNITS"
    if m == "seat":
        units = item["seats"] * item["rate"]
        pool = item["seats"] * item["requests_per_seat"]
        used = item["seats"] * item["expected_requests_per_seat"]
        if used > pool:
            units += math.ceil((used - pool) / 1000) * item["overage_per_1000"]
        return units, "AI UNITS (per seat, pooled requests)"
    if m == "custom":
        if custom_meter == "aiunits":
            return item["runs"] * item["steps_per_run"] * item["rate_per_step"], "CONFIRM METER (AI Units per step assumed)"
        return 0.0, "CONFIRM METER (BTPEA runtime assumed)"
    if m == "btp":
        return 0.0, "BTP CREDITS (not AI Units)"
    if m == "package":
        return 0.0, "RETIRING (per-user package: don't sign, ask what moves to Base AI)"
    return 0.0, "UNKNOWN METER"


def btp_usd(item, custom_meter):
    if item["meter"] == "btp" or (item["meter"] == "custom" and custom_meter == "btpea"):
        return item.get("btp_usd_month", 0.0)
    return 0.0


def build_plan(plan, custom_meter):
    rows, by_month, btp = [], {mo: 0.0 for mo in MONTHS}, 0.0
    for it in plan["items"]:
        units, verdict = monthly_units(it, custom_meter)
        months = [mo for mo in MONTHS if active(it, mo)]
        for mo in months:
            by_month[mo] += units
        btp += btp_usd(it, custom_meter) * len(months)
        rows.append((it, units, units * len(months), verdict))
    return rows, by_month, btp


def cmd_plan(args):
    plan = load_plan()
    rows, by_month, btp = build_plan(plan, args.custom_meter)
    price, block = plan["price_usd_per_ai_unit"], plan["block"]
    buffer = plan["buffer"] if args.buffer is None else args.buffer
    print(f"AI Unit plan for {plan['company']}, contract year from {plan['contract_start']}, custom meter: {args.custom_meter}")
    print(f"{'ID':<4} {'Item':<56} {'AI U/mo':>8} {'AI U/yr':>8}  Verdict")
    for it, per, year, verdict in rows:
        print(f"{it['id']:<4} {it['name'][:56]:<56} {per:>8.1f} {year:>8.1f}  {verdict}")
    total = sum(by_month.values())
    peak_month = max(by_month, key=by_month.get)
    need = total * (1 + buffer)
    blocks = math.ceil(need / block)
    bare = math.ceil(total / block)
    print()
    print(f"Planned AI Units for the year: {total:.1f} (peak {by_month[peak_month]:.1f} in {peak_month})")
    print(f"With a {buffer:.0%} buffer: {need:.1f} -> buy {blocks} blocks of {block} = {blocks * block} AI Units "
          f"({blocks * block * price:,.2f} USD at {price:.2f})")
    print(f"Without a buffer: {bare} blocks = {bare * block} AI Units, {bare * block - total:.1f} spare")
    print(f"Expected unused at expiry with the buffer: {blocks * block - total:.1f} AI Units "
          f"({(blocks * block - total) * price:,.2f} USD)")
    print(f"Outside AI Units, on BTP credits: {btp:,.2f} USD for the year")
    flags = [r for r in rows if r[3].startswith(("CONFIRM", "AI UNITS, CONFIRM", "RETIRING", "UNKNOWN"))]
    owners = [r for r in rows if not r[0].get("owner")]
    if owners:
        print("No owner: " + ", ".join(r[0]["id"] for r in owners))
    print(f"Items to settle with SAP before ordering: {len(flags)}")
    return 2 if flags or owners else 0


def load_usage():
    if not USAGE.exists():
        sys.exit("No usage file. Run: python unit23/ai_unit_plan.py --init")
    actual = {}
    with USAGE.open(encoding="utf-8") as f:
        for r in csv.DictReader(f):
            actual.setdefault(r["month"], {})[r["item"]] = float(r["ai_units"])
    return actual


def cmd_monitor(args):
    plan = load_plan()
    rows, by_month, _ = build_plan(plan, args.custom_meter)
    per_item = {it["id"]: (it, per) for it, per, _, _ in rows}
    actual = load_usage()
    bought = args.bought
    done = [mo for mo in MONTHS if mo in actual]
    print(f"Monitor: {bought} AI Units bought for {MONTHS[0]} to {MONTHS[-1]}, actuals to {done[-1]}")
    print(f"{'Month':<8} {'Plan':>7} {'Actual':>7} {'Diff':>7}  Note")
    status = 0
    for mo in done:
        a = sum(actual[mo].values())
        p = by_month[mo]
        note = ""
        if p and a > p * (1 + args.tolerance):
            worst = max(actual[mo], key=lambda k: actual[mo][k] - (per_item[k][1] if active(per_item[k][0], mo) else 0))
            note = f"ABOVE PLAN by {a / p - 1:.0%}; biggest gap {worst} {per_item[worst][0]['name'][:34]}"
            status = 2
        print(f"{mo:<8} {p:>7.1f} {a:>7.1f} {a - p:>+7.1f}  {note}")
    used = sum(sum(actual[mo].values()) for mo in done)
    planned_to_date = sum(by_month[mo] for mo in done)
    ratio = used / planned_to_date if planned_to_date else 1.0
    rest = [mo for mo in MONTHS if mo not in actual]
    forecast = used + sum(by_month[mo] for mo in rest) * ratio
    print()
    print(f"Used to date: {used:.1f} of {bought} ({used / bought:.0%}); running at {ratio:.2f} x plan")
    print(f"Forecast for the year at that rate: {forecast:.1f}")
    balance, run_out = bought - used, None
    for mo in rest:
        balance -= by_month[mo] * ratio
        if balance < 0 and run_out is None:
            run_out = mo
    if run_out:
        print(f"RUN-OUT forecast in {run_out}: order more AI Units or switch features off before then")
        status = 2
    else:
        print(f"No run-out forecast; {bought - forecast:.1f} AI Units expected unused at expiry")
        if (bought - forecast) / bought > args.waste:
            print(f"WASTE: more than {args.waste:.0%} of the purchase would expire unused")
            status = 2
    return status


def main():
    ap = argparse.ArgumentParser(description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter)
    ap.add_argument("--init", action="store_true", help="write the sample files")
    ap.add_argument("command", nargs="?", choices=["plan", "monitor"])
    ap.add_argument("--custom-meter", choices=["aiunits", "btpea"], default="aiunits",
                    help="how custom Joule Studio agents are metered (SAP pages differ)")
    ap.add_argument("--buffer", type=float, help="override the plan's buffer, e.g. 0.1")
    ap.add_argument("--bought", type=int, default=900, help="AI Units bought for the contract year")
    ap.add_argument("--tolerance", type=float, default=0.15, help="monthly overrun that raises a flag")
    ap.add_argument("--waste", type=float, default=0.20, help="share of the purchase allowed to expire")
    args = ap.parse_args()
    if args.init:
        init()
        if not args.command:
            return 0
    if args.command == "plan":
        return cmd_plan(args)
    if args.command == "monitor":
        return cmd_monitor(args)
    ap.print_help()
    return 0


if __name__ == "__main__":
    sys.exit(main())
```

#### Step 3: Write the sample files

1. Run:

   ```bash
   python unit23/ai_unit_plan.py --init
   ```

   On macOS or Linux, use `python3` if `python` isn't found.

2. You should see:

   ```text
   Wrote plan.json (7 items) and usage_2027.csv (15 rows) in .../orchestrate-course/unit23/aiunits
   ```

   The path at the end shows your own folder.

The plan holds seven items, each with an owner (a personnel number), a start and end month, a volume and a rate taken from SAP's pages:

| ID | Item | Meter | Volume and rate |
| --- | --- | --- | --- |
| F01 | Joule for 60 `CP10` clerks and buyers | Base AI | none |
| F02 | Document grounding over the policy library (pipeline P1 from [document grounding for Joule](https://erpfde.com/topics/joule-document-grounding/)) | per record | 1,200 records a month at 0.005 |
| F03 | SAP's Dispute Creation Agent, from February | per action | 30 cases × 6 actions at 0.02; early adopter care, so enrollment first |
| F04 | Joule for Consultants for the `CP20` fit-gap team, January to June | per seat | 2 seats at 35, 21,000 requests each against 22,900 |
| F05 | `AGT_ORDER_EXC` in Joule Studio | open | 600 runs × 5 steps at 0.005 per step, or 60.00 USD a month on BTP |
| F06 | `AGT_SUPPLY_WATCH` on BTP with the generative AI hub | BTP | 35.00 USD a month |
| F07 | A partner's Joule Premium for Supply Chain, 25 planners | package | no owner, no rate |

> **Note** The volumes, the BTP amounts and the price of 8.00 USD per AI Unit are course values, not SAP prices. The rates (0.005, 0.02, 35) are as SAP's pages showed them on 29 November 2026; F05's per-step rate comes from the older SAP Learning page.

#### Step 4: Size the purchase

1. Run:

   ```bash
   python unit23/ai_unit_plan.py plan
   ```

2. You should see:

   ```text
   AI Unit plan for Calder Pumpworks (fictional), contract year from 2027-01, custom meter: aiunits
   ID   Item                                                      AI U/mo  AI U/yr  Verdict
   F01  Joule for CP10 clerks and buyers                              0.0      0.0  INCLUDED (Base AI: accept SAP's AI terms once)
   F02  Document grounding: Calder policy library (P1)                6.0     72.0  AI UNITS
   F03  Dispute Creation Agent (SAP-delivered)                        3.6     39.6  AI UNITS, CONFIRM (EAC: enrollment needed)
   F04  Joule for Consultants: CP20 fit-gap team                     70.0    420.0  AI UNITS (per seat, pooled requests)
   F05  AGT_ORDER_EXC in Joule Studio (custom)                       15.0    180.0  CONFIRM METER (AI Units per step assumed)
   F06  AGT_SUPPLY_WATCH on BTP (generative AI hub)                   0.0      0.0  BTP CREDITS (not AI Units)
   F07  Joule Premium for Supply Chain, 25 planners (partner pro      0.0      0.0  RETIRING (per-user package: don't sign, ask what moves to Base AI)

   Planned AI Units for the year: 711.6 (peak 94.6 in 2027-02)
   With a 20% buffer: 853.9 -> buy 9 blocks of 100 = 900 AI Units (7,200.00 USD at 8.00)
   Without a buffer: 8 blocks = 800 AI Units, 88.4 spare
   Expected unused at expiry with the buffer: 188.4 AI Units (1,507.20 USD)
   Outside AI Units, on BTP credits: 420.00 USD for the year
   No owner: F07
   Items to settle with SAP before ordering: 3
   ```

3. The command ends with exit code 2 because three items need SAP's answer and F07 has no owner.

Read it as a controller would. The consultant seats are 420 of 711.6 AI Units. The buffer costs 1,507.20 USD of expected waste; without it, 88.4 units of slack is all that stands between Calder and excess-use billing.

> **Note** Every number here comes from synthetic inputs. It shows the method, not what Calder or any real customer would pay.

#### Step 5: See what the open meter question is worth

1. Run the same plan with Joule Studio agents billed on BTP instead:

   ```bash
   python unit23/ai_unit_plan.py plan --custom-meter btpea
   ```

2. The summary changes to:

   ```text
   Planned AI Units for the year: 531.6 (peak 79.6 in 2027-02)
   With a 20% buffer: 637.9 -> buy 7 blocks of 100 = 700 AI Units (5,600.00 USD at 8.00)
   Without a buffer: 6 blocks = 600 AI Units, 68.4 spare
   Expected unused at expiry with the buffer: 168.4 AI Units (1,347.20 USD)
   Outside AI Units, on BTP credits: 1,140.00 USD for the year
   ```

   One answer from SAP moves two blocks of AI Units and 720 USD of BTP spend between two budgets owned by different people. That is why F05 is the first question on the list.

3. Try a smaller buffer: `python unit23/ai_unit_plan.py plan --buffer 0.1`.

#### Step 6: Monitor the year

Calder bought 900 AI Units for 2027. `usage_2027.csv` holds four months of synthetic consumption in the shape of SAP for Me's consumption by product.

1. Run:

   ```bash
   python unit23/ai_unit_plan.py monitor
   ```

2. You should see:

   ```text
   Monitor: 900 AI Units bought for 2027-01 to 2027-12, actuals to 2027-04
   Month       Plan  Actual    Diff  Note
   2027-01     91.0    88.3    -2.7  
   2027-02     94.6    97.1    +2.5  
   2027-03     94.6   110.0   +15.4  ABOVE PLAN by 16%; biggest gap F04 Joule for Consultants: CP20 fit-ga
   2027-04     94.6   108.1   +13.5  

   Used to date: 403.5 of 900 (45%); running at 1.08 x plan
   Forecast for the year at that rate: 766.1
   No run-out forecast; 133.9 AI Units expected unused at expiry
   ```

   In March the consultants used more requests than their pooled 45,800, so overage at 2 AI Units per 1,000 requests landed on F04. The month is flagged because it ran 16% above plan, past the 15% tolerance.

3. Ask what would have happened with a smaller purchase:

   ```bash
   python unit23/ai_unit_plan.py monitor --bought 700
   ```

   The last line now reads `RUN-OUT forecast in 2027-10: order more AI Units or switch features off before then`.

4. And with a larger one: `python unit23/ai_unit_plan.py monitor --bought 1200` ends with `WASTE: more than 20% of the purchase would expire unused`.

#### Step 7: Save your work in Git

```bash
git add unit23/ai_unit_plan.py unit23/aiunits/plan.json unit23/aiunits/usage_2027.csv
git commit -m "Unit 23: Calder AI Unit plan and monitor for 2027"
```

#### How the code works

| Part of the script | What it does |
| --- | --- |
| `SAMPLE_PLAN`, `SAMPLE_USAGE` | The seven planned items with owner, months, volume and rate, and four months of synthetic consumption |
| `monthly_units` | Turns one item into AI Units a month by its meter (record, action, seat with pooled-request overage, custom, BTP, package) and gives the verdict |
| `btp_usd` | Collects what lands on BTP credits instead of AI Units |
| `build_plan`, `cmd_plan` | Adds the months up, applies the buffer, rounds up to blocks of 100 and shows expected waste; exit code 2 when something is open |
| `cmd_monitor` | Compares each month with the plan, flags months past the tolerance, scales the rest of the year by the run rate and checks run-out and waste |

#### If something goes wrong

| What you see | What it means | What to do |
| --- | --- | --- |
| `python: command not found` or `'python' is not recognized` | Python isn't on your path | Follow [Set up your computer](https://erpfde.com/topics/set-up-your-computer/); on macOS/Linux try `python3` |
| `No plan file. Run: python unit23/ai_unit_plan.py --init` | The sample files don't exist yet | Run step 3 |
| `json.decoder.JSONDecodeError` | A comma or bracket is missing after you edited `plan.json` | Undo the edit, or run `--init` to start again |
| Your numbers differ from this page | You edited the files | Run `--init`; it rewrites both files |
| `.venv\Scripts\Activate.ps1 cannot be loaded` | PowerShell blocks scripts | Run `Set-ExecutionPolicy -Scope CurrentUser RemoteSigned` once, then try again |
| `ModuleNotFoundError` | You aren't running this script | It uses only built-in modules; check the file name |
| A network or proxy error | Not from this script | It makes no network calls; check which command you ran |

### The SAP way

This is a **sketch**: the steps need an SAP for Me account with the Finance and Legal area, a contract with AI Units, and for the BTP line a global account, which Units 21 and 23 describe. As read on 29 November 2026:

1. **Estimate.** Open the Business AI Feature Catalog and the AI Unit Estimator in SAP Discovery Center; SAP Learning says the estimator works without a login, with more after login, and can lead to a quote request ([SAP Learning](https://learning.sap.com/courses/selling-sap-business-ai/evaluating-how-customers-utilize-ai-features-and-manage-ai-unit-usage)). SAP for Me also has an AI Unit Calculator tile. Check every rate against the [price list](https://www.sap.com/products/artificial-intelligence/price-list/list.pupm-ai-automation.world.html).
2. **Order.** AI Units on SKU 8019164 through your account executive or the SAP Store. Without AI Units, the terms acceptance for Base AI is SKU 8019544 at 0 EUR ([SAP Learning](https://learning.sap.com/courses/introducing-joule/understanding-the-commercial-model_a778010e-ba84-4378-ab3f-6c4b31d360eb)).
3. **Activate.** Features and per-seat offers in SAP for Me; SAP Learning notes package activation currently goes through a support ticket. Assign seats to users in SAP Cloud Identity Services.
4. **Watch.** SAP for Me's Business AI tab: balance and expiry, monthly consumption, consumption by product, functional usage export, balance statements ([SAP for Me help](https://support.sap.com/content/s4m/help/finance/business-ai-tab.html)). Deactivate a feature there if consumption runs away.
5. **The BTP side.** Generative AI hub and custom runtime consumption in the BTP cockpit's Usage view, exported by service ([SAP AI Core documentation](https://help.sap.com/doc/c31b38b32a5d4e07a4488cb0f8bb55d9/CLOUD/en-US/f17fa8568d0448c685f2a0301061a6ee.pdf)), with budgets as in [BTP commercial models and cost](https://erpfde.com/topics/btp-commercial-models-and-cost/).

No SAP page opened for this topic describes an API for AI Unit consumption, or alerts with thresholds you set; SAP for Me says it "consolidates alerts" without detail. Plan for a monthly export and a person who reads it until SAP shows more.

### Build vs. SAP

| Need | SAP's tool | Build your own | Use which |
| --- | --- | --- | --- |
| Rates per feature | Price list, Feature Catalog | Copy rates into a plan file | SAP's list as the source; your file records the rate you confirmed and the date |
| A first estimate | AI Unit Estimator | A plan like `ai_unit_plan.py` | Estimator for SAP's features; your plan for the whole picture, including BTP and open questions |
| Balance and consumption | SAP for Me | Nothing to build | SAP for Me; it is the billing record |
| Month-on-month plan vs actual | Monthly consumption tile | A monitor over the export | Your monitor, because the plan lives with you |
| Stopping a runaway feature | Deactivate in SAP for Me | Step caps and kill switches in your agents | Both: caps prevent, deactivation stops ([operating an agent fleet](https://erpfde.com/topics/operating-an-agent-fleet/)) |
| BTP-side AI cost | BTP cockpit usage, budgets | Nothing to build | BTP's tools |

### Architecture view

**Where it sits.** The AI Unit pool belongs to the SAP contract, not to a system. Consumption is reported by product and tenant into SAP for Me; BTP consumption into the global account.

```mermaid
flowchart TB
  subgraph Contract[SAP contract]
    POOL[(AI Unit pool<br/>contract year)]
  end
  subgraph Cloud[SAP cloud products]
    S4[S/4HANA Cloud<br/>CP10] -->|agent actions,<br/>features| POOL
    J[Joule<br/>Base AI] -.->|no AI Units| S4
    DG[Document grounding] --> POOL
    JFC[Joule for Consultants<br/>seats via IAS] --> POOL
  end
  subgraph BTP[BTP global account]
    JS[Joule Studio agents] -->|meter to confirm| POOL
    JS -->|or runtime| CU[(Capacity units)]
    AIC[AI Core extended<br/>generative AI hub] --> CU
  end
  POOL --> S4M[SAP for Me<br/>Business AI tab]
  CU --> BC[BTP cockpit<br/>usage and budgets]
```

**Non-functional requirements.**

| Requirement | Typical target | What breaks if it's missed |
| --- | --- | --- |
| Cost visibility | Monthly plan vs actual per item, reviewed within 5 working days of the balance statement | A runaway agent is found at renewal |
| Headroom | Forecast stays below the purchase with at least one month's use spare | Excess-use billing or features switched off mid-year |
| Waste | No more than 20% of a purchase expires (course rule) | Money lost at the end of the contract year |
| Attribution | Every AI Unit line maps to one owner and one cost object | Nobody can be asked why consumption rose |
| Reaction time | A feature can be switched off the same day | An agent loop drains the pool over a weekend |

**Integration and identity.** Seats are assigned to users in SAP Cloud Identity Services, so the identity tenant is also a cost control: a leaver who keeps a seat keeps costing the high-watermark. Consumption leaves SAP for Me as a CSV or XLS export and PDF statements; the BTP side has the usage views and APIs described in [BTP commercial models and cost](https://erpfde.com/topics/btp-commercial-models-and-cost/). Agents' own traces, with steps per run, come from the platforms that run them, as in [operating an agent fleet](https://erpfde.com/topics/operating-an-agent-fleet/). Keep the agent ID in all three so a line in SAP for Me can be traced to runs.

**The decision to record** (short ADR form from [writing a solution design doc](https://erpfde.com/topics/writing-a-solution-design-doc/)):

- **Context.** Calder buys its first AI Units for 2027. SAP's model is in transition; the meter for Joule Studio agents and the effective date are unconfirmed.
- **Options.** A: buy 900 AI Units now on a 12-month contract (plan plus 20%). B: buy 800 now and add blocks after the first quarter's statements. C: wait for SAP's written answers before buying anything.
- **Decision.** B. Buy 8 blocks on a 12-month contract, ask in writing for F05's meter, F03's enrollment and the transition date, and review after the March balance statement.
- **Consequences.** Less waste if the use doesn't arrive; a second order is likely by April; the monitor and an owner for the pool are needed from January. Option C would delay the consultant seats, which the `CP20` rollout needs from January.

**What a design review will ask.**

1. Which meter does each planned item sit on, and who confirmed the rate and when?
2. What happens on the day the pool runs out: which features stop, who decides?
3. Which items are generative AI features that may move to Base AI, and what does that do to the purchase?
4. Who owns the pool, and how does a line in SAP for Me trace back to an agent and an owner?
5. Why a 12-month contract and not longer, given automatic renewal?

### Production concerns

- **Authorizations.** Who may activate a premium feature in SAP for Me is a spending authority. Keep it to the pool owner and a deputy, and record each activation with its plan item.
- **Seats follow identity.** Remove seats when people leave or change roles; the high-watermark bills the month's maximum.
- **Evaluation and cost together.** An agent change that adds two actions per case is a 40% cost rise at five actions. Test changes for actions per case as well as answer quality.
- **Runaway protection.** Step caps in agents, alerts on daily use from your own traces, and the deactivation path in SAP for Me. Don't rely on the monthly statement to find a loop.
- **Renewal.** Contracts renew automatically. Put the renewal date in the calendar 90 days ahead, with the monitor's forecast and the open questions.
- **Clean core.** Nothing here touches the core. The risk is commercial: designs built around a per-user package or a rate that changes at the transition.

### Where AI fits

The subject is AI's own bill, so AI changes it directly. Agents make cost depend on behavior: a prompt change, a new tool or a loop changes AI Unit consumption without anyone signing anything. The control is design-time measurement of actions per case and runtime caps. A model can help read consumption exports and draft the monthly commentary, but the purchase, the deactivation and the renewal stay with a person who owns the budget. For the agent side of the meter, see [SAP's agent catalogue for architects](https://erpfde.com/topics/sap-agent-catalogue-for-architects/); for token prices behind the BTP line, [model tiers and prices in late 2026](https://erpfde.com/topics/model-tiers-and-prices-late-2026/).

### Pitfalls

- **One rate for all agents.** Most are 0.02 per action, but the price list has rates from 0.005 to 0.20.
- **Sizing from users.** Agents are metered by actions; users matter only for per-seat offers.
- **A buffer with no monitor.** The buffer hides overruns until the pool is gone or turns into waste at expiry.
- **The free runtime as the baseline.** Custom agents that ran free in 2026 have no cost history; measure steps now.
- **Signing a retiring package.** SAP says per-user Joule Premium packages are retiring.
- **Two budgets, one agent.** If nobody settles the Joule Studio meter, the agent is either in both budgets or in neither.
- **Treating a trade article as SAP's terms.** Secondary reports are useful leads; the contract is the source.

### Exercise

Calder's programme lead wants a third Joule for Consultants seat for consultant `00100325` from April to June, for the mock loads. Add it to the plan and decide whether it pays.

1. Run `python unit23/ai_unit_plan.py --init` to start from clean files.
2. Open `unit23/aiunits/plan.json`. Find the line with `"name": "Joule Premium for Supply Chain, 25 planners (partner proposal)",` and the `}` that closes that item, a few lines below. Put a comma after that `}` and paste this item after it:

   ```json
       {
         "id": "F08",
         "name": "Joule for Consultants: third seat (00100325)",
         "layer": "premium",
         "meter": "seat",
         "owner": "00100292",
         "start": "2027-04",
         "end": "2027-06",
         "seats": 1,
         "rate": 35.0,
         "requests_per_seat": 22900,
         "expected_requests_per_seat": 21000,
         "overage_per_1000": 2.0,
         "status": "GA"
       }
   ```

3. Save, and run `python unit23/ai_unit_plan.py plan`. Don't run `--init` again, or it overwrites your edit.
4. Work out the seats' cost per month from April to June: 3 seats × 35 AI Units × 8.00 USD.
5. Open the `decision.md` you wrote in [Joule for developers and consultants](https://erpfde.com/topics/joule-for-developers-and-consultants/) (or start a new `unit23/aiunits/decision.md`) and add one sentence: is the consultants' monthly cost below the break-even of 5,315.62 USD a month that the pilot measured, and what would you ask SAP before adding the seat?

**Done when** the plan prints `Planned AI Units for the year: 816.6 (peak 129.6 in 2027-04)` and `With a 20% buffer: 979.9 -> buy 10 blocks of 100 = 1000 AI Units (8,000.00 USD at 8.00)`, and your sentence (840 USD a month against 5,315.62) is in the decision file. Keep the plan: Unit 32's capstone asks for an operating model with a cost line, and this is it.

### Check yourself

1. Which statement matches how SAP's pages describe the three layers on 29 November 2026?
   - A. Base AI needs AI Units, Premium AI is per user, custom AI is free at runtime
   - B. Base AI needs none, Premium AI uses AI Units, custom runtime uses BTP
   - C. All three layers draw from one AI Unit pool at different conversion rates
   - D. Base AI and Premium AI are both billed through the BTP Enterprise Agreement

   Answer: B. The pricing page includes Base AI at no extra cost, charges Premium AI in AI Units, and bills the productive runtime of custom-built AI through the SAP BTP Enterprise Agreement.

2. In ai_unit_plan.py, what does monthly_units return for the Joule for Consultants item when requests stay under the pooled allowance?
   - A. Seats times 22,900 requests times 0.02 AI Units per request
   - B. Seats times 35 AI Units, with no overage added
   - C. Seats times 35 AI Units, plus 2 AI Units for every seat
   - D. Zero, because per-seat offers are paid from BTP credits

   Answer: B. For the seat meter the code multiplies seats by the rate of 35 and adds overage only when expected requests exceed seats times 22,900. At 21,000 expected requests per seat there is no overage.

3. Why does the plan show 711.6 AI Units with one meter setting and 531.6 with the other?
   - A. The btpea setting applies the 20% buffer before it rounds to blocks
   - B. The btpea setting drops the consultant seats because they run on BTP
   - C. The custom agent's 180 AI Units move onto BTP credits
   - D. The btpea setting uses SAP's newer 0.02 rate for the custom agent's steps

   Answer: C. With --custom-meter btpea, F05 draws no AI Units and its 60.00 USD a month lands on BTP. That is 180 AI Units less and 720 USD more on BTP, which is why the meter question comes first.

4. The price list says the metric "Action" replaces "Request" and "Step" for agents, while older SAP Learning gives per-step rates by category. How should a plan treat agent rates?
   - A. Use the older per-step categories, since Learning pages explain the model
   - B. Use 0.02 for every agent, since the pricing page gives one figure
   - C. Leave agents out until SAP publishes a single rate for all of them
   - D. Record each agent's rate from the price list with a date, and confirm it

   Answer: D. The price list shows different action rates per agent, from 0.005 to 0.20, and older Learning content still shows step categories. A plan records the rate it used and when, and treats it as something to confirm.

5. What is the monitor's "ABOVE PLAN" flag in March telling the pool owner?
   - A. The pool has run out and features will be switched off in April
   - B. March ran 16% above plan, mostly from consultant overage
   - C. The balance statement for March is final and the overage is billed in cash
   - D. The Dispute Creation Agent took more actions than its enrollment allows

   Answer: B. The monitor compares each month with the plan and names the item with the biggest gap. In March, F04's requests exceeded the pooled allowance, so overage at 2 AI Units per 1,000 requests pushed the month past the tolerance.

6. A weekend loop in a custom agent could drain AI Units. Which control set fits SAP's model as described?
   - A. Wait for the monthly balance statement, then ask SAP to reverse the charge
   - B. Buy a larger buffer each year so that a loop can never empty the pool
   - C. Step caps and alerts from your traces, plus deactivation
   - D. Move every agent to per-user packages so that consumption becomes fixed

   Answer: C. SAP for Me shows consumption and lets you deactivate features, but its pages describe no threshold alerts you set. Caps and your own trace alerts prevent and catch a loop; deactivation stops it.

7. You're asked to sign a 36-month AI Unit contract in December 2026. What does the topic suggest you settle first?
   - A. The cash price per AI Unit only, since everything else is on public pages
   - B. Nothing: contracts renew automatically, so the length makes no difference
   - C. Which BTP region the AI Units are stored in, since that sets the price
   - D. The transition date, the Joule Studio meter and each feature's status and rate

   Answer: D. The model is changing, the meter for Joule Studio agents differs between SAP pages, and rates and statuses vary by feature. A long contract locks in assumptions, so those answers should be in writing before signing.

## Sources

- [SAP AI plans and pricing (sap.com)](https://www.sap.com/products/artificial-intelligence/pricing.html): read 2026-11-29, no page date; three layers: Base AI included in every cloud subscription with no AI Units (Joule Base, embedded AI), Premium AI with AI Units (Joule Agents through Joule Assistants, AI Features such as document grounding, document AI and Joule for Developers, SAP Joule for Consultants per user), custom-built AI free to design and paid at runtime through the SAP BTP Enterprise Agreement; SAP-delivered agents in 2026 at 0.02 AI Units per agent action; no separate charge for Joule Assistants; Joule for Consultants 35 AI Units per user per month with 22,900 pooled requests, overage 2 AI Units per 1,000; AI Units bought annually via SKU 8019164 into one pool, expire after 12 months, excess use billed at the applicable rate; SAP for Me to track and to deactivate agents or features; FAQ: the model is 'evolving later this year', most generative AI features move into Base AI, the Joule Premium packages for Finance, HCM, Supply Chain, Spend Management and Customer Experience retire, Premium AI refocuses on agents, a terms acceptance step; custom agents in a productive Joule Studio runtime free through the end of 2026
- [AI Features Guide Price List (sap.com)](https://www.sap.com/products/artificial-intelligence/price-list/list.pupm-ai-automation.world.html): read 2026-11-29, no version date; converts business metrics into AI Units, priced in blocks of 100 at the standard list price at contract start less negotiated discount; still lists the Joule Premium packages (Customer Experience per user per month 8.00 up to 100 users falling to 5.00 from 2,500, up to 5,200 requests) and Joule for Consultants 35.00 with up to 22,900 requests; examples: SAP Joule Base 0.00 per request, SAP Analytics Cloud data actions 0.23 per request, Document Grounding 0.005 per record, SAP Document AI workspace 100.00 per user; agents per action mostly 0.02, Collection Agent 0.01, Tender Analysis Agent 0.025, Utilities Customer Self-Service Agent 0.005, Digital Service Agent and Shopping Agent 0.20; footnote: 'Action' replaces the earlier metrics 'Request' and 'Step'; footnotes on productive use only, a six-month minimum from provisioning and a service request ticket for access
- [Simplify AI consumption with a unified AI currency (sap.com, AI Units)](https://www.sap.com/india/products/artificial-intelligence/ai-units.html): read 2026-11-29; AI Units as one currency across SAP cloud products, conversion rates per request, user, record or other metric, an AI unit estimator; product data: blocks of 100 capacity units per year, contract 12 to 36 months, automatic renewal; a separate test, demo and development product for partners; no price shown
- [Understanding the Commercial Model: Joule Base (SAP Learning, Introducing Joule)](https://learning.sap.com/courses/introducing-joule/understanding-the-commercial-model_a778010e-ba84-4378-ab3f-6c4b31d360eb): read 2026-11-29, no page date; Joule Base needs a qualifying cloud subscription and a one-time acceptance of SAP's AI terms by adding SKU 8019544 (0 EUR), skipped by customers who already hold AI Units (SKU 8019164); SAP planned the new Premium AI model in a phased rollout during Q3 2026; 'every agent action consumes 0.02 AI Units' in 2026; per-user packages phased out, their generative AI features move to Base with updated terms; custom agent runtime billed on compute, storage, transactions and AI tokens through BTPEA, CPEA or pay-as-you-go, free through the end of 2026 under a promotion; SAP Business AI Feature Catalog in SAP Discovery Center
- [Understanding the Commercial Model (SAP Learning, Introducing Joule, earlier version)](https://learning.sap.com/courses/introducing-joule/understanding-the-commercial-model): read 2026-11-29, no page date; describes the per-user packages as current with a fair-use request limit, high-watermark billing on assigned users, overage 2 AI Units per 1,000 requests; agent steps: within packages Basic 5, Standard 10, Advanced 25 requests per step; consumption-based Basic 0.005, Standard 0.01, Advanced 0.025 AI Units per step, custom agents generally Basic; packages activated in SAP for Me, users assigned in SAP Cloud Identity Services; tools: Business AI Feature Catalog, AI Unit Estimator, AI Features Guide Price List
- [Evaluating the Commercial Model (SAP Learning, Introducing SAP Joule for Consultants)](https://learning.sap.com/courses/introducing-sap-joule-for-consultants/evaluating-the-commercial-model): read 2026-11-29; 35 AI Units per assigned user per month, 22,900 requests per user per month pooled, overage 2 AI Units per 1,000 requests, high-watermark billing, users added or removed at any time; AI Units bought annually with SKU 8019164 (older AI Units must be bought again under it), minimum 100, pooled, expire after 12 months; activation in SAP for Me
- [Evaluating How Customers Utilize AI Features and Manage AI Unit Usage (SAP Learning, Selling SAP Business AI)](https://learning.sap.com/courses/selling-sap-business-ai/evaluating-how-customers-utilize-ai-features-and-manage-ai-unit-usage): read 2026-11-29; AI Feature Catalog and AI Unit Estimator (usable without login); SAP for Me shows available and consumed units, units expiring soon, seat allocation, monthly consumption with a current-month estimate, units by product and feature updated hourly, balance statements as PDF; consumption-based capabilities deduct on use, per-user packages when users are assigned; overage through additional AI Units; package activation currently by support ticket
- [Business AI tab (SAP for Me help)](https://support.sap.com/content/s4m/help/finance/business-ai-tab.html): read 2026-11-29, no page date; tiles AI Units Available (expiring this month and in the next three months; units expire at the end of each contract year), Monthly Consumption (current month estimated until the balance statement is final), AI Unit Calculator, AI Units Consumed by Product, Functional Usage of AI Features (Base and Premium raw usage by tenant and AI type, no billing details, CSV or XLS export), Monthly Balance Statements (opening and closing balance, overage, PDF); AI Estimator FAQs in KBA 3521354 and 3521432
- [SAP AI Core documentation, section 1.1 Metering and Pricing (help.sap.com PDF, 2026-05-12)](https://help.sap.com/doc/c31b38b32a5d4e07a4488cb0f8bb55d9/CLOUD/en-US/f17fa8568d0448c685f2a0301061a6ee.pdf): read 2026-11-29; free, standard and extended plans; the generative AI hub only in the extended plan; tokens converted to GenAI tokens and then to capacity units, the SAP BTP billing metric; per-model conversion in SAP Note 3437766; grounding, content filtering, data masking and inference observability metered separately; usage exported from the BTP cockpit's Usage view; costs estimated with the Discovery Center estimator
- [Your SAP Joule Bill Depends on Agent Actions and Your Quote (The D*AI*LY BRIEF, Rajesh Beri, 27 November 2026)](https://www.beri.net/article/sap-ai-units-pricing-joule-agents-per-action-base-ai-premium-ai-2026): read 2026-11-29; secondary source; reports that SAP's commercial model whitepaper (version 10.2026) retires the per-user Joule Premium packages and moves most generative AI features into Base AI in January 2027, and gives 0.02 AI Units per Standard and 0.05 per Advanced agent action; the whitepaper itself refused automated fetches in this run, so these points are unconfirmed on an SAP page
