What is an Execution Endpoint?
An Execution Endpoint is a webhook URL that OpenSink calls when an agent needs to resume execution. It answers:“How does my agent know it’s time to continue?”The most common trigger: a human resolves an input request.
Execution endpoints are optional. If your agent polls for input request status instead, you don’t need one.
Why Execution Endpoints exist
Without a callback mechanism, your agent must poll OpenSink to check if input has been provided. Polling works, but it means:- wasted requests when nothing has changed
- latency between input and resumption
- a running process that does nothing most of the time
How it works
Configure the endpoint
Set an execution endpoint on your agent — a URL, HTTP method, and optional headers/body.
OpenSink calls your endpoint
OpenSink sends an HTTP request to your execution endpoint with the session and request IDs.
Configuring an endpoint
Set the execution endpoint when creating or updating an agent:| Field | Description |
|---|---|
url | The URL to call |
method | HTTP method — POST, GET, PUT, or DELETE |
headers | Optional custom headers included in every call |
body | Optional base body merged into every call (not used for GET) |
What OpenSink sends
When calling your endpoint, OpenSink includes:Headers
| Header | Description |
|---|---|
Content-Type | application/json |
X-OpenSink-Session-Id | The session that needs to resume |
X-OpenSink-Request-Id | The input request that was resolved |
X-OpenSink-Secret | Your workspace’s execution secret (for verification) |
| Custom headers | Any headers you configured on the endpoint |
Body (for POST/PUT/DELETE)
Handling the callback
Your endpoint should:- Verify the request (check
X-OpenSink-Secret) - Load the session state from OpenSink
- Read the resolved input request response
- Continue execution
- Update the session status when done
Error handling
If your endpoint returns an error or is unreachable:- The session status is set to
failed - The error message is stored on the session
- The agent status is updated to
failed
Verifying requests
Use theX-OpenSink-Secret header to verify that incoming requests are from OpenSink.
The secret is set per workspace and can be found in your workspace settings. Compare it against the header value before processing the request.
Polling as an alternative
If you prefer not to use webhooks, your agent can poll for resolved input requests:What Execution Endpoints are not
Execution Endpoints are not:- a job scheduler
- a general-purpose event system
- a way to trigger agents on a timer (use Background Jobs for that)
When to use Execution Endpoints
Use Execution Endpoints when:- your agent uses input requests
- you want instant resumption after human input
- you don’t want to run a polling loop
- your agent runs as a serverless function or API server

