Blog
Building observable AI agents, explained with a business example
Boidra Expert3 min read
Observability is the practice of making an AI agent's work visible - recording what it did at each step so you can measure whether it worked, what it cost, and when it went wrong. For AI agents in SAP, that visibility is the difference between a system you can trust in production and one you simply hope is behaving.
To make this concrete, let's follow a real business process rather than abstract code: an AI agent that handles incoming supplier invoices in SAP.
A business example: the invoice-approval agent
Imagine a finance team drowning in supplier invoices. An AI agent takes over the first pass. For each invoice it runs a few steps:
- Read the invoice - pull out supplier, amount, PO number.
- Match it to a purchase order in SAP.
- Check it against policy - is the amount within tolerance, is the supplier approved?
- Decide - auto-approve, or route to a human for review.
When it works, invoices clear in seconds instead of days. But the moment a finance manager asks "why did the agent approve that €40,000 invoice?", you need an answer - and "the AI decided to" is not one. That is what observability gives you.
Making each step visible: the span
The core idea is simple. Every step the agent takes emits a small record - a span - capturing what happened:
- which step ran (e.g. match to purchase order),
- how long it took,
- how much it cost,
- and a quality score: did the step do its job correctly?
You don't need to read code to understand a span. Think of it as a receipt for every action the agent takes.
What the telemetry looks like
Once every step emits a span, the invoice agent's run becomes a table anyone can read - not just engineers:
| Step | Time (sec) | Cost (est.) | Quality score |
|---|---|---|---|
| Read the invoice | 1.2 | €0.004 | 0.95 |
| Match purchase order | 3.4 | €0.011 | 0.72 |
| Check against policy | 0.8 | €0.006 | 1.00 |
| Decide & route | 2.1 | €0.005 | 0.91 |
A finance lead and an engineer can look at this same table and immediately see:
- Matching the purchase order scored only 0.72 - the weakest step, and where mismatched invoices likely slip through. That is where to focus.
- Checking against policy is fast, cheap, and reliable - no attention needed.
- Any step that scores below your threshold is a signal to send that invoice to a human instead of auto-approving it.
Observability isn't a dashboard you bolt on afterwards. It's a record you keep of every step the agent takes - so "the agent approved a €40,000 invoice" becomes something you can inspect, explain, and improve.
Why this matters for AI in SAP
The invoice agent is one example, but the principle holds for any agent working inside your business - purchase orders, master-data changes, customer queries. If you can see each step, score it, and act on the weak ones, you get an AI system your team can actually trust and keep improving. If you can't, you're guessing.
This is exactly what Boidra Platform does: it captures a span for every step your agents take inside SAP, scores them, and surfaces the outliers - so observability is built in from day one, not bolted on later.
Wrapping up
Start simple: record what every agent step does, score whether it did its job, then act on the steps that score poorly. That is how a promising AI demo becomes a system finance, procurement, and operations teams are willing to rely on.
Keep reading
Adoption of SAP Joule: one user across many systems
Adopting SAP Joule means letting one assistant act across systems that have never agreed on who the user is. How Joule resolves one person across S/4HANA, Ariba and Concur, and the identity work that has to come first.
SAP Autonomous Suite: What Is Actually Available
SAP's Autonomous Suite documents 125 Joule agents and 34 assistants across Finance, HCM, Spend, Supply Chain and CX. The totals by domain, assistant versus agent, which of the 18 SAP products need SAP Build Work Zone, and why phased availability is the first thing to verify.
Building SAP AI Agents: Joule Studio SAP-managed and customer-managed BTP explained
When planning an SAP agent, three decisions shape the architecture: where it runs, how it reaches business systems and who may use it. SAP-managed Joule Studio and customer-managed BTP agents compared, with Agent Gateway, A2A, MCP Gateway and what changes for Joule Studio classic.