Blog · Applied AI

From Building to Extending AI Agents: My Experience with SAP Joule Studio

SAP Joule Studio is more than a tool for creating AI agents. It introduces a different way to design enterprise automation: combining business context, reusable capabilities, agent orchestration, and governance. After working hands-on with the platform and earning the SAP Certified – Joule Studio Developer certification, I wanted to share my experience and some technical takeaways.

De crear a extender agentes de IA: mi experiencia con SAP Joule Studio
SAP Business AIJoule StudioAI AgentsAgentic AIMCPA2A

De las integraciones a los agentes de IA

Gran parte de mi experiencia con SAP BTP ha estado relacionada con las integraciones: conectar sistemas, exponer APIs, transformar datos y conseguir que diferentes procesos empresariales se comuniquen de forma fiable.

Más recientemente, he estado explorando cómo los agentes de IA pueden consumir esas integraciones mediante protocolos como Model Context Protocol (MCP).

Joule Studio añade una nueva capa a esta arquitectura.

SAP Joule Studio: una nueva conversación con Joule
Joule Studio: inicio de una nueva conversación con Joule.

Ya no se trata únicamente de exponer una API o desarrollar un flujo de integración. Podemos diseñar agentes capaces de interpretar una petición de negocio, recuperar información, aplicar reglas y generar recomendaciones.

Lo interesante no es solamente el modelo de lenguaje, sino cómo se conecta con las capacidades empresariales y cómo opera dentro de unos límites definidos de seguridad y negocio.

Para explorar este enfoque, trabajé en dos escenarios: crear un agente desde cero y extender uno existente de SAP.

1. Creando un Customer Billing Review Agent

El primer escenario estaba centrado en cuentas por cobrar.

Imaginemos que un especialista de facturación necesita revisar el comportamiento de pago de un cliente. Normalmente tendría que consultar facturas, identificar pagos vencidos, revisar las condiciones contractuales y comparar los pagos reales con los acuerdos establecidos.

Con Joule Studio desarrollé un Customer Billing Review Agent para reunir toda esa información.

Resumen de intención del Customer Billing Review Agent en Joule Studio: reto de negocio, criterios de éxito e hitos clave
El resumen de intención del agente: reto de negocio, criterios de éxito e hitos clave. A la izquierda, Solution Progress sigue la intención, los requisitos, las especificaciones y los artefactos de la solución.

El agente utilizaba dos capacidades de negocio:

  • Customer Billing Information: Recuperar facturas, saldos pendientes e histórico de pagos.
  • Contract Information: Consultar condiciones de pago, descuentos y penalizaciones contractuales.

Una de las decisiones importantes fue la selección de herramientas.

Si el usuario pregunta únicamente por facturas, el agente debe utilizar la capacidad de facturación. Si pregunta por las condiciones contractuales, solo debe consultar el contrato. Para una revisión completa, necesita ambas.

El resultado esperado es un informe estructurado que explique las discrepancias y recomiende los siguientes pasos.

Un ejemplo práctico

Utilizando datos simulados, analicé un cliente con cinco facturas, tres pagos realizados fuera de plazo y una factura vencida.

El contrato establecía condiciones Net 30.

File Explorer de Joule Studio con mcp-mock.json, el servidor MCP simulado de Customer Billing Information
Los datos simulados están en mcp-mock.json, que simula el servidor MCP de Customer Billing Information: el esquema de entrada de la herramienta y su respuesta. Al lado, el código del agente, sus pruebas y los ficheros de especificación.

Al comparar las facturas con el contrato, la solución identificó los retrasos y el saldo pendiente que requería atención.

El objetivo no era iniciar automáticamente una reclamación de cobro ni modificar facturas. Era proporcionar al especialista una visión clara de la situación.

Qué aprendí durante el desarrollo

Un agente conversacional solo resulta útil si puede recuperar correctamente la información que necesita.

Durante el desarrollo tuve que trabajar en la identificación de clientes, selección de capacidades, orquestación de herramientas, compatibilidad de dependencias y gestión de errores.

Una de las conclusiones más interesantes fue que no todos los pasos de un agente necesitan llamar a un LLM.

La identificación de clientes, los cálculos deterministas y la recuperación de información pueden realizarse mediante código y herramientas existentes. El modelo puede concentrarse en interpretar los resultados, explicarlos y elaborar recomendaciones.

Este enfoque puede reducir llamadas innecesarias al modelo y facilitar las pruebas.

También comprobé que superar las pruebas automatizadas no garantiza que el agente se comporte correctamente en su entorno de ejecución.

En mi caso, Preview permitió detectar problemas que no aparecían en las pruebas aisladas.

Preview with Mock Data en Joule Studio: el agente conectado a datos simulados antes del despliegue
Preview with Mock Data: conversación con el agente antes de desplegarlo, conectado a datos simulados.

La revisión completa seguía presentando un error de conexión con el servicio de IA, por lo que incorporé un mecanismo de respaldo claramente identificado y limitado a las pruebas con datos simulados. Este mecanismo permitía generar el informe a partir de la información recuperada, aunque no validaba una inferencia completa del LLM.

Es una diferencia importante antes de considerar una solución preparada para producción.

2. Extendiendo el SAP Financial Closing Assistant

El segundo escenario planteaba un enfoque diferente: ampliar un agente existente en lugar de desarrollar otro desde cero.

SAP proporciona agentes orientados a procesos de negocio concretos. Con Joule Studio, podemos incorporar lógica específica de una organización manteniendo las capacidades originales.

En este caso trabajé sobre el SAP Financial Closing Assistant y creé una extensión para identificar y priorizar incidencias durante el cierre financiero.

La extensión incorporaba tres categorías:

Categoría Condición
Critical Errores de contabilización superiores a 100.000 €
Urgent Tareas incompletas con menos de cuatro horas hasta el cierre
Flag Tareas retrasadas que bloquean actividades posteriores

Las reglas se evalúan de forma independiente, de modo que una misma incidencia puede cumplir varias condiciones.

El resultado es un resumen ordenado por prioridad que incluye referencias, motivos de escalado y recomendaciones.

¿Por qué extender en lugar de crear?

La principal ventaja es la reutilización.

El Financial Closing Assistant ya dispone de un propósito de negocio y capacidades propias. La extensión añade el comportamiento específico que necesita la organización sin reconstruir toda la solución.

En esta implementación, utilicé una extensión basada en instrucciones, sin necesidad de incorporar nuevos servidores MCP ni hooks de automatización.

Este enfoque también plantea una consideración importante: cuando SAP actualiza el agente original, debemos comprobar que nuestra extensión continúa funcionando correctamente.

3. La gobernanza forma parte de la arquitectura

Hay un principio común en ambas soluciones: read-only by design.

El agente de facturación puede analizar información, pero no modificar facturas o contratos, aplicar abonos ni iniciar acciones de cobro.

La extensión financiera puede identificar incidencias, pero no crear asientos contables, aprobar tareas o modificar el calendario de cierre.

Estas restricciones no son funcionalidades secundarias. Definen qué puede hacer y qué no puede hacer la solución.

En procesos empresariales sensibles, especialmente financieros, una acción automática incorrecta puede afectar a los datos contables, el cumplimiento normativo o la auditoría.

Por eso, una arquitectura empresarial de agentes necesita varios niveles de control:

  • Alcance de negocio y responsables claramente definidos.
  • Acceso limitado a las herramientas y los datos necesarios.
  • Restricciones explícitas sobre operaciones prohibidas.
  • Monitorización y registros de ejecución.
  • Aprobación humana para acciones sensibles.

Una instrucción que diga "no modifiques datos" es útil, pero no debería ser la única medida de seguridad. Los permisos de las herramientas y la autorización del backend deben imponer esas mismas restricciones.

La autonomía responsable consiste en automatizar las actividades adecuadas, no en eliminar el control del proceso.

Vista Manage del agente en Joule Studio: responsables, ciclo de vida y monitorización
La vista Manage del agente de facturación: responsables (línea de negocio y producto), ciclo de vida (despliegue y versiones) y monitorización de ejecuciones y fallos. El agente no está desplegado: lo probé en Preview con datos simulados.

4. Cómo encajan MCP, A2A y SAP AI Agent Hub

Trabajar con Joule Studio también me ha ayudado a conectar diferentes elementos de la arquitectura de agentes de SAP.

MCP: Agentes conectados a herramientas

Model Context Protocol permite que los agentes descubran y utilicen herramientas externas mediante un estándar abierto.

Por ejemplo, un agente puede recuperar información financiera de SAP utilizando una capacidad MCP gobernada.

Este enfoque conecta directamente con mis proyectos anteriores, en los que he expuesto APIs de SAP Integration Suite como herramientas MCP.

A2A: Colaboración entre agentes

Agent2Agent resuelve un problema diferente: la comunicación y colaboración entre agentes.

En lugar de crear un único agente encargado de todo, podemos coordinar agentes especializados en distintas actividades y procesos empresariales.

La diferencia es sencilla:

MCP conecta agentes con herramientas. A2A conecta agentes con otros agentes.

SAP AI Agent Hub: Gobernanza empresarial

A medida que las organizaciones incorporan agentes en finanzas, compras, recursos humanos y otros departamentos, la gobernanza cobra cada vez más importancia.

Una capa centralizada de gestión ayuda a mantener visibilidad sobre los agentes, sus responsables, su comportamiento y los controles operativos asociados.

El reto deja de ser únicamente desarrollar agentes y pasa a ser gestionarlos de forma fiable y segura a escala empresarial.

5. Mis principales conclusiones

Después de trabajar tanto con agentes personalizados como con extensiones, destacaría cinco aprendizajes:

  1. Empezar por el proceso de negocio, no por el prompt. Un buen agente necesita un objetivo claro, acceso a datos adecuados y un beneficio medible.
  2. Reutilizar capacidades siempre que sea posible. Extender un agente estándar de SAP puede resultar más eficiente que desarrollar toda su funcionalidad desde cero.
  3. Mantener determinista lo que puede ser determinista. No todos los cálculos, validaciones o accesos a datos necesitan un modelo de lenguaje.
  4. Probar el comportamiento real, no solamente el código. Los datos simulados, las pruebas automatizadas, las trazas y la ejecución en Preview permiten detectar problemas diferentes.
  5. Considerar la gobernanza un requisito técnico. La autenticación, autorización, limitación de herramientas y supervisión humana deben formar parte del diseño desde el principio.

¿Qué viene después?

He obtenido la certificación SAP Certified – Joule Studio Developer, sumando un nuevo paso en mi trayectoria con SAP BTP y SAP Business AI.

Personalmente, una de las oportunidades que más me interesan es combinar Joule Studio con SAP Integration Suite, MCP y APIs empresariales.

Las integraciones permiten acceder a las capacidades de negocio. Los agentes de IA hacen posible utilizarlas mediante lenguaje natural y orquestación inteligente.

El verdadero valor aparece cuando combinamos ambos enfoques con seguridad, fiabilidad y responsabilidades bien definidas.

El futuro de la IA empresarial no consiste simplemente en crear más agentes, sino en construir agentes capaces de participar de forma segura en procesos de negocio reales.

From integrations to AI agents

Most of my work with SAP BTP has focused on integration: connecting systems, exposing APIs, transforming data, and making business processes communicate reliably.

More recently, I've been exploring how AI agents can consume those integrations through protocols such as Model Context Protocol (MCP).

Joule Studio adds another layer to that architecture.

SAP Joule Studio: a new conversation with Joule
Joule Studio: starting a new conversation with Joule.

Instead of simply exposing an API or building an integration flow, we can design agents that understand a business request, retrieve relevant information, apply business logic, and generate recommendations.

The interesting part is not just the language model. It's how the agent connects to enterprise capabilities and operates within defined business and security boundaries.

To explore this approach, I worked on two different scenarios: building a custom agent and extending an existing SAP-delivered agent.

1. Building a Customer Billing Review Agent

The first scenario focused on accounts receivable.

Imagine a billing specialist who needs to review a customer's payment behavior. Normally, this involves checking invoices, identifying overdue payments, reviewing the customer's contract, and comparing actual payment behavior against agreed terms.

I built a Customer Billing Review Agent using Joule Studio to bring that information together.

Intent summary of the Customer Billing Review Agent in Joule Studio: business challenge, success criteria and key milestones
The agent's intent summary: business challenge, success criteria and key milestones. On the left, Solution Progress tracks the intent, requirements, specifications and solution artifacts.

The agent was designed around two business capabilities:

  • Customer Billing Information: Retrieve invoices, outstanding balances, and payment history.
  • Contract Information: Retrieve agreed payment terms, discounts, and late-payment conditions.

One important design decision was selective tool usage.

If a user asks only about invoices, the agent should retrieve billing information. If the question concerns contractual terms, it should use the contract capability. A complete billing review requires both.

The expected result is a structured summary explaining discrepancies and recommending next steps.

A practical example

Using simulated business data, I reviewed a customer with five invoices, including three late payments and one overdue invoice.

The customer had Net 30 payment terms.

Joule Studio File Explorer with mcp-mock.json, the simulated Customer Billing Information MCP server
The simulated data lives in mcp-mock.json, which mocks the Customer Billing Information MCP server: the tool's input schema and its response. Next to it are the agent's code, tests and specification files.

By comparing the billing records with the contract, the solution identified payments made after their due dates and an outstanding balance requiring attention.

The goal was not to automatically start collections or change invoices. It was to give the billing specialist a clear picture of the situation.

What I learned about agent design

A conversational agent is only useful if it can reliably retrieve the correct data.

During development, I worked through customer identification, capability selection, tool orchestration, dependency compatibility, and execution errors.

One lesson was especially relevant: not every step in an AI workflow needs an LLM call.

Customer identification, deterministic calculations, and data retrieval can often be handled by code and existing tools. The language model can then focus on interpretation, explanations, and recommendations.

This architecture can reduce unnecessary inference calls and make the workflow easier to test.

I also found that passing automated tests does not guarantee that an agent will behave correctly in the actual runtime. Preview testing exposed problems that isolated tests had not caught.

Preview with Mock Data in Joule Studio: the agent connected to simulated data before deployment
Preview with Mock Data: chatting with the agent before deployment, connected to simulated data.

For the complete review scenario, the Preview environment continued to return an AI connection error. I implemented a clearly labeled, mock-only fallback that generated the summary from retrieved simulated data. This validated the data comparison and reporting path, but not a successful end-to-end LLM inference.

That distinction matters when evaluating an agent's readiness for production.

2. Extending the SAP Financial Closing Assistant

The second scenario introduced a different approach: extending an existing agent instead of building a new one.

SAP provides business agents designed around specific processes. With Joule Studio, developers can add customer-specific logic while preserving the original capabilities.

I worked with the SAP Financial Closing Assistant and created an extension to identify and prioritize financial closing issues.

The extension added three escalation categories:

Category Business condition
Critical Posting errors involving amounts above €100,000
Urgent Incomplete closing tasks with fewer than four hours before the deadline
Flag Overdue tasks that block downstream activities

The extension evaluates the rules independently, so an issue can receive more than one label.

It then produces a prioritized summary with document or task references, reasons for escalation, and recommended next steps.

Why extend an existing agent?

The main advantage is reuse.

The Financial Closing Assistant already has a defined business purpose and existing capabilities. The extension adds the specific behavior needed by the organization without rebuilding the entire agent.

In this implementation, the new behavior was defined through an instruction-based extension, without adding new MCP servers or workflow hooks.

That also introduces an important maintenance consideration: when the underlying SAP agent changes, custom extensions should be reviewed and tested for compatibility.

3. Governance is part of the architecture

One principle was common to both solutions: read-only by design.

The billing agent can analyze invoices and contracts, but it cannot modify them, apply credits, or initiate collections.

The financial closing extension can identify critical issues, but it cannot create journal entries, approve tasks, or change closing schedules.

These limitations are not secondary features. They define what the solutions are allowed to do.

In enterprise AI, especially in finance, an incorrect automated action may affect financial records, compliance, or auditability.

For that reason, a practical agent architecture needs several layers of control:

  • Clear business scope and ownership.
  • Restricted access to tools and data.
  • Explicit rules for prohibited operations.
  • Observability and execution logs.
  • Human approval for sensitive actions.

An instruction saying "do not modify data" is useful, but it should not be the only security control. Tool permissions and backend authorization must enforce the same restriction.

Responsible autonomy means automating the right activities, not removing control from the process.

Manage view of the agent in Joule Studio: ownership, lifecycle management and monitoring
The Manage view of the billing agent: ownership (line of business and product), lifecycle (deployment and versions) and monitoring of runs and failures. The agent is not deployed: it was tested in Preview with mock data.

4. Where MCP, A2A, and SAP AI Agent Hub fit

Working with Joule Studio also helped me connect different parts of SAP's agentic AI architecture.

MCP: Agents using enterprise tools

Model Context Protocol provides a standardized way for agents to discover and use external tools.

For example, an agent might retrieve financial information from an SAP system through a governed MCP capability.

This is closely related to my previous work exposing SAP Integration Suite APIs as MCP tools.

A2A: Agents collaborating with other agents

Agent2Agent addresses a different problem: communication and collaboration between agents.

Instead of a single agent performing every task, specialized agents can coordinate activities across processes or technology platforms.

In simple terms:

MCP connects agents with tools. A2A connects agents with other agents.

SAP AI Agent Hub: Enterprise governance

As organizations introduce more agents across finance, procurement, HR, and other departments, governance becomes increasingly important.

A central management layer helps organizations maintain visibility over their agent landscape, understand ownership, monitor behavior, and manage lifecycle and operational controls.

The challenge shifts from simply creating agents to operating them reliably at enterprise scale.

5. My main takeaways

After working with both custom agents and extensions, these are the lessons I would highlight:

  1. Start with the business process, not the prompt. A good agent needs a clear objective, the correct data, and measurable business value.
  2. Reuse existing capabilities whenever possible. Extending an SAP-delivered agent can be more efficient than recreating its functionality.
  3. Keep deterministic logic deterministic. Not every calculation, validation, or data lookup should require a language model.
  4. Test runtime behavior, not just code. Mock data, automated tests, tool traces, and Preview execution reveal different classes of problems.
  5. Treat governance as a technical requirement. Authentication, authorization, tool restrictions, and human oversight are essential parts of enterprise agent design.

What's next?

I've now earned the SAP Certified – Joule Studio Developer certification, adding another milestone to my SAP BTP and Business AI journey.

For me, the most interesting opportunity is combining Joule Studio with SAP Integration Suite, MCP, and enterprise APIs.

Integration makes business capabilities accessible. Agentic AI makes those capabilities easier to use through natural-language interactions and intelligent orchestration.

The real value will come from combining both approaches with security, reliability, and clear business ownership.

The future of enterprise AI is not simply about building more agents. It's about building agents that can safely operate within real business processes.

Keep reading

End-to-End Principal Propagation for AI Agents with SAP Integration Suite, MCP and SAP Cloud Connector

End-to-End Principal Propagation for AI Agents with SAP Integration Suite, MCP and SAP Cloud Connector

From SAP Integration Suite iFlow to MCP Tools: Exposing OData APIs to AI Agents

From SAP Integration Suite iFlow to MCP Tools: Exposing OData APIs to AI Agents

SAP Integration Suite and MCP: turning APIs into governed AI tools

SAP Integration Suite and MCP: turning APIs into governed AI tools

More articles on integration, SAP BTP and AI

Explore other entries with a practical focus on integration, automation and SAP technology.

See more posts → Contact