Skip to main content
Docs

Search guides and API endpoints, for example “Idempotency-Key” or “submit job”.

    Concepts

    Completion events

    Wait for jobs and workflow runs to finish with one long-polling feed instead of polling each one.

    Updated October 1, 2026

    On this page

    List job / workflow run completion events is a feed of your jobs and workflow runs as they stop: completed, error or failed, cancelled, and (for runs) paused. Use it instead of polling many status endpoints.

    Reading the feed

    • Events come oldest first. Each response has a next_cursor; pass it back as after to get only newer events.
    • wait (up to 25 seconds) holds the request open until an event arrives, so you learn about a finished job within moments without busy polling.
    • Filter with kind (job or workflow_run) and subject_id (one job or run).
    • Events are kept for 7 days.

    Events are short: an id, what changed, and its new status. Re-read Get job status or Get a workflow run for details.

    Delivery is at least once and never skips: the same event can arrive twice, so ignore an event_id you've already handled.

    With the Python SDK

    from cognichem_client import CogniChem
     
    client = CogniChem.from_env()
    for event in client.events.listen(kind="workflow_run"):
        run = client.workflows.runs.get(event.subject_id)
        print(run.run_name, run.status)

    listen long-polls and drops repeated events for you.