OIC Agents & Human in the Loop: A Step-by-Step Implementation Guide
Learn how to implement AI Agents with Human in the Loop (HITL) capabilities in Oracle Integration Cloud. This comprehensive guide covers form creation, workflow design, integration setup, and end-to-end testing for enterprise-grade approval workflows.
# OIC Agents & Human in the Loop: A Step-by-Step Implementation Guide
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
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.
### HITL Patterns in OIC
Control Gate: Agent pauses and waits for explicit human approval before proceeding. Use case: Expense approvals, contract sign-offs
Circuit Breaker: Agent detects an anomaly or threshold breach and escalates to a human. Use case: Fraud detection, compliance violations
Exception Management: Agent encounters an error or ambiguity and routes to a human for resolution. Use case: 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 HITL implementations, ensure the following prerequisites are in place:
- Oracle Integration Instance: An active OIC 3 instance with Agentic AI features enabled
- Process Automation Enabled: Oracle Cloud Infrastructure Process Automation must be enabled
- User Roles Assigned: Assign ServiceDeveloper or ServiceAdministrator Process Automation roles
- Existing AI Agent: A working AI agent to which the HITL tool will be added
- OIC Project: All artifacts must reside in the same OIC project
Step-by-Step Example: Expense Approval with HITL
### 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. The manager receives a web form showing the claimed amount and can either approve or reject the request.
### Step 1: Create and Activate the Human Approval Form
1. Navigate to your OIC project and in the Process section, click Add → Form
2. Configure the form with Name: SimpleExpenseApprovalForm
3. Add form fields:
- ClaimAmount (Number, Read-Only) - The expense amount submitted
- ApprovalResponse (Text Area, Required) - The manager's decision
4. Click Save and then Activate the form
### Step 2: Create and Activate the Human Approval Workflow
1. In the Process section, click Add → Workflow
2. Configure the workflow with Name: SimpleHumanApprovalWorkflow
3. Configure the End Event with output payload
4. Add a User Task between Start and End events
5. Configure User Task with Assignees and Form selection
6. Configure Data Associations for input and output mapping
7. Click Save and then Activate the workflow
### Step 3: Create the Trigger Connection and Integration
1. Create a REST Trigger Connection with name REST_TRIGGER_FOR_HUMAN_APPROVAL
2. Create the Integration with name Request Human Approval
3. Configure the REST Trigger with endpoint /requesthumanapproval and POST method
4. Configure Request Headers with critical x-agentic-callback-url header
5. Add the Human in the Loop Action selecting the workflow
6. Configure the Map action to pass claimAmount to the workflow
7. Assign Business Identifier and Activate the integration
Key Takeaways
1. Agentic AI enables dynamic orchestration - LLMs reason about goals and select tools dynamically
2. HITL is essential for enterprise automation - High-stakes decisions require human oversight
3. Three HITL patterns address different scenarios - Control Gates, Circuit Breakers, Exception Management
4. Form + Workflow + Integration = Complete HITL Solution
5. Custom headers are critical - x-agentic-callback-url header is required for AI agent callbacks
6. Process Automation is the foundation - OPA provides workflow engine and form designer
7. Business identifiers enable tracking - Track specific instances through the approval workflow
Conclusion
Implementing AI Agents with Human in the Loop in Oracle Integration Cloud enables organizations to build intelligent, autonomous workflows that maintain human oversight for critical decisions. By combining LLM-powered reasoning with structured approval processes, enterprises can achieve both automation efficiency and governance compliance.
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.
