AdlyseAdlyseMCP Docs
⌘K
Overview
adlyse-insights
list_ad_accountsget_dashboard_snapshotget_impact_analysislist_guidelinesget_guideline
adlyse-reports
list_report_templateslist_reportsget_reportgenerate_reportlist_report_targets
adlyse-ads
list_campaignsget_performancelist_adsget_ad_performancelist_change_eventsupdate_campaign_statusupdate_campaign_budget
adlyse-workflows
list_workflowsget_workflowrun_workflowget_run_status
  1. Overview/
  2. adlyse-workflows

get_run_status

Poll the status of a workflow run. The run is finished when status is completed (with output) or failed (with error).

Parameters#

NameTypeRequiredDefaultDescription
run_idstringyesRun id (agent_run_…)

Returns (running)#

json
{
  "run_id": "agent_run_xyz",
  "status": "running",
  "created_at": "2026-04-22T14:00:00Z"
}

Returns (completed)#

json
{
  "run_id": "agent_run_xyz",
  "status": "completed",
  "created_at": "2026-04-22T14:00:00Z",
  "output": {
    "company": "Example Corp",
    "role": "Head of Growth",
    "seniority": "Director"
  },
  "completed_at": "2026-04-22T14:00:08Z",
  "duration_seconds": 8.4
}

Returns (failed)#

json
{
  "run_id": "agent_run_xyz",
  "status": "failed",
  "created_at": "2026-04-22T14:00:00Z",
  "error": "No company found for email lead@example.com",
  "completed_at": "2026-04-22T14:00:03Z"
}
FieldDescription
statuspending, running, completed, failed, or cancelled
outputPresent only on completed. Shape matches the workflow’s output_schema
errorPresent only on failed. Pulled from the failing node’s output
duration_secondsPresent on completed

Errors#

error_typeWhen
auth_errorMissing / invalid API key
not_foundRun id doesn’t exist or belongs to another org

Polling pattern#

plaintext
loop:
  result = get_run_status(run_id)
  if result.status in ("completed", "failed", "cancelled"):  break
  sleep 1 second

Most workflows complete in 1–30 seconds. A handful of data-heavy workflows (e.g. multi-step LLM chains) run for up to ~2 minutes.

Example#

Request: { "run_id": "agent_run_xyz" }

Response: see “Returns” sections above.

See also#

  • run_workflow — kick off a run
  • get_workflow — inspect output_schema before interpreting output
←Previous
run_workflow