Run an AI Agent with Knowledge of Previous Runs

When an AI agent runs, a conversation ID is automatically generated by default, unless you specify the conversation ID. You can specify the conversation ID in different runs of an AI agent to associate multiple requests with a single conversation. A conversation includes all interactions with the AI agent such as prompts, data, and decisions made. Use the conversation ID when sending data back to an AI agent or when you want the AI agent to have knowledge of prompts, data, and decisions made in other runs.

Data Retention for AI Agents

AI agent data is retained according to the data retention period of the Oracle Integration service instance. For configuration details, see Edit the Data Retention Period for an Instance.

Prerequisite: Get the Conversation ID

If the AI agent has already run, you can find the conversation ID in the Agent instances page:

  1. In your project, click the Observe tab.
  2. In the left navigation pane, select AI Agents AI Agents icon.

    The Agent instances page is displayed.

  3. Copy the conversation ID from the Instance ID column.
    Observe tab showing agent instances for the SIMPLE_EXPENSE_APPROVAL_AGENT. The Agent instances screen lists two instances, with columns for Primary identifier, Instance ID, Business Identifiers, Status, and Duration. One instance with a primary identifier "Primary: undefined" has an instance ID partially visible, status marked "Succeeded," and shows timings for when the request was received and completed, along with total duration in milliseconds. Time window and sort controls, as well as the current date and time, appear at the top. The left side features a vertical navigation menu.

If the AI agent has not yet run, you can find the conversation ID in the Test Agent page, in the run of the AI agent:

  1. In your project, click the Design tab.
  2. In the left navigation pane, select AI Agents AI Agents icon.
  3. In the Agents box, find the AI agent to run.
  4. Click Actions Actions icon, and select Run.

    The Test Agent page is displayed.

  5. Select any test run. You'll see the conversation ID under the Activity section.
    Oracle Integration Test agent screen. The left panel shows a test run labeled “Agent test 1” and the option to create a new run. In the center, a user inputs “I purchased a desk for $45.” Below, the system displays the agent’s role and approval guidelines for processing expense claims. The right sidebar lists Resources (pattern, tools) and recent Activity, including the current Conversation ID.

Run the AI Agent and Specify the Conversation ID

  1. In your project, click the Design tab.
  2. In the left navigation pane, select AI Agents AI Agents icon.
  3. In the Agents box, find the AI agent to run.
  4. Click Actions Actions icon, and select Run.

    The Test Agent page is displayed.

  5. Click + to display the conversation ID dialog, specify the conversation ID, and click Submit.

    Test agent screen. The left panel displays test runs including “Agent test 1,” “Agent test 2,” and “New run.” The center shows a prompt input box. A modal window is open for entering or confirming the Conversation ID, with Cancel and Submit buttons. The Resources section on the right lists available tools: Request Human Approval and Auto Approve Expense Report.

  6. In Prompt, enter a natural language prompt for the AI agent and click Run Run agent icon.
    Your AI agent can now make decisions knowing the conversation history of all other runs with the same conversation ID.