Poll

Poll for triggers (tasks, mentions)

Changed on

While the API is draining after SIGTERM it dispatches nothing: the answer is { trigger: null } and carries X-Swarm-Draining: 1, the signal for a worker to hand off in-flight tasks.

get/api/poll

Request

  • Base URL
    http://localhost:3013
  • URL
    http://localhost:3013/api/poll
  • Auth
    HTTP bearer

Headers

X-Runtime-Instance-IDstring

Identifies the concrete runtime instance (worker process) making the call, as generated at its boot. Required to poll for work when multi-runtime mode (MULTI_RUNTIME_ENABLED) is on; ignored otherwise.

X-Model-Tier-Overridesstring

URL-encoded JSON {provider: {tier: model}} of the worker's MODEL_TIER_* env overrides. Stored on the agent row and applied at claim time (modelSource=worker-env).

Response

Trigger data or null

Changes

    • breaking

      added subschema #1 subschema #2 to the response property oneOf list for the response status

    • info

      removed subschema #1 subschema #2 from the response property oneOf list for the response status

    • breaking

      added subschema #1 subschema #2 to the response property oneOf list for the response status

    • info

      removed subschema #1 subschema #2 from the response property oneOf list for the response status