Lesson 4 of 6
Controls for agents: permissions, approvals, logs and kill switches
9 min
Listen to this lesson
Agents raise the stakes because they act, not just answer. A Joule agent or a custom agent connected through an MCP server can read data, draft documents and, if you allow it, post them. The AI Act's high-risk duties (human oversight, logging, accuracy, robustness) are a good template for any agent that touches business processes, high-risk or not. This lesson turns them into concrete controls an SAP program can design, test and sign off.
Five control families
Permissions
Treat an agent like a new kind of user that needs least privilege. In SAP terms, that means the agent's technical identity (if it has one) goes through the same role design and segregation of duties analysis as a person. Contoso runs SAP Access Control 12.0, so Nadia added agent identities to the access risk analysis: an agent that can create purchase requisitions must not also be able to release them or maintain supplier bank details. Where calls run under the end user's identity, the user's own roles limit the agent, which is the safest default.
Approvals that already exist
Your SAP system already has approval controls; don't let agents route around them. At Contoso, purchase requisitions over $10,000 need release, and purchase orders over $25,000 need approval through flexible workflow. An agent that drafts a $40,000 requisition triggers the same release and approval as a person would. Add agent-specific limits on top where useful, for example a maximum number of documents per hour, or a value ceiling above which the agent must hand over to a person before drafting.
Logging that answers the auditor's question
For any agent action, you should be able to answer: who asked, which agent acted, what it was told, which tool it called with which parameters, what came back, and which SAP document resulted. SAP's architecture guidance recommends logging every tool call with caller identity, redacted parameters, target API, status and latency, and the Agent Gateway design logs interactions for audit through SAP Cloud ALM. For high-risk systems, deployers must keep logs under their control for at least six months; Contoso keeps agent logs for 13 months, matching its audit cycle.
Kill switches and incidents
A kill switch is only real if it has been tested. Design at least two: a fast one that stops the agent from acting (for example, revoking its subscription to the MCP server in Developer Hub, disabling its identity in SAP Cloud Identity Services, or deactivating the agent in its platform) and a slower one that removes its access to SAP data. Document who may pull each switch, at what trigger, and what the fallback process is, then rehearse it like a cutover task.
| Trigger | Immediate action | Owner | Follow-up |
|---|---|---|---|
| Agent posts or drafts documents outside its limits | Pull the fast kill switch | Process owner or on-call integration lead | Reverse drafts, root cause, retest before restart |
| Spike in errors or authorization failures | Throttle, then stop if it continues | Integration lead (Theo) | Check for upstream changes or attacks |
| Suspected prompt injection or data leak | Stop agent; preserve logs | Security lead (Nadia) | Security incident process; notify data protection |
| Wrong answers affecting people (HR, customers) | Stop agent for that use; manual fallback | Process owner | Inform affected people; inform the provider if it is a vendor system |
Contoso's agent incident playbook (excerpt).
What would you do?
In the quality system, Contoso's requisition agent drafts 400 requisitions in ten minutes after a misconfigured reorder point. Nobody notices for an hour. What control gap matters most?
- Give each agent its own identity and least privilege, and include it in SoD analysis.
- Keep existing SAP release and approval thresholds in force for agent-created documents; add agent-specific limits.
- Log who asked, which agent, which tool, parameters, result and document; keep high-risk logs at least six months.
- Design, document and rehearse kill switches and fallback processes before go-live.
Check your understanding · not graded
Lesson check
1. How long must deployers of high-risk AI systems keep logs under their control, at minimum?
2. Why include an agent's technical identity in SAP Access Control risk analysis?
3. Which is a valid fast kill switch for an agent that uses an MCP Gateway server?
4. An agent drafts a $40,000 requisition at Contoso. What should happen?