Webhook
A callback mechanism where one system notifies another of an event via an HTTP request to a preset URL.
Webhook
A webhook is a way for one system to notify another of an event as it happens, by sending an HTTP request, usually a POST, to a URL that the receiving system has configured in advance. Instead of a client repeatedly asking a server whether something has happened, the server sends a request to the client the moment the event occurs, effectively inverting the usual direction of an API call.
How it works
To use webhooks, a system first registers a URL, an endpoint it controls, with the service it wants to receive notifications from. When a relevant event occurs, such as a task completing, the sending system makes an HTTP request to that URL with details of the event in the body. The receiving system's endpoint processes the request, typically by validating it and then triggering whatever action should follow, such as updating a database or notifying a user. Because the request is just a normal HTTP call, it can be received by ordinary web server code with no special client library.
Webhooks vs polling
Before webhooks, the common alternative was polling: repeatedly asking an API whether anything new had happened. Polling is simple but wasteful, since most requests return no new information, and it introduces a delay between an event happening and a client noticing it, bounded by how often the client polls. Webhooks eliminate both problems by having the event source push a notification the moment something happens, at the cost of requiring the receiver to expose a reachable endpoint and handle incoming requests reliably.
Why it matters for AI agent systems
Agent tasks can take anywhere from seconds to hours, and a caller often does not want to keep a connection open or poll repeatedly just to find out when a task finishes or an agent changes state. A webhook lets an external system, such as a CI pipeline, a chat integration, or an internal dashboard, register interest in agent events and be notified automatically when something relevant happens, without needing to maintain a streaming connection or check in on a schedule. This is particularly useful for integrating agent platforms into existing automation, where the agent's completion should trigger a downstream step in another system.