Tuesday, June 9, 2026

#1145 - Anomaly Detection for OIC Instance Flows

Introduction 

A customer is asking for the following -  anomaly detection capability to monitor integration runtimes and
identify performance degradation trends across a group of integrations.

Here is a simple solution, based on an Agent, leveraging the OIC factory api.

OIC Factory API 

I use the following api - 

I test it out on the following simple integration from my project AA-Anomaly-Detection - 

This create order integration is simply a stub, the only logic being to execute a WAIT of 20 seconds on orderNr 310138.

This is how I will generate an anomaly or 2.

I execute this integration a couple of times, including once with the orderNr 310138. I then execute the api in postman - 
As you can see, the response contains fields such as - creationDate, instanceId, integrationId, duration etc. 

The duration field gives us the execution time.

OIC Agent Tool

I create an integration that invokes the OIC Factory api, that we just covered.

This is then exposed as a tool.

This integration has the following request payload - 

The response is set to the result I receive in postman.

OIC Agent

The agent uses the tool we've just discussed. Its configuration is as follows - 

I now execute the create order integration a couple of times - 

I now run the agent - 

I edit the prompt to also include the overall number of flows and then re-run the agent - 


Looks good! Now let's add another integration to the mix.

This also includes the WAIT of 30 secs on orderNr 310138.

I amend the agent guidelines as follows - 

I update the template - 

I run the create order integration 3 times, the update order  run 5 times. Each has an anomaly.

Summa Summarum

This is a simple demo, which I could improve on. For example, I could include a scheduled integration that runs every nn hours. This could invoke the agent via the OIC AI Agent Native action. I could also include a Notification tool - based on a simple integration that sends the output via email to all interested parties.