The agent interaction client is intended to be a quick starting point for integrating Enterprise Agents into OnBase Workflow. It's essentially a script that acts as a REST Client with some out of the box functionality to invoke agents. It features some quality of live enhancements such as sending the primary workitem from Workflow to Knowledge Enrichments to get the markdown for a document to be used as an input for the Agent.
Download and Installation
Unzip this file to your Desktop. It should contain: - EXPK File: Agent Builder LC.expk
- FOLDER: AiAgentInteractionClient
Important: This file is available AS-IS and unsupported. The script is using the Agent Builder REST APIs to allow Workflows to interact with Agent Builder. It is intended as an easy starting point. Make sure to test functionality before rolling out any solutions to production.
Importing Example Life Cycle
One option is to import the EXPK file included in the zip file. It will set up a simple life cyle that has all necessary components including the script library.
Most of the time you will interact with content via a timer - This allows for the agent to process content in the background without locking the UI. Some simple use cases where the AI generates responses quick could also be done through an Ad-hoc action or System Task.
The concept of the Interaction Client is rather simple. The script will never have to be modify, it's simply configured through properties
After importing the Life Cycle you will need to go to the Configuration Items and provide your own Client ID / Secrets and Base Endpoints based on the environment you would like to use. The Curation endpoints are optional and only required if you want to use Knowledge Enrichment to convert documents to Markdown for the agent.
Upgrading the Script
The script is inside a DLL that can easily be imported or updated. Simply go to Import Assembly and browse to the file Hyland.OnBase.UnityApi.AiAgentInteractionClient.dll
IMPORTANT: make sure to select 'Replace Existing Assembly' and select the assembly that will be updated- this will make sure that all existing Actions will automatically use the updated version of the script.
Configuration
The script was set up in a way that you can simply copy and paste it anywhere where you would like to insert an agent. It's configured via properties so that the script itself never needs to be modified.
propAiAgentID
The first property that MUST always be set is the propAiAgentId. This will tell the script which agent to invoke. NOTE: Currently the script will always execute the LATEST version of the agent. So every time you deploy an agent, the Workflow will grab the latest version. No Reset needed.
The agent version of your agent is the first GUID in the URL in the builder after /agent/
propAiResponseMappings
The next property that is required is propAIResponseMappings. This will map the OUTCOMES of an Agent to properties in Workflow. These properties can then be used like any other property to drive the Workflow. I.e. the agent can make the decision to which queue a document should be routed to. If you have an Outcome 'NextQueue' and you set a property to that value, it allows you to easily transition the document using the property value.
propInputParam_InputName
This allows to set properties that will be passed as an input to the Agent. The value after the underscore must match the name of the input on the agent. For example: propInputParam_Current_Denial_Document.
This allows for a powerful way to compile context for an agent. You can set properties to pretty much any value, including data from forms or WorkView objects. For example using the 'template' feature (Set multiple Property Values from WorkView) allows you to include data from the current WorkView objects as well as parent/child data or filter results. This makes processing WorkView data via Enterprise Agents a breeze (which also includes integration points like external classes, LOB etc.)
Integration with Knowledge Enrichment / Data Curation
Agents currently only accept text inputs. That means any conversion of documents to text has to happen prior to executing the Agent (IDP, OCR, Knowledge Enrichment etc.) so the text can be passed as on input to the agent. Using the constant value <primary-doc-id> for a property, will take the work item in workflow, send it to data curation and automatically get back the Markdown for that document, which is the ideal format for the Agent to work with.