Now accepting guest editorial from SAP, Oracle, Workday and ServiceNow practitioners.Pitch a guide
The Sign-Off Table

Lesson 2 of 6

How an agent works

9 min

Listen to this lesson

0:00 / 15:29

You don't need to build an agent to evaluate one, but you do need a working model of what happens between the user's request and the result. Otherwise you can't design tests or controls. This lesson walks through one request to the Accounts Receivable Assistant in SAP S/4HANA Cloud Private Edition, using what SAP documents about that assistant and about agents in Joule Studio.

The loop: intent, plan, act, check

SAP documents the Accounts Receivable Orchestration Agent this way: it receives a natural-language request in Joule, "identifies your intent, plans the appropriate action, and delegates the task to the relevant specialized agent". The specialized agent completes the task and returns the result to the conversation. For any action that modifies data, such as creating a dispute case, "the agent asks for your confirmation before proceeding". SAP AppHaus's agent design kit includes a Reason and Act framework template that describes the general pattern: the agent reasons about the next step, acts with a tool, looks at the result, and repeats until it can answer or needs a person.

One request through the Accounts Receivable Assistant, with the confirmation step SAP documents for data changes.
The Sign-Off Table · thesignofftable.com/academy/sap-ai-201

Tools and the Agent Gateway

Agents act through tools. In the Joule Studio glossary, agents "interact with SAP APIs through MCP (Model Context Protocol) tools": each API is exposed as a tool the agent can invoke instead of calling HTTP endpoints directly. The Agent Gateway is described as "the secure access layer that serves as the single, governed connection point between deployed agents and SAP backend systems", making sure requests are authenticated and compliant. SAP's Architecture Center and Cross-Domain Agents guide use the same name for the gateway's other role, the inbound A2A entry point through which external agents call Joule Agents (see sap-ai-205). For an evaluator, that means two useful facts: the set of tools defines the maximum an agent can do, and every tool call goes through a controlled point that can be logged.

Instructions shape behavior

For custom agents built in Joule Studio, classic edition, SAP documents four components that together form the agent's prompt: expertise ("who are you?"), instructions ("what must you do?"), additional context (rules and conditions: "how should you do it?") and tool descriptions ("what actions can you perform?"). SAP's best practices: be clear and specific, use step-by-step logic, avoid conflicting rules, and restrict the toolset to what the job needs. For SAP-delivered agents you don't edit these, but the same logic explains their behavior: an agent only does what its tools allow and its instructions steer.

ExpertiseWho are you? The agent's role, such as a collections specialist.
InstructionsWhat must you do? The primary task, such as preparing a collections call summary.
Additional contextHow should you do it? Rules and conditions, such as when to escalate.
Tool descriptionsWhat actions can you perform? Each tool's purpose, inputs and when to use it. Restrict to what the job needs.
The four components SAP documents for an agent's prompt in Joule Studio, classic edition, and the question each answers.
The Sign-Off Table · thesignofftable.com/academy/sap-ai-201

Business context and grounding

Agents use business context to choose well. SAP's documentation for Joule Agents names SAP business data, the SAP Knowledge Graph and process knowledge as the sources of their business context awareness. Agent responses include a Source and AI Reasoning section where users can see the analysis and the types of data used; SAP notes it highlights a maximum of 30 data items per data source. That section is the first thing a reviewer reads when an answer looks wrong.

Identity and permissions

An agent acts for a user, so identity matters. SAP's setup guide describes two implementation stages for Joule identity and access management in SAP Cloud Identity Services. In stage 1, minimal user records are pushed to the identity directory: users can use Joule's conversational tools but can't be assigned to agents. In stage 2, user identities are stored in the Identity Directory and can be linked to agents. SAP states that a user consolidation tool to move from stage 1 to stage 2 is planned but not yet available, so customers in stage 1 "don't have access to agents". Check this early: it can block a pilot before it starts.

What to ask for before testing

  • The agent's Help Portal page: purpose, prerequisites, business roles, specialized agents and example prompts.
  • The list of tools (APIs) the agent can call, and which of them change data.
  • Where tool calls and confirmations are logged, and how long the logs are kept.
  • Which identity the backend sees for each call, and whether the confirming user is recorded on the document.
  • The AI Unit metric and rate for the agent, so test runs can be costed.

What would you do?

During a test in CMQ, the Dispute Creation Agent proposes a dispute for the wrong customer. Priya wants to know where the error came from. What should she look at first?

Key points
  • Agents loop: identify intent, plan, act with a tool, check the result; data changes need the user's confirmation.
  • Tools (SAP APIs exposed via MCP) set the limit of what an agent can do; the Agent Gateway is the governed access point.
  • Custom agents are shaped by expertise, instructions, additional context and tool descriptions; restrict tools to the job.
  • Check identity stage, components and business roles early: they can block agent access.

Check your understanding · not graded

Lesson check

  1. 1. According to the Joule Studio glossary, how do agents interact with SAP APIs at runtime?

  2. 2. Which four components shape a custom agent's prompt in Joule Studio, classic edition?

  3. 3. What does SAP's setup guide say about users in identity stage 1?

  4. 4. Why does SAP recommend restricting an agent's toolset?