[[{“value”:”
- Unified Joule is set up and integrated with SAP Work Zone.
- Joule Studio CLI is installed and authenticated.
- SAP Cloud Foundry CLI is installed.
joule-capability/ folder in your project with the following files.
joule-capability/functions/call_agent.yamlparameters:
– name: contextId
optional: true
– name: taskId
optional: true
action_groups:
– actions:
– type: status-update
message: <? “Processing your delivery request…” ?>
– type: agent-request
agent_type: remote
system_alias: OutboundDeliveryAgent
body: >
<? (contextId == null || contextId.isEmpty()) && (taskId == null || taskId.isEmpty())
? null
: ‘{ “contextId”: “‘ + contextId + ‘”, “taskId”: “‘ + taskId + ‘” }’ ?>
result_variable: result
– type: set-variables
variables:
– name: contextId
value: <? result.body.contextId ?>
– name: taskId
value: <? result.body.id ?>
– type: message
message:
type: text
content: “<? result.body.status.message.parts[0].text ?>”
markdown: true
result:
contextId: “<? contextId ?>”
taskId: “<? taskId ?>”
joule-capability/scenarios/invoke_agent.yamldescription: >
Invoke this agent for anything related to SAP S/4HANA outbound deliveries.
Call this when the user asks to look up delivery documents, check delivery
items, create a new outbound delivery, or query the status of a shipment.
Examples: “Show me the outbound deliveries for shipping point 1000”,
“What items are in delivery 80000012?”,
“Create a delivery from sales order 5000001”,
“List all deliveries for this week”.
target:
type: function
name: call_agent
parameters:
– name: contextId
value: $capability_context.contextId
– name: taskId
value: $capability_context.taskId
capability_context:
– name: contextId
value: $target_result.contextId
– name: taskId
value: $target_result.taskId
joule-capability/capability_context.yamlvariables:
– name: contextId
– name: taskId
joule-capability/capability.sapdas.yamlschema_version: 3.28.0
metadata:
namespace: joule.ext
name: capagents4_a2a
version: 1.0.0
display_name: “Outbound Delivery Agent”
description: An A2A agent for managing SAP S/4HANA outbound deliveries. Handles querying delivery documents, delivery items, and creating new outbound deliveries.
system_aliases:
OutboundDeliveryAgent:
destination: capa2as4
joule-capability/da.sapdas.yamlschema_version: 1.4.0
name: capagents4_a2a
capabilities:
– type: local
folder: ./
joule login –apiurl “<joule url>” -a “<ias url>” -c “<client id>” -s “<client secret>” –username “<user name>” –store-password –no-app-tid
joule deploy -c joule-capability/da.sapdas.yaml
joule list
joule launch
joule update “sap_digital_assistant” –capability-file joule-capability/capability.sapdas.yaml
“}]]
[[{“value”:”Overview In my previous blog Build a Pro-Code A2A Agent for SAP S/4HANA Cloud with the CAP Agent Plugin (Node.js), we deployed a pro-code CAP agent to SAP Cloud Foundry. This article shows how to surface that agent inside Joule — SAP’s AI copilot — which is integrated with SAP Work Zone. PrerequisitesUnified Joule is set up and integrated with SAP Work Zone.Joule Studio CLI is installed and authenticated.SAP Cloud Foundry CLI is installed. Procedure Step 1 — Create a BTP Destination for the CAP A2A Agent In your BTP sub-account, create a destination that points to the deployed pro-code CAP A2A Agent service URL. Step 2 — Build the Joule Pro-Code Capability Create a joule-capability/ folder in your project with the following files. joule-capability/functions/call_agent.yamlparameters:
– name: contextId
optional: true
– name: taskId
optional: true
action_groups:
– actions:
– type: status-update
message: <? “Processing your delivery request…” ?>
– type: agent-request
agent_type: remote
system_alias: OutboundDeliveryAgent
body: >
<? (contextId == null || contextId.isEmpty()) && (taskId == null || taskId.isEmpty())
? null
: ‘{ “contextId”: “‘ + contextId + ‘”, “taskId”: “‘ + taskId + ‘” }’ ?>
result_variable: result
– type: set-variables
variables:
– name: contextId
value: <? result.body.contextId ?>
– name: taskId
value: <? result.body.id ?>
– type: message
message:
type: text
content: “<? result.body.status.message.parts[0].text ?>”
markdown: true
result:
contextId: “<? contextId ?>”
taskId: “<? taskId ?>” joule-capability/scenarios/invoke_agent.yamldescription: >
Invoke this agent for anything related to SAP S/4HANA outbound deliveries.
Call this when the user asks to look up delivery documents, check delivery
items, create a new outbound delivery, or query the status of a shipment.
Examples: “Show me the outbound deliveries for shipping point 1000”,
“What items are in delivery 80000012?”,
“Create a delivery from sales order 5000001”,
“List all deliveries for this week”.
target:
type: function
name: call_agent
parameters:
– name: contextId
value: $capability_context.contextId
– name: taskId
value: $capability_context.taskId
capability_context:
– name: contextId
value: $target_result.contextId
– name: taskId
value: $target_result.taskId joule-capability/capability_context.yamlvariables:
– name: contextId
– name: taskId joule-capability/capability.sapdas.yamlschema_version: 3.28.0
metadata:
namespace: joule.ext
name: capagents4_a2a
version: 1.0.0
display_name: “Outbound Delivery Agent”
description: An A2A agent for managing SAP S/4HANA outbound deliveries. Handles querying delivery documents, delivery items, and creating new outbound deliveries.
system_aliases:
OutboundDeliveryAgent:
destination: capa2as4 joule-capability/da.sapdas.yamlschema_version: 1.4.0
name: capagents4_a2a
capabilities:
– type: local
folder: ./ Step 3 — Deploy the Joule Capability Log in with the Joule CLI and deploy the capability:joule login –apiurl “<joule url>” -a “<ias url>” -c “<client id>” -s “<client secret>” –username “<user name>” –store-password –no-app-tid
joule deploy -c joule-capability/da.sapdas.yaml Step 4 — Test the Deployed Capability List deployed capabilities and launch a local test session:joule list
joule launch Step 5 — Integrate the Capability with Unified Joule in SAP Work Zone Update the SAP Digital Assistant with the new capability:joule update “sap_digital_assistant” –capability-file joule-capability/capability.sapdas.yaml Step 6 — Test the Agent in SAP Work Zone Open Joule in SAP Work Zone and interact with the outbound delivery agent. The End! Thanks for your time! Jacky Liu”}]] Read More Technology Blog Posts by SAP articles
#SAPCHANNEL