Quickstart #3: Basic Process Agent
Learning Objectives
This Quickstart guide will walk you through the steps of creating a Process Agent to help users navigate submitting purchase requests. In this guide, youβll get to see a few concepts in action as you learn how to:
- Leverage a Decision Policy to control branching logic in a Conversational Process.
- Use multiple types of Activities in a Conversational Process to handle different tasks.
- Design a Plugin that involves more Slots (with simple Validation Policies).
Prerequisites
- Access to the βAgent Studioβ App.
- Completed Quickstart #1: Basic Task Agent.
What youβll build
Today, we will be building a Purchase Request (PR) Submission Process Agent. This Agent will ask the end user details about the particular PR they want to submit, compare the details against historical PRs, and either submit it if it can be labeled as βOpExβ or reject it if itβs considered βCapExβ.
Here is an example of the end-user experience we hope to enable:

In order to build this, hereβs one way to decompose the process into a Conversational Process, consisting of a few Activities (both Action-based and Content-based), a Decision Policy, and a few Slots to power the data needed in this process:

In this guide, youβll work your way through these main phases:
- Set up 2 (HTTP)Actions: one to fetch historical PRs, and another to Submit a PR.
- Build the Conversational Process, complete with 4 Slots, 5 different Activities, 1 Decision Policy, as illustrated above.
- Add the Conversational Process to your AI Agent by launching a Plugin.
Letβs get started!
Phase 0: Generate a unique Session ID & Set up your Connector
βοΈ Import building notes if you are using the Moveworks Developer Labs environment
- If you are working in a Moveworks lab environment, name anything you save (Plugin, Action, Data Type, etc.) with
<fullname>_<descriptive_name>
- For example:
lucasrollo_Submit_PTO_Action- When launching your Plugin, make sure to only launch to yourself! You can do this by going to Your Plugin > Launch Configuration > Allow Selected Users > the email on your credential card
You may be able to skip this phase if youβve completed another Agent Studio Quickstart guide.
You can skip Phase 0 and move onto Phase 1A if:
- You have already created a
firstname_lastname_moveworks_purpleconnector, AND - You already have your unique βSession IDβ on hand.
This section will walk you through how to set up your own connector to the Moveworks Purple API (which powers the Actions used in the Quickstart guides), so no need to repeat this step if youβve done it before.
In this guide, youβll build a Plugin that will actually fetch from and take action on a store of feature requests thatβs set up just for you. In preparation for this, follow these steps
- Go to the Moveworks Purple API Tool.
- Click βCreate New Session IDβ. You should see sample feature requests populate below.
- Copy your Session ID to your own notes. Youβll to have this on hand in the following phase when we set up your Actions.
Now, you just need to set up a (reusable) connector that will allow you to seamlessly hit the necessary Actions that your Plugin will use.
-
Navigate to the App Picker in the top right corner of Agent Studio.
-
Click on βHTTP Connectorsβ, which will take you to another browser tab.
-
Click βCreateβ in the top right corner.
-
Fill out the following information for your Connector (be sure to replace βfirstnameβ and βlastnameβ with your corresponding information).
-
Click βSaveβ on the bottom right corner.
π Youβre now fully ready to start building. On to Phase 1 to set up your Actions!
Before you proceed, make sure youβve copied your Session ID somewhere you can access soon.
Phase 1A: Set up your βGet Historical Purchasesβ Action
βοΈ Import building notes if you are using the Moveworks Developer Labs environment
- If you are working in a Moveworks lab environment, name anything you save (Plugin, Action, Data Type, etc.) with
<fullname>_<descriptive_name>
- For example:
lucasrollo_Submit_PTO_Action- When launching your Plugin, make sure to only launch to yourself! You can do this by going to Your Plugin > Launch Configuration > Allow Selected Users > the email on your credential card
Letβs first set up an HTTP Action that will retrieve historical PRs. This Action doesnβt require any dynamic inputs, and will just query an external system for a list of purchase requests.
-
Navigate to the App Picker in the top right corner. Click on βAgent Studioβ.

-
Navigate to a new HTTP Action.

-
Set the following title and description for your Action (be sure to replace βfirstnameβ and βlastnameβ with your corresponding information).
-
Enter the details of your API:
-
Click on the βImportβ icon to the right of the βTESTβ button.

-
Paste the following cURL command:
cURL -
Click βImportβ (your Action should now be auto-populated with details).
-
-
Navigate to the βConnectorβ tab, and select your existing Moveworks Purple Connector (set up in Phase 0).

-
Test your Action:
-
Click on the βTESTβ icon (to the right of the endpoint URL definition).
-
Inspect the Console to verify that you receive a successful response:

-
-
Hit βPublishβ.
π Youβve just set up 1 out of 2 custom Actions needed for this process!
This Action will fetch the critical history of past purchase requests (that later youβll compare a userβs new request against). Next up: setting up an action to actually submit new purchase requests.
Phase 1B: Set up your βSubmit Purchase Requestβ Action
βοΈ Import building notes if you are using the Moveworks Developer Labs environment
- If you are working in a Moveworks lab environment, name anything you save (Plugin, Action, Data Type, etc.) with
<fullname>_<descriptive_name>
- For example:
lucasrollo_Submit_PTO_Action- When launching your Plugin, make sure to only launch to yourself! You can do this by going to Your Plugin > Launch Configuration > Allow Selected Users > the email on your credential card
The next (and final) Action to set up will add a new purchase request object (and will actually update the purchase record database in your personal session!). This Action will require three dynamic inputs: item_name, quantity, and justification.
-
Navigate to a new HTTP Action.
-
Set the following title and description for your Action (be sure to replace βfirstnameβ and βlastnameβ with your corresponding information).
-
Enter the details of your API:
-
Click on the import button to the right of the βTESTβ button.

-
Find the same Session ID that you created & copied from Phase 0 β youβll use it in the next step.
-
Paste (donβt click βImportβ yet) the following almost-ready cURL command:
cURL -
Replace
YOUR_SESSION_ID(scroll all the way to the right to find it at the end of the URL) in the pasted command with your actual Session ID. -
Click βImportβ (your Action should now be auto-populated with details).
-
-
Navigate to the βConnectorβ tab, and select your existing Moveworks Purple Connector (set up in Phase 0).

-
Define 3 formal input arguments to represent the βitem nameβ, and βquantityβ, and βbusiness justificationβ inputs that this Action requires:
-
Click on the βInput Argsβ button near the top right corner.
-
Click βCreate Newβ in the βInput Argumentsβ pop up.
-
Fill out the following details for your
item_nameargument: -
Hit βSaveβ.
-
Click βCreate Newβ again in the βInput Argumentsβ pop up.
-
Fill out the following details for your
quantityargument: -
Hit βSaveβ.
-
Click βCreate Newβ again in the βInput Argumentsβ pop up.
-
Fill out the following details for your
justificationargument: -
Hit βSaveβ and hit the βXβ icon to close this βInput Argumentsβ pop up.
-
-
Test your Action:
-
Click on the βTESTβ icon (to the right of the endpoint URL definition).
-
Inspect the Console to verify that you receive a successful response:

-
-
Hit βPublishβ.
π Nice, your Actions are all set up and ready to go!
Time to construct your Conversational Process.
Phase 2: Build your Conversational Process
βοΈ Import building notes if you are using the Moveworks Developer Labs environment
- If you are working in a Moveworks lab environment, name anything you save (Plugin, Action, Data Type, etc.) with
<fullname>_<descriptive_name>
- For example:
lucasrollo_Submit_PTO_Action- When launching your Plugin, make sure to only launch to yourself! You can do this by going to Your Plugin > Launch Configuration > Allow Selected Users > the email on your credential card
Hereβs a reminder of the birdβs eye view for this Submit Procurement Purchase Request Conversational Process:

Letβs build it!
-
Navigate to a new Conversational Process (navigate to the library and click βCreateβ).

-
Set the following title and description for your Conversational Process (be sure to replace βfirstnameβ and βlastnameβ with your corresponding information).
-
Add the FOUR Slots that this process will need:
item_name,quantity,business_justification, andis_purchase_for_organization_acknowledgement. π Learn more about Slots.-
Click on the βSlotsβ button near the top right corner of the editor.

-
Click βCreate Newβ in the βSlotsβ pop up.
-
Fill out the following details for your first
item_nameSlot: -
Hit βSaveβ (scroll to the bottom of the popup).
-
Click βCreate Newβ again in the βSlotsβ pop up to build your second Slot.
-
Fill out the following details for your
business_justificationSlot: -
Hit βSaveβ (scroll to the bottom of the popup).
-
Click βCreate Newβ again in the βSlotsβ pop up to build your third Slot.
-
Fill out the following details for your
quantitySlot: -
Hit βSaveβ (scroll to the bottom of the popup).
-
Click βCreate Newβ again in the βSlotsβ pop up to build your fourth and final Slot.
-
Fill out the following details for your
is_purchase_for_organization_acknowledgementSlot: -
Hit βSaveβ (scroll to the bottom of the popup) and hit the βXβ icon to close this βSlotsβ pop up.
-
-
Build the first Action Activity that fetch a list of historical purchase requests that the process will later compare against. π Learn more about Activities.
-
Click on the β+ Add a block to your processβ button in the main section of the editor.
-
Click on βAction Activityβ.

-
Fill out the following details for your Action Activity, which simply hooks up the Action you created to this Action Activity:
-
-
Build the second Action Activity, which will utilize a Built-in Action that can generate an output according to a natural language prompt. π Learn more about the Built-in Generate Text Action.
-
Click on the β+β icon below the previous Activity in the main section of the Conversational Process Editor.
-
Click on βAction Activityβ.
-
Fill out the following details for your Action Activity, which mostly involves constructing a templated prompt to the Action, and mapping the predicted PR classification out of the modelβs response:
-
-
Build your first Decision Policy, which will execute after the already configured 2 Activity blocks. This policy will allow the Process to branch its execution depending on the
pr_classificationreturned by the generate text Action Activity. π Learn more about Decision Policies.-
Click on the β+β square icon below the second generate text Activity in the main section of the Conversational Process Editor.
-
Click on βDecision Policyβ. (No need to input anything in the panel that appears on the right).

-
Increment the number of Cases by clicking on the β+β button to the right of the words β1 caseβ.

-
Click on the first Case entry under the Decision Policy and enter the below DSL rule in the panel that appears on the right:
DSL -
Click on the second Case entry under the Decision Policy and enter the below DSL rule in the panel that appears on the right:

-
-
Create the Action Activity that will execute under the first Decision Policy Case (
pr_classificationisopex).-
Click on the β+β icon below the first Case entry under the Decision Policy.

-
Select βAction Activityβ.
-
Fill out the following details for your Action Activity, which will connect your slots to the input(s) of the HTTP Action (and mapping the result of the Action back to the Conversational Process).
- Note that even though
is_purchase_for_organization_acknowledgementis not technically needed to invoke the submit pr action, marking it as a required Slot for this Activity ensures that the AI Agent will ensure it fills the Slot before executing this Activity.
- Note that even though
-
-
Create the Content Activity that will execute under the second Decision Policy Case (
pr_classificationiscapex).-
Click on the β+β icon below the second Case entry under the Decision Policy.
-
Select βContent Activityβ this time.

-
Keep the βContent Typeβ set to βTextβ.
-
Paste the following text content (which will share text instructions with the user on how to submit purchase requests that fall under CapEx).
Text Content
-
-
Create the Content Activity that will execute under the
defaultbranch (whenpr_classificationsomehow is neitheropexnorcapex).- Click on the β+β icon below the second Case entry under the Decision Policy.
- Select βContent Activityβ again.
- Keep the βContent Typeβ set to βTextβ.
- Paste the following text content (which will share text instructions with the user on how to submit purchase requests that fall under CapEx).
Text Content
-
Click βValidateβ. If everything went well so far, the Console (bottom of the editor) will say βValidation successfulβ.
-
π‘Pro-tip: You can also use the following hotkeys to validate without pressing the button:
-
-
Click βPublishβ, review details, and Click βPublishβ once again.
π Congratulations! Youβve just built the main part of this Plugin: the Conversational Process.
Way to stick through all the steps! Weβre ready for the last phase: now youβll launch a Plugin β this packages the Conversational Process into a tool that your AI Agent can use directly.
Phase 3: Launch a Plugin
βοΈ Import building notes if you are using the Moveworks Developer Labs environment
- If you are working in a Moveworks lab environment, name anything you save (Plugin, Action, Data Type, etc.) with
<fullname>_<descriptive_name>
- For example:
lucasrollo_Submit_PTO_Action- When launching your Plugin, make sure to only launch to yourself! You can do this by going to Your Plugin > Launch Configuration > Allow Selected Users > the email on your credential card
Itβs finally time to add your Conversational Process to a Plugin, where you can control the Triggering scenarios of your Plugin and specify which end users are allowed to use your Plugin.
-
Navigate to a new Plugin (navigate to the library and click βCreateβ).

-
Set the following title and description for your Plugin (be sure to replace βfirstnameβ and βlastnameβ with your corresponding information).
-
Define a Conversational Trigger. π Learn more about Natural Language Triggers.
-
Click on βDefine a triggerβ.
-
In the panel that appears on the right, either:
-
Approve (click βTriggerβ) 5 of the auto-generated suggested positive examples, or
-
Add the following recommended utterances:
-
-
-
Choose your Conversational Process (the one you built in Phase 2).
- Click on βSet a processβ.
- In the panel that appears on the right, search for and select the Conversational Process that you built in Phase 2 (should be named
firstname_lastname_support_procurement_purchases_process)
-
Define your Launch Configuration.
-
Navigate to the βLaunch Configurationβ tab.

-
In the Input field under βAllow selected usersβ, enter your email (or multiple emails using commas to separate the email addresses).

-
-
Click βPublishβ to launch your Plugin.
π Woohoo! Youβve finished building your Plugin β time to try it out!
Use one of your triggering examples (e.g. βsubmit purchase requestβ) to access the Plugin in conversation. Try refreshing your submitted purchase requests tab in your Moveworks Purple API session to see the updates take effect in real time!
Reflecting on this Plugin
The Plugin you just built contains a plethora of Agent Studio concepts, from different Activity types to Decision Policies. Thereβs a lot it had to take care of as a Process Agent:
- Retrieve historical purchases from an external source.
- Perform classification on the fly to figure out how to categorize the userβs intended purchase.
- Make an informed decision on the best way to support the request, depending on the predicted classification.
- Collect critical information thatβs needed for submitting a purchase request.
- Executes for the right users at the right moments via Triggering and Launch configurations youβve set up.
Congratulations on building this powerful Process Agent β itβs now ready to help support users with their procurement purchase needs!