How to Connect OIC Integrations to Oracle AI Agent Studio

By leveraging the Model Context Protocol (MCP), you can seamlessly turn your Oracle Integration Cloud (OIC) flows into executable tools inside Oracle AI Agent Studio.

Step 1: Configure the MCP Server & Add Integrations
1. Configure MCP server 

Step 2: Create the Tool in AI Agent Studio

Open Tools ->  Click Add button


Select the tool type as MCP and provide tool name, family and product.


Step 3: Set Up Connection & Security

Provide the MCP server URL which is obtained from OIC AI Agent tool, select transport type as "Streamable HTTP" and Token URL and client credentials.

Client Credentials Sample Json:

{
 "grant_type": "client_credentials",
 "scope": "https://XXXX.integration.ocp.oraclecloud.com:443urn:opc:resource:consumer::all",
 "client_id": "DCSDSDSD",
 "client_secret": "SDSDSD"
}

Step 4: Map Integrations & Preview

Select the required integration from the list of added integartions in the OIC tool



You can preview the tool


Pass the tool parameters (OIC integration parameters) and preview.

Read More »
Blogger Tricks
*/

Add OIC Integration to MCP server for Oracle AI Agent Studio

1. Enable MCP server in OIC Projects

View detailed article to enable MCP server here

2. Open OIC Projects, go to AI Agents tab and add tool


3. Add the integration and create tool


4. Add the description and parameteres (OIC Input) and make them as required if any.




Read More »
*/

How to Enable the Model Context Protocol (MCP) Server in OIC and OCI

If you want to expose your Oracle Integration Cloud (OIC) integrations to LLMs and AI agents using the Model Context Protocol (MCP), you need to configure the following things across both OIC and Oracle Cloud Infrastructure (OCI).

 1. Create an Integration in OIC project and activate it


2. Edit the projet settings


3. Enable the MCP server


4. Create OAUTH configuration in OCI for the above MCP server URL


5. With the OAUTH configuration complete, generate the client id and secret. These will be used further to connect MCP server with applications.

Read More »
*/

Extracting Information from Documents Using a Custom Agent in Oracle AI Agent Studio

Oracle AI Agent Studio allows you to create custom AI agents capable of reading unstructured documents and extracting relevant data directly into a structured format.

This article explains how to enable file attachments, configure the necessary tools, and format the extracted data into JSON.

Step 1: Enable the File Upload Option in the Agent Team

Before an agent can process a document, you must provide a way for users to upload files.

  1. Navigate to the Chat Experience tab while creating or editing your AI Agent team.
  2. Locate the Enable file upload setting.
  3. Toggle the option to On. This allows users to attach documents directly within the chat interface.


Step 2: Add the Multi-File Processor Tool

Create a custom agent and follow the steps
  1. Go to the agent configuration settings.
  2. Add the Oracle standard tool "Multi File Processor" to the agent.
  3. This tool processes the uploaded document and makes its textual content accessible to the agent's language model.



Step 3: Define the Agent Persona and Instructions

A well-defined role ensures the agent extracts data accurately and consistently.

  1. Configure the agent's Persona and Role to match the business requirements (for example, a "Purchase Order Data Extraction Specialist").
  2. Write a clear, concise system prompt detailing what data points need to be collected.
  3. Test the agent and refine the instructions if the initial results do not capture all the required information.


Step 4: Configure the JSON Output Schema

To seamlessly integrate the extracted data with downstream applications or databases, the output must be structured.

  1. Define a strict JSON schema within the agent configuration.
  2. Specify the exact keys, data types (such as strings, numbers, or arrays), and mandatory fields you expect in the final output.
  3. This ensures that the agent translates unstructured document text into a clean, predictable JSON object every time.


Sample JSON:


{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "type": "object",
  "properties": {
    "purchase_orders": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "purchase_order_number": { "type": ["string", "null"] },
          "date": { "type": ["string", "null"], "format": "date" },
          "customer_number": { "type": ["string", "null"] },
          "supplier": {
            "type": ["object", "null"],
            "properties": {
              "name": { "type": ["string", "null"] },
              "address_box": { "type": ["string", "null"] },
              "city": { "type": ["string", "null"] },
              "province": { "type": ["string", "null"] },
              "postal_code": { "type": ["string", "null"] }
            },
            "required": ["name", "address_box", "city", "province", "postal_code"]
          },
          "ship_to": {
            "type": ["object", "null"],
            "properties": {
              "organization_name": { "type": ["string", "null"] },
              "branch_name": { "type": ["string", "null"] },
              "address_line": { "type": ["string", "null"] },
              "city": { "type": ["string", "null"] },
              "postal_code": { "type": ["string", "null"] }
            },
            "required": ["organization_name", "branch_name", "address_line", "city", "postal_code"]
          },
          "line_items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "item_code": { "type": ["string", "null"] },
                "quantity": { "type": ["integer", "null"] },
                "price": { "type": ["number", "null"] }
              },
              "required": ["item_code", "quantity", "price"]
            }
          },
          "total_quantity": { "type": ["integer", "null"] },
          "total_price": { "type": ["number", "null"] }
        },
        "required": [
          "purchase_order_number", "date", "customer_number", 
          "supplier", "ship_to", "line_items", "total_quantity", "total_price"
        ]
      }
    }
  }
}
Read More »
*/

How I Automated Getting Webpage Titles from a List of URLs

A while ago, I had a big list of website links saved in an Excel file—over 700 of them! I needed to find out the title of each website. Doing it by hand would mean opening every link, copying the title, and pasting it back into Excel. That would take forever, and I’d probably make mistakes along the way.

The Problem

When you have a lot of data, doing simple, repetitive work by hand is really slow and easy to mess up. It’s boring and you can easily skip a link or copy something wrong.

My Solution: Using Python

So I decided to let my computer do the work for me. Python is a programming language that makes things like this much easier. I wrote a short script that reads all the links from my Excel file, visits each website on its own, grabs the title, and then saves everything back into Excel.

Here’s the script I used:

import pandas as pd
import requests
from bs4 import BeautifulSoup

# Upload your file first in Colab
df = pd.read_excel("/content/AskHareesh/AskHareeshExcel.xlsx")   # assumes your URLs are in a column named 'URL'

titles = []
for url in df['URL']:
    try:
        response = requests.get(url, timeout=10)
        soup = BeautifulSoup(response.text, "html.parser")
        title = soup.title.string if soup.title else "No Title Found"
    except Exception as e:
        title = f"Error: {e}"
    titles.append(title)

df['Title'] = titles
df.to_excel("/content/AskHareesh/AskHareeshExcelTitle.xlsx", index=False)


How to Run the Script (Even If You Don’t Have Python Installed)

You don’t need to install anything on your computer. There’s a website called Google Colab where you can run Python scripts for free:


  1. Go to Google Colab (just search for it online).
  2. Upload your Excel file that has the URLs.
  3. Copy and paste the script above into a cell in the notebook.
  4. Run the code. It will go through all your links and get the webpage titles.
  5. You can then download your updated Excel file with an extra column for the page titles.

Automation can really make life easier!

Read More »
*/

Resolving Key Conversion Error in Oracle Cloud OIC Integration


When running an Oracle Integration Cloud (OIC) integration, you may encounter the following error despite successfully testing and validating the connection:

 <![CDATA[CASDK-0041: An error occurred while invoking the REST endpoint.[[CloudInvocationException [ java.lang.ClassCastException: java.lang.ClassCastException: class org.bouncycastle.asn1.x509.SubjectPublicKeyInfo cannot be cast to class org.bouncycastle.openssl.PEMKeyPair (org.bouncycastle.asn1.x509.SubjectPublicKeyInfo and org.bouncycastle.openssl.PEMKeyPair are in unnamed module of loader 'app') ]]].The 500 Internal Server Error is a very general HTTP status code that means something has gone wrong on the server side, but the target service could not be more specific on what the exact problem is. You can trace the cURL representation of the request sent to the target service from the Oracle Integration Cloud server logs. Try invoking the target service using cURL. If the problem persists, contact the target service admin.]]>



Cause of the Error

This error occurs due to a mismatch in the private key format. The key must be in PEM format for proper authentication.

Solution

Converting the private key to the correct PEM format will resolve this issue. Use the following command to perform the conversion:

ssh-keygen -p -f <KEY> -N '' -t rsa -m pem

Replace <KEY> with the actual private key file name.

Conclusion

If you face this issue in Oracle Cloud OIC, ensure your private key is in the correct PEM format. This simple conversion step can save valuable troubleshooting time and ensure smooth integration execution.


Read More »
*/

Trigger, Invoke, and Trigger & Invoke in OIC REST Connections

Trigger, Invoke, and Trigger & Invoke in OIC REST Connections

In Oracle Integration Cloud (OIC), REST connections allow systems to communicate. You can configure a connection in one of three ways: Trigger, Invoke, or Trigger and Invoke.


Trigger: OIC acts as a server, exposing a REST API so that external systems can receive data. Example: Third-party service receiving data using OIC Rest API.



Invoke: OIC acts as a client, calling external REST services. Example: Fetching data from an external API like a CRM system.



Trigger and Invoke: OIC can both receive and send requests using the same connection, enabling two-way communication. Example: Receiving customer data and validating it via an external service in a single flow.


By understanding these roles, you can set up flexible and efficient integrations tailored to your needs. 

Read More »
*/