Extending your AI agent with webhooks
A webhook is a mechanism that enables your program to call out to an external program based on specific events. This allows your AI agent to make calls to external services or applications during a conversation, enhancing its functionality and capabilities.
You can utilize the following types of webhooks in your AI agent, which are triggered with every run of the AI agent:
-
Prerun
Sends the request received from the end-user to a client endpoint. Expects a response that adheres to the request schema of watsonx Orchestrate to continue the pipeline. -
Post-run
Sends the response from the AI agent to a client endpoint. Expects a response that adheres to the response schema of watsonx Orchestrate to forward it to the end-user.
When using webhooks, ensure that the external program or service is properly configured to handle the requests and respond accordingly. This will enable seamless integration and effective communication between your AI agent and the external service.