Skip to main content

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
Execution endpoints eliminate this. OpenSink calls your agent the moment input is available.

How it works

1

Configure the endpoint

Set an execution endpoint on your agent — a URL, HTTP method, and optional headers/body.
2

Agent requests input

During a session, the agent creates an input request. Execution pauses.
3

Human responds

A human submits a response to the input request.
4

OpenSink calls your endpoint

OpenSink sends an HTTP request to your execution endpoint with the session and request IDs.
5

Your agent resumes

Your agent loads the session, reads the input response, and continues execution.

Configuring an endpoint

Set the execution endpoint when creating or updating an agent:

What OpenSink sends

When calling your endpoint, OpenSink includes:

Headers

Body (for POST/PUT/DELETE)


Handling the callback

Your endpoint should:
  1. Verify the request (check X-OpenSink-Secret)
  2. Load the session state from OpenSink
  3. Read the resolved input request response
  4. Continue execution
  5. 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
This ensures failures are always visible, even when the callback itself fails.

Verifying requests

Use the X-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:
This works for simpler setups or environments where inbound webhooks aren’t practical.

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)
They exist for one purpose: resuming agent execution after human input.

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
If your agent waits for humans — execution endpoints close the loop.