AI Agents & Human in the Loop (HITL) in Oracle Integration Cloud: Complete Implementation Guide
A comprehensive step-by-step guide for implementing AI Agents with Human in the Loop capabilities in Oracle Integration Cloud. Learn how to build autonomous AI agents that pause for human approval on high-stakes decisions, with complete examples covering form creation, workflow design, integration setup, and end-to-end testing for enterprise-grade approval workflows.
# AI Agents & Human in the Loop (HITL) in Oracle Integration Cloud
Introduction to Agentic AI in OIC
Oracle Integration Cloud (OIC) has evolved beyond traditional pre-defined integration flows to support Agentic AI—a paradigm where an AI agent, powered by a Large Language Model (LLM), dynamically reasons about a goal and decides which tools to invoke, in what order, and how many times, without requiring a fixed, pre-authored orchestration path.
Definition: An AI Agent in OIC is an autonomous software entity that uses an LLM to reason over a goal, select from a set of available tools, and execute actions iteratively until the goal is achieved or a stopping condition is met.
Core Agentic Artifacts in OIC
- Tool: An OIC integration exposed as a callable capability for the agent
- Agent: The reasoning entity that selects and invokes tools based on LLM reasoning
- Agent Pattern: A reusable configuration template defining how an agent behaves
- Prompt Template: A structured prompt that guides the LLM's reasoning and output format
How Integrations and AI Agents Fit Together
Traditional OIC integrations follow a pre-defined orchestration path. Agentic AI introduces LLM-reasoned orchestration: the agent is given a set of tools and a goal, and the LLM dynamically decides which tools to call, in what order, and when to stop.
This fundamental shift enables OIC to handle open-ended, goal-oriented tasks that cannot be fully anticipated at design time—such as processing an expense claim where the approval path depends on the amount, the approver's availability, and business policy.
The Role of Human in the Loop (HITL)
While AI agents are powerful, enterprise-grade automation requires human oversight for high-stakes decisions. The Human in the Loop (HITL) pattern in OIC allows an AI agent to pause its autonomous execution and request a human decision before proceeding.
### Three Primary HITL Patterns
1. Control Gate: Agent pauses and waits for explicit human approval before proceeding (Expense approvals, contract sign-offs)
2. Circuit Breaker: Agent detects an anomaly or threshold breach and escalates to a human (Fraud detection, compliance violations)
3. Exception Management: Agent encounters an error or ambiguity and routes to a human for resolution (Data quality issues, ambiguous instructions)
The HITL capability in OIC is built on top of Oracle Process Automation (OPA), which provides the workflow engine, user task management, and the web form interface that human approvers interact with.
Prerequisites
Before building the HITL example, ensure the following prerequisites are in place:
- Oracle Integration Instance with Agentic AI features enabled
- Process Automation enabled for the OIC instance
- User Roles assigned (ServiceDeveloper or ServiceAdministrator)
- Existing AI Agent (e.g., expense reimbursement agent)
- All artifacts must reside in the same OIC project
Step-by-Step Example: Expense Approval with Human in the Loop
### Scenario
An AI agent processes employee expense reimbursement requests. For any expense greater than $50, the agent must pause and request manager approval before proceeding.
### Step Overview
The implementation consists of six key steps:
1. Create and Activate the Human Approval Form
2. Create and Activate the Human Approval Workflow
3. Create the Trigger Connection and the Human Approval Integration
4. Register the integration as an Agentic AI Tool
5. Add the tool to the AI Agent
6. Run and Test the Human Approval flow
### Step 1: Create and Activate the Human Approval Form
The first step is to create a simple web form that the human approver (manager) will use to approve or reject the expense claim. This form is built using Oracle Process Automation's form designer.
Navigate to the OIC Project: Open your project in OIC. In the Process section, click Add and select Form.
Configure the Form: Enter form name as "SimpleExpenseApprovalForm" with description "Form for manager to approve or reject expense". Add two fields:
- ClaimAmount (Number) - Read Only
- ApprovalResponse (Text Area) - Required
Activate the Form: Once configured, click Save and then Activate the form.
### Step 2: Create and Activate the Human Approval Workflow
The workflow defines the approval process: it receives the expense data from the AI agent, presents it to the manager via the form, and returns the manager's decision back to the agent.
Create the Workflow: In the Process section, click Add and select Workflow. Enter name as "SimpleHumanApprovalWorkflow".
Configure the End Event: Select the End event and configure output payload as {"approvalResponse": ""}.
Add User Task: Add a User Task between Start and End events. Configure it with:
- Assignees: Select the manager user account
- UI: Select the SimpleExpenseApprovalForm
Configure Data Associations: Map ClaimAmount from input to form, and ApprovalResponse from form to output.
Activate the Workflow: Click Save and then Activate.
### Step 3: Create the Trigger Connection and Integration
This step creates the OIC integration that the AI agent will call as a tool.
Create REST Trigger Connection: In Integrations section, click Add→Connection. Select REST adapter with:
- Connection Name: REST_TRIGGER_FOR_HUMAN_APPROVAL
- Role: Trigger
- Security Policy: OAuth 2.0 or Basic Authentication
Create the Integration: Click Add→Integration. Select Application style with name "Request Human Approval".
Configure REST Trigger: Set up with:
- Endpoint name: RequestHumanApproval
- Resource URI: /requesthumanapproval
- HTTP Action: POST
- Request Payload: {"claimAmount": ""}
- Custom Header: x-agentic-callback-url (CRITICAL)
Add Human in the Loop Action: Add the HITL action selecting the SimpleHumanApprovalWorkflow.
Configure Mapper: Map claimAmount to the workflow.
Activate: Assign Business Identifier and Activate the integration.
### Step 4: Register the Integration as an Agentic AI Tool
Once the integration is active, register it as an AI tool:
Open Integration Actions: Next to the active integration, click Actions and select "Register as Agentic AI Tool".
Configure Tool Metadata:
- Tool Name: RequestHumanApproval
- Description: "Requests manager approval for an expense claim. Use this tool when the claim amount exceeds $50."
Click Register.
### Step 5: Add the Human Approval Tool to the AI Agent
Open the AI Agent: Navigate to the Agents section and open your expense reimbursement AI agent.
Add the Tool: In the agent's Tools panel, click Add Tool and select RequestHumanApproval.
Update Agent Guidelines: Add explicit instructions to the agent:
"You are an expense reimbursement assistant. When processing an expense claim:
- If the claim amount is $50 or less, approve it automatically.
- If the claim amount is greater than $50, you MUST call the RequestHumanApproval tool and wait for the manager's decision before proceeding.
- If the manager approves, confirm the reimbursement.
- If the manager rejects, inform the employee with the reason."
Click Save and Activate.
### Step 6: Run and Test Human Approval in the AI Agent
Invoke the Agent: Navigate to the AI agent's Test panel and submit a test prompt: "I need to claim $120 for a business dinner with a client."
Observe the Agent's Reasoning: The agent will:
1. Extract the claim amount: $120
2. Determine that $120 > $50, triggering the HITL condition
3. Call the RequestHumanApproval tool
4. Pause and wait for human response
Complete the Human Approval Task: The manager receives a task notification, opens My Tasks, and reviews the form showing ClaimAmount: 120. They enter a decision and submit.
Agent Resumes: After submission, the workflow sends the response back via x-agentic-callback-url. The agent resumes and responds accordingly.
End-to-End Flow
Employee Request → AI Agent (LLM Reasoning) → Amount Check → If >$50: Call RequestHumanApproval Tool → OIC Integration → Human in the Loop Action → OPA Workflow → Manager Task → Approval Decision → Callback → Agent Resumes & Responds
Key Technical Components
- Human Approval Form: Provides the UI for the human approver
- Human Approval Workflow: Orchestrates the approval process via OPA
- REST Integration with HITL Action: Bridges the AI agent and the OPA workflow
- x-agentic-callback-url Header: Enables the agent to receive the human's response
- AI Tool Registration: Makes the integration discoverable by the agent
- Agent Guidelines: Instructs the LLM when to invoke the HITL tool
Conclusion
The Human in the Loop capability in Oracle Integration Cloud represents a critical bridge between fully autonomous AI agent execution and the governance requirements of enterprise environments. By combining OIC's Agentic AI framework with Oracle Process Automation's workflow and form capabilities, organizations can build AI agents that are both powerful and trustworthy—capable of acting autonomously within defined boundaries while escalating high-stakes decisions to human judgment.
As AI agents take on increasingly complex enterprise tasks, the HITL pattern ensures that automation augments—rather than replaces—human judgment, creating a foundation of trust and accountability for AI-driven business processes.

Tags

About the Author
Bharath L
Oracle Cloud Specialist
Oracle Cloud Specialist providing end-to-end solutions for Oracle Fusion, OIC, VBCS, and ATP. Expertise in Oracle Applications (Fusion & EBS) for SCM, HCM, Finance, and BI/OTBI reporting with complex system integrations. Passionate about sharing real-world experience and learning together.
