Friday, April 10, 2026

#1135 - OIC Agents & Human in the Loop (HITL)

Introduction

So what is this? - from ORCL help center - 

Human-in-the-Loop (HITL) in Oracle Integration Cloud (OIC) is a functionality that enables, manages, and automates human interaction with agentic AI workflows. It allows for the integration of human judgment, approval, and oversight into automated processes to improve accuracy, safety, and compliance.

For more background, Raison d'ĂȘtre etc. - please check out the detailed post from my esteemed colleague, Stan.

Back to my apocryphal Order Processing agent - we could envisage a corporate rule where orders > $10000 require human approval.

To enable such, we would need - 

  • a UI - some sort of Order Approval form
  • a workflow design - who should approve? within which timeline?
  • the ability to be invoked as a tool
  • the ability to make a callback to the agent e.g. order approved or order rejected.
and that's exactly what we're offering -




Forms

Here we surface the Forms you know and love from Process Automation -


I add the fields from my purchase order and also include a text area for any notes the approver may want to add.
The order fields are marked as Read Only, that's why you don't see text boxes. 

This form will be surfaced via the workflow, which we will now define. Remember to activate the form, before attempting to reference it in the workflow. 


Workflows

Just add the Human Task -
Now configure it - 


As you can see, there are 2 Outcomes available - 
  • Complete, i.e. human task has completed.
  • Approve or Reject - which I will choose.
I configure the other fields -

Now to the Start Event - 
I configure it as follows - 




{"assignee": "niall.commiskey@oracle.com",
"taskTitle" : "Approve Order for NiallC",
"orderNr": "1234",
"customer": "NiallC",
"country": "Ireland",
"product" : "iBike",
"price" : "67890",
"customerEmail" :"xxx@gmail.com"}


 As you can see, the Start Event payload includes the order data, along with the assignee and task title.

These are used in the human task mapper - 

The End Event has been configured as follows - 

The Mapping is as follows - 





Note - this is the callback, i.e. the return of the approvers response to the AI Agent.

The callback url can be viewed here- 


I activate the Workflow - 

and wrap it in an integration - 
This leverages the Human-in-the-loop native action - 


Assign the new tool to the agent, and add the following to the agent guidelines -


#### 2.1.  Human Approval for Large Orders
Use the **Human Approval** tool to get human approval for large orders. Large orders are those with a price > 10000. Wait for the response - if approved then create the order, if rejected, then notify the customer with a relevant email.

I run the integration with the following payload - 


This will trigger the approval human task - 

The Approve Order task is accessed via the Process Workspace



I click APPROVE - 

Back in Project Observability - 

Note the Callback - 

Now to the agent audit trail - 

Summa Summarum

HITL is a great addition to your Agentic AI toolkit, providing as it does, the hook for control and governance. This will improve the accuracy, safety, and compliance of your agentic workflows. 



















Tuesday, March 31, 2026

#1134 OIC Agentic Flows - Design Time and runtime structure

Introduction

Some customers have been asking me about this, which Agentic artefacts do we have and how do they behave at runtime. So let's go!

Agentic AI and OIC Projects

Agents live in projects, agents use tools to do the work, agents may also get human input via Human-in-the-Loop. 

Currently, our tools are integrations - 

One click exposure, it's that simple.

Agents have the following features available - 

Tools, we've already covered. 
Agents can also use Prompt templates, which make it easier for you to enter prompts. Here's an example of one - 

Note the use of {} - these are the variables entered at runtime e.g. 

You can associate 1+ prompt templates with an agent.

An Agent Pattern is the pre-requisite for creating an agent.

As the name suggests, this implements a pattern - currently, with the 26.01 release of OIC, you can select the following pattern - 

























ReAct = Reason & Act.

You can add some guidelines - e.g.

You also need to complete an LLM collection. 

GenAI should be available as your LLM connection target soon, but, as you can see, I'm using OpenAI.

So I've created my pattern, so how does this manifest itself in my project? 

Via an integration - 

This is the component that handles the agent interactions with the LLM.

You can treat this as a blackbox, but, naturally, you can also take a peek - 

but don't get hung up on this; it's just an implementation detail.


Exposing Integrations as Tools

Now back to the Tools - Your app driven integrations can be exposed as tools, and easily consumed by your OIC agent. However, these tools can also be exposed via MCP to 3rd party agents. This is done at project level - 

As a sanity test, you can connect via Postman - 

Try out a tool - 

Validate the response - 
That's our tools exposed and tested. You can now give the MCP server url to your stakeholders, allowing them to invoke OIC tools from their agents.

Running Agents in OIC

Now to our agent - I will run the get future runs prompt - 

Don't worry about the result - 0 future runs found. This is because the schedule is paused - 

I'm interested in what has actually executed; let's check out Project Observability


The integration, Get Future Runs,  has been invoked. Note also, the ReAct Pattern integration has executed, as well as the agent.

All have individual instance ids. Let's check out the activity stream for the agent - 

Here I use the OIC Factory api -

https://design.integration.us-phoenix-1.ocp.oraclecloud.com/ic/api/integration/v1/monitoring/instances/yourInstanceId/activityStreamDetails?type=agent&timezone=Europe%2FBerlin&integrationInstance=yourOICInstance

Here are excerpts from the Postman response - 

Notice the array of content within items -


Finally, we see - status = COMPLETED.

This tells us the instance has completed, i.e. agent has done what it has been assigned to do.









OIC Agent Native Action 

One can invoke agents from an integration using the new native action - 

The configuration of the action is as follows - 

Just give it a name, then select your agent; that's all you need to do. 

This will implicitly invoke the start() operation of the agent. 

Note the Request sample - 

    { "payload" : "", "promptTemplateId" : "", "prompt" : "", "conversationId" : "" }

These fields are what you need to map - 

Project Id and Agent Id identify the agent we want invoked. Prompt is the prompt as per the Run test I did earlier.

So let's try this out - 




 




I check in Observability - 
I invoke the monitoring api in postman for the agent instance id - 

You may posit the question - if I can invoke an agent from an integration, how can I get the response? 

Currently the native action only supports start(), however, this will change with the next release. If you cannot wait until then, use the monitoring api call to retrieve the agent activity stream. You can do this in a WHILE loop, waiting for status to be set to COMPLETED.

What we're missing is the ability to retrieve the agent instance id - we can use the OIC monitoring api to do this - 

https://design.integration.us-phoenix-1.ocp.oraclecloud.com/ic/api/integration/v1/monitoring/instances?q={timewindow:'32d',projectCode:'AA_SCHEDULEJO_AGENT',agentic:'yes'}&integrationInstance=yourOICInstance&orderBy=lastupdateddate&fields=all

This may seem complicated, but it's not really - here's a sample implementation of such - 

I WAIT for 30 secs, after invoking the agent, before retrieving the agent instance id.

I then have a WHILE Loop, where I check for the instance status = COMPLETED.

I then return the last content from the agent - 

Summa Summarum

I hope this post has provided some insight into the mechanics of OIC agent processing. Please feel free to ping me with your comments, ideas, use cases etc.