Use Case: Send a Callback to an AI Agent for an Asynchronous Tool

We have an AI agent that calls an asynchronous tool. Let's walk through the integrations we have, the AI agent, the AI agent run, and the callback to the AI agent.

What we configured

We have an AI agent that calls an asynchronous tool.


Async Agent details page showing the agent role, guidelines to always call the Async Tool, and the associated tool configuration.

For this example, we have an agentic AI tool, an integration that makes a wait call but you can make a call to a stored procedure, a bulk operation, or any other asynchronous operation.


Async Tool integration showing a trigger connected to a wait step.

To send the response back to the AI agent, we created another integration and added the AI Agent action with the Callback AI Agent operation.

Basic Info panel an AI Agent action with Callback AI Agent selected as the operation.

We also configured the project and AI agent in the callback.
Edit Configuration panel for an AI Agent invoke action with project RT_TEST_3004 and Async Agent (1.0.0) selected before continuing.

In the mapper, we mapped the Conversation Id, the Tool Flow Id, Tool Invoke Event Id, and Payload. These are the parameters that need to be passed to the AI agent with the response.

Oracle Integration mapping editor showing Conversation ID, Tool Flow ID, Tool Invoke Event ID, and Payload mapped fields.

After activating the callback integration, we run the AI Agent. The AI Agent calls the Async Tool.

Test Agent page with a sample question entered, available resources, and an information message indicating the agent instance is still processing.

Tip:

Take note of the Conversation ID. We'll need it to send the response back to the AI agent in the callback.
Let's look at the AI agent status in the Observe tab. We see that the AI agent has the status Waiting for tool to process. The AI agent has this status until it receives a response.

Agent Instances page showing an AI agent with the status "Waiting for tool to process".

Sending the Response with the Callback

The tool has processed what it needed. We run the callback integration that contains the Callback AI agent action to send the response back to the AI agent. To send the response we need:

  • The conversation ID from the AI agent run. We got the conversation ID when we ran the AI agent, from the Test agent page.
  • Tool Flow ID: The instance ID of the integration that was registered as an agentic AI tool and was run by the AI agent.
  • Tool Invoke Event ID: Same value as Tool Flow ID. The instance ID of the integration that was registered as an agentic AI tool and was run by the AI agent.
To find out the instance ID, we look at the Integrations Observe tab for the tool and get the instance ID.

Observe Instances page showing completed integration instances with status, duration, and a status overview chart.

We can now run the callback integration and specify the response.


Configure and Run page showing a callback request payload alongside an activity stream confirming the callback was processed successfully.

In the Integrations Observe Instances page, we see that the ReAct pattern associated with the AI agent has received a callback. It has the Business Identifier Callback flow.


Observe Instances page showing the callback flow completed successfully.

In the Agent instances page, we can see the AI agent succeeded.


Agent Instances page showing the Async Agent completed successfully

In the AI agent activity stream, we can see the tool call, the tool response, and the final answer from the Large Language Model.

Activity Stream panel showing the assistant requesting the Async Tool, the tool response, and the assistant's final answer.