Orchestrate

Report an issue

Something wrong, out of date or unclear? Tell us. Corrections are prioritized over new topics. You don't need to sign in.

0 / 2000

Don't include personal or confidential company details. Reports are reviewed with AI assistance.

Pricing custom agents after the free Joule Studio runtime

The free Joule Studio runtime ends with December 2026. How custom agents are metered after it, and how to log agent steps now to predict 2027 costs.

Updated Nov 10, 2026Foundational 8 minDeep 35 min
Foundational layer · 8 min read

What changed, and when

On 27 October 2026, at SAP TechEd, SAP said that deploying and running custom agents on the SAP-managed Joule Studio runtime stays free through December 2026. SAP calls it a time-bound promotion for "select customers" (SAP News, 27 October 2026). The same release says the design-time tools for building and testing agents stay free under fair-use limits.

From January 2027, custom agents that run in production need a budget. As of 10 November 2026, SAP had not published a separate post-promotion price for the Joule Studio runtime on any page we could open. What SAP has published is the meter: custom agents built in Joule Studio are charged in AI Units, per agent step (SAP Learning).

This page explains that meter, what is still unknown, and what to ask before your free period ends. For what Joule Studio is, start with Joule and Joule Studio. For everything else announced at TechEd, see What SAP TechEd 2026 changed for AI builders.

Why it matters to the business

A pilot that ran free in November can arrive on the bill in January. Three things make that risky.

  • Agents are metered by the work they do. A simple request may take a few steps; a hard one many more. SAP says typical tasks take about 2 to 20 steps (SAP Learning). Two agents with the same number of users can cost very different amounts.
  • AI Units are prepaid and expire. SAP's pricing page says AI Units are bought annually and expire after 12 months if not used (sap.com pricing). Buy too few and you need an overage request; buy too many and they lapse.
  • The free period hides the numbers you need. If nobody counts steps while the runtime is free, the first real number arrives with the first invoice.

Take the fictional Calder Pumpworks, a pump maker this course uses as its running company. Its customer service team pilots an order-exception agent. The agent explains why sales orders are blocked: a credit block, missing payment terms, a missing price. If it handles 600 blocked orders a month at about 7 steps each, that is about 4,200 steps. At SAP's Basic rate of 0.005 AI Units per step, that is about 21 AI Units a month.

How SAP does it

As read on SAP pages on 10 November 2026:

  • Custom agents in Joule Studio use AI Units. SAP Learning says customer-built agents in Joule Studio, including SAP agents a customer extends, are metered with AI Units (SAP Learning). The agent builder's product page says "AI Units are currently required" (sap.com).
  • The unit of work is a step. A step is any action the agent takes while solving a request: planning, a tool call, a reasoning cycle.
  • Three agent categories. Basic, Standard and Advanced agents cost 0.005, 0.01 and 0.025 AI Units per step when billed by consumption. SAP says custom Joule Studio agents generally count as Basic today (SAP Learning).
  • SAP's own agents are often in packages. SAP-built agents come in per-user-per-month Joule Premium packages, where each step draws 5, 10 or 25 requests from a shared monthly allowance. Requests above the allowance cost 2 AI Units per 1,000.
  • Agents you build yourself on SAP BTP (outside Joule Studio, for example with the generative AI hub) are charged through BTP credits instead, metered on tokens.
  • Tracking. AI Unit usage shows in SAP for Me, by product and feature, updated hourly (SAP Learning). SAP also announced new Joule Studio controls for "model usage and spend", without a release status.

What is known and what to budget

Question What SAP has published (10 Nov 2026) What to do
Is my runtime free until January? Only for "select customers", through December 2026 Ask your account team if you are one, and the exact end date
What meters a custom agent? AI Units per agent step Count steps per request in your pilot now
How much per step? Basic 0.005 AI Units; custom agents generally Basic Budget at Basic, and test Standard as a sensitivity
How much is an AI Unit? Not shown publicly; blocks of 100, 1 to 3 year contracts Get your price per unit from the contract
Does runtime time cost extra? No separate runtime rate found Log runtime minutes anyway; ask the question
Is design-time free? Yes, under fair-use limits Ask what the limits are
Do unused units carry over? No: they expire after 12 months Size the first purchase from measured steps, not guesses

The decision for a leader is simple: don't move an agent into production in January without a measured steps-per-request figure. With that number, the budget is a multiplication. Without it, it is a guess.

Questions to ask

Ask your SAP account team:

  1. Are we one of the "select customers" in the runtime promotion? On which date does it end, and in which time zone?
  2. From January 2027, which meter applies to our custom Joule Studio agents: AI Units per step, BTP credits, or both?
  3. Which category (Basic, Standard, Advanced) will each of our agents fall into, and who decides?
  4. Is there any separate charge for runtime hours, memory or storage on the Joule Studio runtime?
  5. What are the fair-use limits on design-time tooling?
  6. What is our price per AI Unit, and what happens if we run out mid-year?

Ask your own team:

  1. How many steps does each agent take per request, on average and in the worst case?
  2. What is the step cap on each agent, and what happens when it is hit?
  3. Who watches AI Unit consumption in SAP for Me, and who is alerted?

Common misconceptions

  • "The runtime is free, so our agents are free." The promotion is time-bound and for select customers. After December 2026, custom agents need AI Units.
  • "Agents are priced per user, like Joule." SAP's packaged agents can be. Custom Joule Studio agents are metered per step.
  • "One request is one charge." A single request can take many steps. The cost follows the work.
  • "The Advanced category is always the expensive choice." It costs more per step, but SAP notes it may need fewer steps for the same task. Measure both.
  • "We can buy units later if we need them." You can request overage, but units bought annually expire after 12 months. Sizing still matters.

Key terms

All course terms, A to Z, in the glossary

  • Joule Studio runtime: the SAP-managed environment where custom Joule Studio agents are deployed and run.
  • Agent step: any action an agent takes while solving a request, such as planning, a tool call or a reasoning cycle. SAP's meter for agents.
  • AI Units: SAP's prepaid currency for premium AI, bought annually and used across SAP cloud products.
  • Agent category: Basic, Standard or Advanced; sets how many AI Units or requests each step consumes.
  • Fair-use limit: a cap on free or included usage, such as the monthly requests in a per-user package.
  • Overage: usage above an allowance; for Joule Premium packages, 2 AI Units per 1,000 requests.
  • SAP for Me: SAP's customer portal, where AI Unit balance and consumption are tracked.

Check yourself

Pick one answer for each question. The explanation appears after you choose.

1What did SAP announce on 27 October 2026 about the Joule Studio runtime?

Answer: D. SAP called it a time-bound promotion for "select customers", ending with December 2026. It is not open to everyone, and it has an end date.

2How are custom agents built in Joule Studio metered, according to SAP Learning?

Answer: A. SAP Learning says customer-built Joule Studio agents are consumption-based, metered in AI Units per step. Per-user packages apply to SAP's own packaged agents, not to custom ones.

3Calder's pilot agent ran free in November. What should the team have before January?

Answer: C. The meter is per step, so the budget is steps per request times requests times the per-step rate. Without the measured steps, the budget is a guess, and AI Units bought later still expire after 12 months.

4Why can two agents with the same number of users cost very different amounts?

Answer: D. Custom agents are metered per step, and a hard request can take many more steps than a simple one. SAP says typical tasks take about 2 to 20 steps.

5What is the risk of buying a large block of AI Units "just in case"?

Answer: C. SAP's pricing page says AI Units are bought annually and expire after 12 months if unused. Sizing from measured steps avoids paying for units that lapse.

6Which question belongs on the list for your SAP account team?

Answer: A. No separate runtime rate was found on SAP's public pages, so it is a contract question. Prompt wording and model choice are for your own team.
Deep layer · 35 min read

Mental model: the bill counts steps, not users or requests

A custom agent's bill is a product of three numbers:

AI Units per month = requests per month x steps per request x AI Units per step

Two of the three are yours. You know (or can estimate) how many requests arrive, and you can measure how many steps each one takes. Only the third, the factor per step, comes from SAP, and SAP has published it: 0.005 AI Units per step for a Basic agent, 0.01 for Standard and 0.025 for Advanced, with custom Joule Studio agents generally counted as Basic (SAP Learning, read 10 November 2026).

So the free period is not a reason to wait. It is the cheapest time to measure steps per request, because measuring costs nothing. The one number still missing, the price of an AI Unit, is a contract value you multiply in at the end.

How it works

What counts as a step

SAP describes a step as any action the agent takes while solving a request: planning the next move, calling a tool, running a reasoning cycle (SAP Learning). SAP's price list words it as an agent action "invoked and processed within the agent run" (AI Features Guide Price List).

That maps onto the agent loop from Agents from first principles. One request runs like this:

sequenceDiagram
  participant U as User
  participant A as Agent
  participant M as Model
  participant T as SAP tool
  U->>A: Why is order 1000002 blocked?
  A->>M: plan (step 1)
  A->>T: sales_order_get (step 2)
  A->>M: plan (step 3)
  A->>T: credit_exposure_get (step 4)
  A->>M: plan (step 5)
  A->>T: open_items_get (step 6)
  A->>M: plan (step 7)
  A->>M: answer (step 8)
  A-->>U: Credit block: exposure above limit

Eight steps for one question. A question that needs one lookup takes four. A loop bug that calls the same tool again and again takes as many as the agent's step cap allows.

Three ways the same agent can be billed

How the agent is built Meter Where SAP says so
Custom agent in Joule Studio (or an SAP agent you extend there) AI Units per step; generally Basic, 0.005 per step SAP Learning, both commercial-model lessons
SAP-built agent inside a Joule Premium package Requests per step from a per-user monthly allowance (Basic 5, Standard 10, Advanced 25); overage 2 AI Units per 1,000 requests SAP Learning; AI Features Guide Price List
Your own agent on SAP BTP, calling models through the generative AI hub BTP credits: tokens converted to capacity units, plus grounding and other services SAP Learning; see Token economics for the arithmetic

The step factor is a flat rate per step. It does not change with the length of the prompt. The BTP route is the opposite: cost follows tokens, so a long conversation history costs more even at the same step count. An agent that is cheap on one meter is not automatically cheap on the other.

AI Units as a budget

AI Units behave like a prepaid account, not like a utility bill:

  • Bought annually, in blocks of 100, on contracts of 1 to 3 years (sap.com, AI Units).
  • Drawn from one central pool across SAP products, so Calder's order-exception agent competes with any other premium AI the company uses.
  • Expire after 12 months if not used (sap.com pricing).
  • Tracked in SAP for Me, with a monthly graph, a current-month estimate and an hourly per-feature breakdown; more units come through an overage request (SAP Learning).

So the planning question is not "what is the price?" but "how many units, bought when?". Measured steps answer the first half.

What runtime time costs

The agent also occupies the runtime: seconds of model latency and tool calls per request. As of 10 November 2026, the pricing pages read for this topic list no per-minute or per-hour rate for the Joule Studio runtime. The 27 October release mentions new controls for "model usage and spend". It is safer to log runtime minutes now than to assume they will never matter.

Build it yourself: meter your agents before January

You will build radar/agent_meter.py. It runs two made-up Calder agents through ten work items, logs every run (steps, tool calls, tokens, seconds) to a file, and turns the log into a monthly projection in AI Units. It also flags a looping agent. The Meter class inside it is what you later wrap around your own agent.

Before you start: complete Set up your computer for this course. It creates your orchestrate-course folder with .venv. The script uses only built-in Python, so there is nothing to install.

flowchart LR
  W[Made-up Calder<br/>work items] --> A[Sample agents]
  A --> M[Meter: steps,<br/>tokens, seconds]
  M --> L[agent_runs.jsonl]
  L --> R[Report: per run,<br/>per month, checks]
  P[Your price per<br/>AI Unit] -.-> R

What you need

  • Your course folder with .venv.
  • About 30 minutes.
  • Cost: free. No account and no model call. Everything runs on made-up data.

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):

      .venv\Scripts\Activate.ps1
    • macOS / Linux:

      source .venv/bin/activate
  4. Make sure the radar folder exists (an earlier radar topic may have created it):

    • Windows (PowerShell):

      New-Item -ItemType Directory -Force radar
    • macOS / Linux:

      mkdir -p radar

Run every command from the course folder, not from inside radar.

Step 2: Save the script

  1. In VS Code, right-click the radar folder, choose New File, and name it agent_meter.py.
  2. Paste the code below and save.
"""Meter custom agents now, so the bill after the free period is predictable.

Commands:
  python radar/agent_meter.py simulate --sample        run two made-up Calder agents and log every run
  python radar/agent_meter.py simulate --sample --bug  same, with a looping agent that hits its step cap
  python radar/agent_meter.py report                   per-agent averages and a monthly projection
  python radar/agent_meter.py report --price-per-unit 5.00   add money, using YOUR contract's price

All data is made up (Calder Pumpworks is a fictional company). The AI Unit
factors per step come from SAP Learning (read 2026-11-10). The capacity-unit
factors are the FICTITIOUS example values on SAP's metering page; replace them
with your model's rates from SAP Note 3437766 before using the numbers.
"""
import argparse
import json
import random
import sys
import time
from pathlib import Path

LOG = Path("radar/agent_runs.jsonl")

# AI Units per agent step for consumption-based billing, per SAP Learning
# ("Understanding the Commercial Model", read 2026-11-10). SAP says customer-built
# Joule Studio agents generally count as Basic.
AI_UNITS_PER_STEP = {"basic": 0.005, "standard": 0.01, "advanced": 0.025}

# FICTITIOUS example values from SAP's "Metering and Pricing for Generative AI" page.
GENAI_PER_1K_INPUT = 0.00112
GENAI_PER_1K_OUTPUT = 0.00320
CU_PER_GENAI_TOKEN = 1.90385

# Runs per month for each agent: course values for Calder, not real volumes.
RUNS_PER_MONTH = {"AGT_ORDER_EXC": 600, "AGT_INV_TRIAGE": 300}

MAX_STEPS = 20  # the step cap every agent should have

# Made-up work items: (agent, document, kind). Kinds decide how many tools the agent needs.
WORK = [
    ("AGT_ORDER_EXC", "1000002", "credit_block"),
    ("AGT_ORDER_EXC", "1000003", "missing_terms"),
    ("AGT_ORDER_EXC", "1000004", "partial_confirmation"),
    ("AGT_ORDER_EXC", "1000005", "missing_price"),
    ("AGT_ORDER_EXC", "1000006", "billing_block"),
    ("AGT_ORDER_EXC", "1000007", "delivery_block"),
    ("AGT_INV_TRIAGE", "5105600002", "quality_block"),
    ("AGT_INV_TRIAGE", "5105600003", "price_block"),
    ("AGT_INV_TRIAGE", "5105600004", "quantity_block"),
    ("AGT_INV_TRIAGE", "5105600005", "service_entry_open"),
]

TOOLS_BY_KIND = {
    "credit_block": ["sales_order_get", "credit_exposure_get", "open_items_get"],
    "missing_terms": ["sales_order_get"],
    "partial_confirmation": ["sales_order_get", "atp_check", "production_order_get", "po_get"],
    "missing_price": ["sales_order_get", "price_conditions_get"],
    "billing_block": ["sales_order_get", "acceptance_status_get"],
    "delivery_block": ["sales_order_get", "customer_notes_get"],
    "quality_block": ["supplier_invoice_get", "inspection_lot_get"],
    "price_block": ["supplier_invoice_get", "po_get", "info_record_get"],
    "quantity_block": ["supplier_invoice_get", "po_get", "goods_receipts_get"],
    "service_entry_open": ["supplier_invoice_get", "service_entry_sheet_get"],
}


class Meter:
    """Counts what a custom agent does in one run: steps, tokens, tool calls, time.

    One model call (plan, reason or answer) is one step; one tool call is one step.
    That follows SAP's description of a step as any action the agent takes while
    solving a request. SAP's own meter decides the real count: compare it in testing.
    """

    def __init__(self, agent, document):
        self.record = {"agent": agent, "document": document, "steps": 0, "model_calls": 0,
                       "tool_calls": 0, "input_tokens": 0, "output_tokens": 0,
                       "seconds": 0.0, "stopped_by_cap": False}
        self._start = time.perf_counter()
        self._simulated = 0.0

    def model_call(self, input_tokens, output_tokens, seconds=None):
        r = self.record
        r["steps"] += 1
        r["model_calls"] += 1
        r["input_tokens"] += input_tokens
        r["output_tokens"] += output_tokens
        if seconds is not None:
            self._simulated += seconds

    def tool_call(self, name, seconds=None):
        self.record["steps"] += 1
        self.record["tool_calls"] += 1
        if seconds is not None:
            self._simulated += seconds

    def finish(self, stopped_by_cap=False):
        r = self.record
        measured = time.perf_counter() - self._start
        r["seconds"] = round(self._simulated if self._simulated else measured, 2)
        r["stopped_by_cap"] = stopped_by_cap
        with LOG.open("a", encoding="utf-8") as f:
            f.write(json.dumps(r) + "\n")
        return r


def sample_run(agent, document, kind, rng, bug):
    """A made-up agent run: plan, call tools one at a time, then answer."""
    meter = Meter(agent, document)
    history = 1500  # system prompt + tool descriptions, in tokens
    tools = TOOLS_BY_KIND[kind]
    looping = bug and kind == "partial_confirmation"
    i = 0
    while True:
        if meter.record["steps"] + 3 > MAX_STEPS:  # keep one step for the stop message
            meter.model_call(history, 80, seconds=rng.uniform(1.0, 2.0))
            return meter.finish(stopped_by_cap=True)
        meter.model_call(history, 120, seconds=rng.uniform(1.2, 3.0))  # plan the next move
        history += 120
        if i < len(tools) or looping:
            name = tools[min(i, len(tools) - 1)]
            meter.tool_call(name, seconds=rng.uniform(0.3, 0.8))
            history += rng.randint(200, 320)  # the tool result joins the history
            i += 1
            continue
        meter.model_call(history, 220, seconds=rng.uniform(1.5, 3.5))  # write the answer
        return meter.finish()


def simulate(args):
    if not args.sample:
        sys.exit("Only --sample is available: wrap your own agent with the Meter class instead.")
    LOG.parent.mkdir(exist_ok=True)
    if LOG.exists():
        LOG.unlink()
    rng = random.Random(42)
    print(f"{'agent':15} {'document':11} {'steps':>5} {'tools':>5} {'in tok':>7} {'out tok':>7} {'sec':>6}")
    for agent, document, kind in WORK:
        r = sample_run(agent, document, kind, rng, args.bug)
        flag = "  STOPPED BY CAP" if r["stopped_by_cap"] else ""
        print(f"{agent:15} {document:11} {r['steps']:5} {r['tool_calls']:5} "
              f"{r['input_tokens']:7} {r['output_tokens']:7} {r['seconds']:6.1f}{flag}")
    print(f"\nLogged {len(WORK)} runs to {LOG}. Next: python radar/agent_meter.py report")


def capacity_units(input_tokens, output_tokens):
    genai = input_tokens / 1000 * GENAI_PER_1K_INPUT + output_tokens / 1000 * GENAI_PER_1K_OUTPUT
    return genai * CU_PER_GENAI_TOKEN


def report(args):
    if not LOG.exists():
        sys.exit(f"No file {LOG}. Run: python radar/agent_meter.py simulate --sample")
    runs = [json.loads(line) for line in LOG.read_text(encoding="utf-8").splitlines() if line.strip()]
    by_agent = {}
    for r in runs:
        by_agent.setdefault(r["agent"], []).append(r)

    print("Per run (averages from the log)\n")
    print(f"{'agent':15} {'runs':>4} {'steps':>6} {'max':>4} {'in tok':>7} {'out tok':>7} {'min':>5}")
    totals = {}
    for agent, rs in by_agent.items():
        n = len(rs)
        avg = {k: sum(r[k] for r in rs) / n for k in ("steps", "input_tokens", "output_tokens", "seconds")}
        totals[agent] = (avg, max(r["steps"] for r in rs), sum(r["stopped_by_cap"] for r in rs))
        print(f"{agent:15} {n:4} {avg['steps']:6.1f} {totals[agent][1]:4} "
              f"{avg['input_tokens']:7.0f} {avg['output_tokens']:7.0f} {avg['seconds'] / 60:5.2f}")

    tier = args.tier
    print(f"\nPer month ({tier} agent at {AI_UNITS_PER_STEP[tier]} AI Units per step; "
          "CU at SAP's FICTITIOUS example rates)\n")
    print(f"{'agent':15} {'runs':>5} {'steps':>7} {'AI Units':>9} {'CU':>8} {'runtime h':>9}")
    grand = 0.0
    for agent, (avg, _, _) in totals.items():
        n = args.runs if args.runs else RUNS_PER_MONTH.get(agent, 100)
        steps = avg["steps"] * n
        units = steps * AI_UNITS_PER_STEP[tier]
        cu = capacity_units(avg["input_tokens"], avg["output_tokens"]) * n
        hours = avg["seconds"] * n / 3600
        grand += units
        print(f"{agent:15} {n:5} {steps:7.0f} {units:9.2f} {cu:8.2f} {hours:9.2f}")
    print(f"{'all agents':15} {'':5} {'':7} {grand:9.2f}")
    print("\nAI Units: if the agent is built in Joule Studio (steps x factor).")
    print("CU: if the same agent runs on SAP BTP with the generative AI hub (tokens only;")
    print("    grounding, filtering and runtime services add their own meters).")

    if args.price_per_unit:
        print(f"\nAt {args.price_per_unit:.2f} per AI Unit (your contract's price): "
              f"{grand * args.price_per_unit:,.2f} a month, {grand * args.price_per_unit * 12:,.2f} a year")
    else:
        print("\nNo price per AI Unit given. SAP sells AI Units in blocks of 100; "
              "add --price-per-unit from your contract to see money.")

    print("\nChecks")
    for agent, (avg, worst, capped) in totals.items():
        if capped:
            print(f"  {agent}: {capped} run(s) stopped by the {MAX_STEPS}-step cap. Find the loop before go-live.")
        if worst > 2 * avg["steps"]:
            print(f"  {agent}: worst run used {worst} steps, over twice the average. Budget for the tail.")
    print("  Runtime hours are logged. No per-minute runtime rate was on SAP's pricing pages on 2026-11-10.")


def main():
    p = argparse.ArgumentParser(description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter)
    sub = p.add_subparsers(dest="command", required=True)
    s = sub.add_parser("simulate", help="run the made-up agents and log each run")
    s.add_argument("--sample", action="store_true", help="use made-up Calder work items")
    s.add_argument("--bug", action="store_true", help="make one agent loop until the step cap")
    r = sub.add_parser("report", help="averages and a monthly projection from the log")
    r.add_argument("--tier", choices=sorted(AI_UNITS_PER_STEP), default="basic")
    r.add_argument("--runs", type=int, help="runs per month for every agent (default: course values)")
    r.add_argument("--price-per-unit", type=float, help="your contract's price per AI Unit")
    args = p.parse_args()
    simulate(args) if args.command == "simulate" else report(args)


if __name__ == "__main__":
    main()

Step 3: Run the sample agents

  1. Run:

    python radar/agent_meter.py simulate --sample
  2. You should see one line per run:

    agent           document    steps tools  in tok out tok    sec
    AGT_ORDER_EXC   1000002         8     3   10701     700   11.7
    AGT_ORDER_EXC   1000003         4     1    5414     460    4.9
    AGT_ORDER_EXC   1000004        10     4   14505     820   14.8
    AGT_ORDER_EXC   1000005         6     2    8054     580    9.1
    AGT_ORDER_EXC   1000006         6     2    8156     580   11.2
    AGT_ORDER_EXC   1000007         6     2    8025     580    9.5
    AGT_INV_TRIAGE  5105600002      6     2    8028     580    9.3
    AGT_INV_TRIAGE  5105600003      8     3   10923     700   12.6
    AGT_INV_TRIAGE  5105600004      8     3   10880     700   12.8
    AGT_INV_TRIAGE  5105600005      6     2    7906     580    9.5
    
    Logged 10 runs to radar/agent_runs.jsonl. Next: python radar/agent_meter.py report
  3. Read the table. Order 1000003 (payment terms missing) needs one lookup, so 4 steps. Order 1000004 (partly confirmed, waiting on production and a purchase order) needs four lookups, so 10 steps. Same agent, same user, two and a half times the cost.

The random seed is fixed at 42, so your numbers match these exactly. If they don't, the script was changed or pasted only in part.

Step 4: Project a month

  1. Run:

    python radar/agent_meter.py report
  2. You should see this:

    Per run (averages from the log)
    
    agent           runs  steps  max  in tok out tok   min
    AGT_ORDER_EXC      6    6.7   10    9142     620  0.17
    AGT_INV_TRIAGE     4    7.0    8    9434     640  0.18
    
    Per month (basic agent at 0.005 AI Units per step; CU at SAP's FICTITIOUS example rates)
    
    agent            runs   steps  AI Units       CU runtime h
    AGT_ORDER_EXC     600    4000     20.00    13.96      1.70
    AGT_INV_TRIAGE    300    2100     10.50     7.20      0.92
    all agents                        30.50
    
    AI Units: if the agent is built in Joule Studio (steps x factor).
    CU: if the same agent runs on SAP BTP with the generative AI hub (tokens only;
        grounding, filtering and runtime services add their own meters).
    
    No price per AI Unit given. SAP sells AI Units in blocks of 100; add --price-per-unit from your contract to see money.
    
    Checks
      Runtime hours are logged. No per-minute runtime rate was on SAP's pricing pages on 2026-11-10.
  3. The monthly volumes (600 order exceptions, 300 invoice exceptions) are course values in RUNS_PER_MONTH. Change them to your own, or try another volume for both agents:

    python radar/agent_meter.py report --runs 1000

Step 5: Add your price and try other categories

  1. If your contract gives a price per AI Unit, add it. The value below is a placeholder, not an SAP price:

    python radar/agent_meter.py report --price-per-unit 1.00
  2. The end of the report now shows money:

    At 1.00 per AI Unit (your contract's price): 30.50 a month, 366.00 a year
  3. Check what happens if SAP classes an agent as Standard rather than Basic:

    python radar/agent_meter.py report --tier standard

    The AI Units double, to 61.00 a month in total. The CU column does not change, because tokens don't depend on the category.

Step 6: Catch a loop before it reaches the bill

  1. Run the sample again with a bug that makes the order-exception agent call the same tool over and over:

    python radar/agent_meter.py simulate --sample --bug
    python radar/agent_meter.py report
  2. Order 1000004 now stops at the cap:

    AGT_ORDER_EXC   1000004        19     9   32177    1160   24.9  STOPPED BY CAP
  3. The checks at the end of the report name the problem:

    Checks
      AGT_ORDER_EXC: 1 run(s) stopped by the 20-step cap. Find the loop before go-live.
      AGT_ORDER_EXC: worst run used 19 steps, over twice the average. Budget for the tail.

    One looping run out of six raised the agent's monthly projection from 20.00 to 24.50 AI Units. Without the cap, it would keep going. The other rows also shift slightly, because the bug changes the random sequence.

  4. Run simulate --sample once more without --bug to restore the clean log.

Step 7: Wrap your own agent

The Meter class works with any agent written in Python, such as unit09/agent_steps.py from Agents from first principles. The pattern is four calls:

# Sketch: add to your own agent loop. Run it from the course folder.
import sys
sys.path.insert(0, "radar")
from agent_meter import Meter

meter = Meter("AGT_ORDER_EXC", order_number)
# after every model call, with the token counts the API returns:
meter.model_call(usage_input_tokens, usage_output_tokens)
# after every tool call:
meter.tool_call("sales_order_get")
# when the agent stops:
meter.finish(stopped_by_cap=hit_the_cap)

Without a seconds argument the meter measures real elapsed time. Each finished run is appended to radar/agent_runs.jsonl, and report reads your runs alongside any sample runs, so delete the file before you start a clean measurement.

Step 8: Save your work

  1. The log is output, not code. Keep it out of Git by adding this line to .gitignore in the course folder:

    radar/*.jsonl
  2. Save:

    git add .gitignore radar/agent_meter.py
    git commit -m "Radar: meter agent steps before the free runtime ends"

What each part of the script does

Part What it does
AI_UNITS_PER_STEP SAP's published factors per step for Basic, Standard and Advanced agents
GENAI_PER_1K_INPUT, GENAI_PER_1K_OUTPUT, CU_PER_GENAI_TOKEN The fictitious capacity-unit example values, for the BTP comparison
RUNS_PER_MONTH, MAX_STEPS Course volumes per agent and the step cap
WORK, TOOLS_BY_KIND Made-up Calder blocked orders and blocked invoices, and the lookups each kind needs
Meter Counts steps, model calls, tool calls, tokens and seconds for one run, and appends the record to the log
sample_run A made-up agent: plan, call a tool, repeat, then answer; with --bug one kind never stops looking up
report Averages per agent, projects a month in AI Units, CU and runtime hours, adds money if you give a price, and prints checks

If something goes wrong

What you see What it means What to do
python is not recognized, or command not found Python isn't installed, or the terminal can't find it Windows: repeat the setup topic's Python step, then open a new terminal. macOS/Linux: use python3 until .venv is active
can't open file ... agent_meter.py You are not in the course folder, or the file is elsewhere cd to orchestrate-course; check the file is in radar
No file radar/agent_runs.jsonl report ran before any run was logged Run python radar/agent_meter.py simulate --sample first
Only --sample is available You ran simulate without --sample Add --sample, or wrap your own agent as in Step 7
ModuleNotFoundError: No module named 'agent_meter' in your own agent Python can't find the radar folder Run your agent from the course folder, and keep the sys.path.insert line
Your numbers differ from the ones shown The script was edited, or the log holds runs from Step 6 or your own agent Paste the code again, or delete radar/agent_runs.jsonl and run Step 3
A network or proxy error Not from this script: it makes no network calls Check which other script you ran

The SAP way

As read on SAP pages on 10 November 2026. Every item here changes over time; check the dated source before quoting it to a customer.

The promotion

  • Runtime: deploying and running custom agents on the SAP-managed Joule Studio runtime stays free through December 2026, as a time-bound promotion for select customers (SAP News, 27 October 2026). The release names no end time, no time zone and no eligibility rule.
  • Design time: tools for building and testing agents and n8n workflows stay free "under fair-use limits". The limits are not stated in the release.
  • Spend controls: the release announces observability and administrative controls for agent behavior, model usage and spend, with no release status.

After the promotion

  • Meter for custom agents: AI Units, consumption-based, per step. Custom Joule Studio agents generally align with the Basic category (0.005 AI Units per step) "today", in SAP Learning's words; Standard is 0.01 and Advanced 0.025 (SAP Learning).
  • Activation: the agent builder's product page says AI Units are currently required and offers activation with AI Units; contract duration is "available upon request" (sap.com).
  • Access: SAP's pricing page says Joule Studio is reached through SAP BTP using SAP Discovery Center credits (sap.com pricing). How BTP access and AI Unit metering combine for one customer is a contract question.
  • No public price per AI Unit. The AI Units page sells blocks of 100 at standard list price and shows the amount only in its configurator (sap.com, AI Units).
  • Sizing tools: the pricing page points to the SAP AI Estimator and to account executives and partners.

Pages that disagree

The Joule Studio product page, read the same day, still advertises running custom agents at no cost for a limited time in Q1 2026 and an agent builder that "will be GA in December 2025" (sap.com). It predates the 27 October release. When SAP pages conflict, quote the most recent dated statement and name the date.

Build vs. SAP

Situation Joule Studio agent (AI Units per step) Your own agent on SAP BTP (tokens to BTP credits)
Requests need few steps but long context (large documents) Often cheaper: a step costs the same however long the prompt Often dearer: every token is metered
Requests need many small lookups Every lookup is a step Each lookup adds tokens to the history, so cost also grows
You need a firm monthly cap Units are prepaid; usage visible hourly in SAP for Me You build the cap yourself, as in AI gateways
Agent must run inside Joule, with SAP's runtime and controls Fits You build and operate the runtime
You want to choose and change models freely Within what Joule Studio offers Full choice within the generative AI hub
Pricing certainty for 2027 Factor per step published; unit price in your contract Rates per model in SAP Note 3437766; credits in your BTP contract

For most SAP-centric agents that live in Joule, the Joule Studio meter is the simpler one to forecast, because it ignores prompt length. The BTP route is worth comparing when an agent needs many steps with short prompts, or when you already have BTP credits to spend.

Architecture view

Where it sits. A Joule Studio agent runs on the SAP-managed runtime on SAP BTP and calls S/4HANA through released APIs, as shown in Joule and Joule Studio. Metering happens in SAP's commercial layer: consumption flows to SAP for Me. Your own step log sits beside the agent, in its observability data.

flowchart LR
  U[User in Joule] --> J[Joule Studio agent<br/>SAP-managed runtime]
  J -->|released APIs| S[S/4HANA CP10]
  J -->|consumption| F[SAP for Me<br/>AI Unit balance]
  J -->|steps, tokens, seconds| O[Your step log<br/>and dashboards]
  O --> B[Monthly budget<br/>and alerts]
  F --> B

Non-functional requirements that decide the design:

Requirement Typical target What breaks if missed
Cost per request Measured average and worst-case steps per agent The first invoice sets the budget instead of the design
Step cap A hard limit per run, logged when hit A loop burns units until someone notices
Budget alert Alert at a share of the monthly allocation (for example 80%) The central pool runs dry for other SAP AI features
Traceability Every run tied to an agent, a document and a user Nobody can say which agent or process spent the units
Data in logs Document numbers and counts only, no customer text The cost log becomes a privacy problem

Integration and identity. Requests reach the agent through Joule with the user's identity, and tools call S/4HANA as that user (Agent permissions and SAP authorizations). For cost, each run also needs the agent's own name and the business document it worked on, so steps can be charged back to a process. Keep the log fields to counts and identifiers.

The decision to record. In the short form from Writing a solution design doc:

  • Context: Calder's order-exception agent runs free on the Joule Studio runtime until December 2026; from January it consumes AI Units per step, at a price set by contract.
  • Options: A, wait for the first invoice; B, buy a large block of AI Units up front; C, measure steps per request in the pilot, buy for the measured volume plus a margin, and cap steps.
  • Decision: C, with a step cap of 20 per run and an alert at 80% of the monthly allocation.
  • Consequences: a few hours of work now; a forecast that rests on data; a cap that may cut off a rare legitimate long request, which then goes to a person.

What a design review will ask:

  1. What are the average and worst-case steps per request, and from how many test runs?
  2. What happens when an agent hits its step cap, and who is told?
  3. Who owns the AI Unit budget, and who sees consumption in SAP for Me?
  4. Which category will SAP apply to this agent, and what if it is higher?
  5. If the promotion ends mid-test, what is the cost of the remaining test plan?

Production concerns

  • Security and authorizations. A step log is operational data. Restrict it like other monitoring data, and never log prompts or customer text in it. Access to SAP for Me consumption data should follow the same roles as other contract data.
  • Evaluation. Steps per request belong in the evaluation set next to correctness. A prompt change that keeps answers right but adds two steps is a 30% cost increase on a 7-step agent.
  • Cost. Budget from measured averages, add a margin for the tail, and remember units expire. Re-measure after every model or prompt change.
  • Operations. Check SAP for Me weekly at first; compare its consumption with your own log to confirm how SAP counts steps. Agree in advance who may file an overage request.
  • Clean core. Metering adds nothing to S/4HANA. The agent still uses released APIs only; the step log lives outside the core.

Pitfalls

  • Treating "free" as a test result. Free runs tell you nothing about cost unless you count steps.
  • Measuring averages only. A long tail of hard requests, or one loop, moves the bill. Report the worst case too.
  • No step cap. Without one, a bug becomes an open-ended spend.
  • Assuming the category. Basic is SAP's description of custom agents "today". Plan a sensitivity at Standard.
  • Quoting an old page. SAP's product pages lag its releases. Date every price or offer you repeat.
  • Logging customer data for cost reasons. You need counts and document numbers, not prompts.
  • Forgetting the shared pool. Your agent's units come from the same pool as other premium AI. Agree on the split.

Exercise: a measured budget for one agent

You will produce a one-page budget note for an agent you have built in this course, based on measured steps.

Before you start: finish Build it yourself, Steps 1 to 7.

  1. Pick one agent you built earlier, such as unit09/agent_steps.py from Agents from first principles.
  2. Delete radar/agent_runs.jsonl.
  3. Add the four Meter calls from Step 7 to that agent's loop.
  4. Run the agent on at least ten requests, mixing easy and hard ones (with --sample if it has no account).
  5. Run python radar/agent_meter.py report --runs 600 and copy the output into a new file, radar/agent_budget.md.
  6. In the same file, add: the date, the average and worst-case steps, the monthly AI Units at Basic and at Standard, your step cap, and the three questions from this page you would ask your SAP account team.
  7. Commit radar/agent_budget.md and your changed agent to Git.

Done when radar/agent_budget.md shows a report built from at least ten runs of your own agent, both Basic and Standard monthly figures, and a step cap that no measured run exceeded.

Check yourself

Pick one answer for each question. The explanation appears after you choose.

1Why measure steps per request while the runtime is still free?

Answer: B. The monthly cost is requests times steps per request times the factor per step. The factor is published and the unit price comes from the contract, so steps per request is the missing input, and measuring it now costs nothing.

2In the sequence diagram, how many steps does the question about order 1000002 take?

Answer: C. Each plan or answer from the model is a step, and so is each tool call. Three lookups mean four planning calls, three tool calls and one answer.

3In the script, what does the Meter class record for each run?

Answer: B. The meter keeps counts and identifiers: agent, document, steps, calls, tokens and time. It deliberately leaves out prompts and personal data, which a cost log doesn't need.

4Why does --tier standard double the AI Units but leave the CU column unchanged?

Answer: D. The Joule Studio meter multiplies steps by a factor per category: 0.01 for Standard against 0.005 for Basic. The CU column comes from tokens on the BTP route, which the category does not touch.

5An agent needs few steps but sends very long documents to the model. Which statement fits?

Answer: D. Joule Studio's meter is a flat factor per step, regardless of prompt length. On the BTP route every token is metered, so long context raises cost even at a low step count.

6After a prompt change, the invoice-triage agent averages 9 steps instead of 7, with the same answers. What should you do?

Answer: C. On a per-step meter, two extra steps on seven is about a 30% cost increase for the same result. Steps per request belong in the evaluation alongside correctness.

7Your report shows one run stopped by the 20-step cap. What is the best next move?

Answer: A. A run that hits the cap is usually a loop, like the repeated tool call in Step 6. One such run raised the sample agent's projection from 20.00 to 24.50 AI Units, and without a cap the cost would have no limit.

8Which statement about SAP's published terms, as read on 10 November 2026, is accurate?

Answer: C. SAP Learning publishes the AI Units per step for each category, while the AI Units page shows prices only in its configurator. The Joule Studio product page still shows an older Q1 2026 offer, so the pages don't all agree.

Sources

  • SAP Empowers AI Developers to Build What Matters and Turn Intent into Autonomous Execution (SAP News, 27 October 2026) — read 2026-11-10; a time-bound promotion for select customers keeps deploying and running custom agents on the SAP-managed Joule Studio runtime free through December 2026; design-time tooling for agents and n8n workflows free under fair-use limits; new observability and administrative controls for agent behavior, model usage and spend; SAP Enterprise AI Gateway announced to manage AI traffic, no status given
  • Understanding the Commercial Model (SAP Learning, Introducing Joule) — read 2026-11-10; Joule Base included, Joule Premium needs AI Units; AI Units bought annually from a central pool; packages per user per month with a fair-use limit of requests; overage 2 AI Units per 1,000 requests; agent usage measured in 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; customer-built Joule Studio agents consumption-based and generally Basic
  • Evaluating the Commercial Models for Agents (SAP Learning, Selling SAP Business AI) — read 2026-11-10; SAP-built agents in per-user packages or AI Units; customer-built Joule Studio agents (custom or extended SAP agents) metered with AI Units; agents built on SAP BTP charged through BTPEA credits, including generative AI hub use via SAP AI Core; a step is any action the agent takes while solving a request (planning, a tool call, a reasoning cycle); typical tasks about 2 to 20 steps; Advanced agents cost more per step but may need fewer steps
  • AI Features Guide Price List (sap.com) — read 2026-11-10; an agent step is any agent action invoked and processed within the agent run; basic 5, standard 10, advanced 25 requests per agent step; consumption-based SAP agents metered per request or per step with their own AI Unit factors; no entry for Joule Studio custom agents; no version date shown
  • SAP Business AI packages and pricing (sap.com) — read 2026-11-10; Joule Base USD 0.00; AI Units bought annually, expire after 12 months if not used; usage and balance in SAP for Me; SAP AI Estimator for sizing; Joule Studio accessed through SAP BTP with SAP Discovery Center credits; premium packages 'Request a quote'; no free Joule Studio offer and no 2027 prices listed
  • Simplify AI consumption with a unified AI currency (sap.com, AI Units) — read 2026-11-10; AI Units sold in blocks of 100 at standard list price; contracts 1 to 3 years with auto-renewal; conversion rates per request, user, record or other metric; no price per unit shown on the page
  • Joule Studio, agent builder (sap.com product page) — read 2026-11-10; 'AI Units are currently required to use this AI offering'; Activate with AI Units; contract duration available upon request; no free period listed
  • Joule Studio (sap.com product page) — read 2026-11-10; still shows an earlier offer (run custom Joule agents at no cost for a limited time, Q1 2026) and says the agent builder 'will be GA in December 2025'; older than the 27 October 2026 release
  • Evaluating How Customers Utilize AI Features and Manage AI Unit Usage (SAP Learning, Selling SAP Business AI) — read 2026-11-10; AI Unit usage tracked centrally in SAP for Me: balance, monthly consumption with current-month estimate, per-product and per-feature breakdown updated hourly, balance statements; overage requests for more AI Units; units close to expiry shown

Sign in to track your progress

We'll email you a one-time sign-in link. No password needed.

or

Tell us a little about you

Optional, every field. It helps us pitch answers to your questions at the right level and decide which topics to write next. It is never shown publicly, and you can change or clear it anytime from the account menu.

SAP areas you work in