Building Joule agents with AI-Assistance

Objective

After completing this lesson, you will be able to explain how to use AI-Assistance within Joule studio to create Joule agents.

Using AI-Assistance in Joule Studio to build Joule agents

Introduction

Imagine you need to quickly create a Joule agent within Joule Studio to automate a specific task. AI-Assistance offers a streamlined approach to building these agents using natural language prompts. Instead of manual configuration, you can define the agent's behavior and capabilities through a conversational interface, allowing for efficient agent development and refinement. This lesson will guide you through using AI-Assistance to create and refine Joule agents, enabling you to leverage the power of conversational AI for agent development.

Accessing AI-Assistance

To access AI-Assistance, navigate to the project level within Joule Studio. Once there, look for the AI diamond icon, which activates the Joule co-pilot interface. This is your entry point for interacting with AI-Assistance and building your agent. Think of it as opening a direct line of communication with Joule to bring your agent ideas to life.

AI-assisted agent development

The process of creating an agent with AI-Assistance is iterative and conversational. You'll start with a basic prompt and then refine the agent through subsequent interactions.

Initiating Agent Creation: Begin by prompting AI-Assistance to create your desired agent. Clearly state the agent's purpose. For example, you might instruct AI-Assistance to create a "compensation proposal agent." The more specific you are, the better Joule can understand your needs.

Reviewing the Plan: The AI-Assistance agent will then provide a plan outlining the steps for creating the agent. Carefully review this plan and indicate whether you agree or disagree with it. This is your opportunity to ensure that Joule is on the right track before proceeding.

Observing the Creation Process: Upon agreeing with the plan, AI-Assistance will commence the agent creation process. You can monitor the progress and observe the changes in real-time on the right-hand side of the screen. This allows you to see your agent taking shape as Joule works its magic.

Iterative Refinement: For optimal results, refine your agent iteratively. Start with a basic agent and then use subsequent prompts to improve instructions, add missing details, and fine-tune the agent's behavior. This step-by-step approach allows for greater control and precision in shaping the agent's capabilities. Think of it as sculpting your agent to perfection through a series of carefully crafted prompts.

Best Practices for AI-Assistance

Crafting effective prompts is key to successful agent creation with AI-Assistance. Consider these guidelines to maximize your results:

  • Iterative Approach:Avoid attempting to create the entire agent with a single prompt. Instead, embrace iterative prompting to refine the agent step by step. This allows for a more controlled and nuanced development process.
  • Strategic Keywords:Use specific keywords like "expert," "instruct," and "additional context" to modify the corresponding agent properties. These keywords act as signals to Joule, guiding it to the specific areas you want to adjust.
  • Explicit Instructions: Clearly specify the toolset you want to use, including Joule skills, documents, and calculator tools. The more explicit you are, the less ambiguity there will be for Joule.
  • Document Tool Considerations: For document tools, remember that you need to provide the resource group ID from AI Core. You cannot directly upload documents within AI-Assistance. This is a current limitation to keep in mind.
  • Learning from Examples: Utilize existing examples, such as the maintenance agent use case, to understand how to structure your prompts and achieve desired outcomes. These examples can serve as a valuable starting point for your own agent development.

Limitations and Constraints

While AI-Assistance offers a powerful way to create Joule agents, it's important to be aware of its current limitations:

  • Focus on Joule Agents:AI-Assistance is currently designed specifically for creating Joule agents. It cannot be used to create other SAP Build projects like process automation processes or build code applications.
  • Pre-existing Tool Requirement: All required tools, including Joule skills, need to be created beforehand. AI-Assistance cannot create these tools on the fly. You need to have your building blocks in place before you start constructing your agent.
  • MCP Server Configuration: MCP servers need to be configured manually without AI-Assistance. This means you'll need to set up these external connections separately.

Example Prompts

Here are some example prompts for creating a maintenance agent, demonstrating how to leverage AI-Assistance effectively:

  • "Create an agent that is able to validate maintenance orders, check material stock, and recommend actions to ensure fulfillment. Include all available skills and use all the information you have (from the description and skills) to formulate expertise, fully describe the process in instructions and additional context."
  • "Update the current instructions (process etc.) of the Maintenance Fulfillment Agent to be highly detailed in each step. This includes requesting the order ID if not given by the user, then extracting all information about the order including its operations. For each operation the components shall be extracted and verified by analyzing stock levels and details like open purchase orders, blocks etc. A fulfillment decision should be made depending on the analysis with a full explanation."
  • "Add at the relevant parts of the instructions of the Maintenance Fulfillment Agent the following notes: maintenance order ids can be given in different ways (order id, maintenance order, …); if none is given use 1 as default; keep in mind the details of required components such as quantity etc.; in the fulfillment decision it must be mentioned all necessary information such as which materials are missing, how much, reasons etc. and actionable suggestions how to resolve (e.g. alternatives) and impact must be explained when blocked."
  • "Reformulate the initial instructions of the maintenance fulfillment agent to be more detailed but keep all of its current content."

Key Considerations

  • Focused Scope: AI-Assistance is dedicated to creating and testing custom Joule Agents.
  • Design-Time Configuration: All tools must be configured in Joule Studio before running an agent.
  • Document Grounding: Documents must be pre-configured as a knowledge source.
  • MCP Servers: External tools exposed via MCP must be registered within Joule Studio during the design phase.

Summary

AI-Assistance in Joule Studio provides a conversational approach to agent creation, allowing you to define agent behavior through natural language prompts. Successful agent refinement hinges on iterative prompting and the strategic use of keywords to guide the process. While powerful, the current release focuses on Joule agents and requires pre-configured tools and AI Core resource IDs for document grounding. By understanding these best practices and limitations, you can effectively leverage AI-Assistance to build intelligent and automated solutions within Joule Studio.

Further reading

  • SAP Build
  • Joule Studio Documentation