Skip to content
AGH RuntimeAPI Reference

Automation

AGH Automation HTTP endpoints.

Audience
Operators running durable agent work
Focus
API Reference guidance shaped for scanability, day-two clarity, and operator context.

List automation jobs

GET/api/automation/jobs

Query Parameters

scope?string

Filter by automation scope

Value in"global" | "workspace"
workspace_id?string

Filter by workspace id

source?string

Filter by job source

Value in"config" | "dynamic"
limit?integer

Maximum number of records to return

Formatint32

Response Body

application/json

application/json

application/json

application/json

curl -X GET "https://loading/api/automation/jobs"
{
  "jobs": [
    {
      "agent_name": "string",
      "created_at": "2019-08-24T14:15:22Z",
      "enabled": true,
      "fire_limit": {
        "max": 0,
        "window": "string"
      },
      "id": "string",
      "name": "string",
      "next_run": "2019-08-24T14:15:22Z",
      "prompt": "string",
      "retry": {
        "base_delay": "string",
        "max_retries": 0,
        "strategy": "none"
      },
      "schedule": {
        "expr": "string",
        "interval": "string",
        "mode": "cron",
        "time": "string"
      },
      "scheduler": {
        "catch_up_policy": "string",
        "consecutive_resume_failures": 0,
        "job_id": "string",
        "last_fire_id": "string",
        "last_misfire_at": "2019-08-24T14:15:22Z",
        "last_run_at": "2019-08-24T14:15:22Z",
        "last_scheduled_at": "2019-08-24T14:15:22Z",
        "misfire_count": 0,
        "misfire_grace_seconds": 0,
        "next_run_at": "2019-08-24T14:15:22Z",
        "registered": true,
        "updated_at": "2019-08-24T14:15:22Z"
      },
      "scope": "global",
      "source": "config",
      "task": {
        "description": "string",
        "network_channel": "string",
        "owner": {
          "kind": "human",
          "ref": "string"
        },
        "title": "string"
      },
      "updated_at": "2019-08-24T14:15:22Z",
      "workspace_id": "string"
    }
  ]
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
Empty

Create an automation job

POST/api/automation/jobs

Request Body

application/json

JSON request body

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://loading/api/automation/jobs" \  -H "Content-Type: application/json" \  -d '{    "agent_name": "string",    "name": "string",    "prompt": "string",    "schedule": {      "mode": "cron"    },    "scope": "global"  }'
{
  "job": {
    "agent_name": "string",
    "created_at": "2019-08-24T14:15:22Z",
    "enabled": true,
    "fire_limit": {
      "max": 0,
      "window": "string"
    },
    "id": "string",
    "name": "string",
    "next_run": "2019-08-24T14:15:22Z",
    "prompt": "string",
    "retry": {
      "base_delay": "string",
      "max_retries": 0,
      "strategy": "none"
    },
    "schedule": {
      "expr": "string",
      "interval": "string",
      "mode": "cron",
      "time": "string"
    },
    "scheduler": {
      "catch_up_policy": "string",
      "consecutive_resume_failures": 0,
      "job_id": "string",
      "last_fire_id": "string",
      "last_misfire_at": "2019-08-24T14:15:22Z",
      "last_run_at": "2019-08-24T14:15:22Z",
      "last_scheduled_at": "2019-08-24T14:15:22Z",
      "misfire_count": 0,
      "misfire_grace_seconds": 0,
      "next_run_at": "2019-08-24T14:15:22Z",
      "registered": true,
      "updated_at": "2019-08-24T14:15:22Z"
    },
    "scope": "global",
    "source": "config",
    "task": {
      "description": "string",
      "network_channel": "string",
      "owner": {
        "kind": "human",
        "ref": "string"
      },
      "title": "string"
    },
    "updated_at": "2019-08-24T14:15:22Z",
    "workspace_id": "string"
  }
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
Empty

Get one automation job

GET/api/automation/jobs/{id}

Path Parameters

id*string

Automation job id

Response Body

application/json

application/json

application/json

application/json

curl -X GET "https://loading/api/automation/jobs/string"
{
  "job": {
    "agent_name": "string",
    "created_at": "2019-08-24T14:15:22Z",
    "enabled": true,
    "fire_limit": {
      "max": 0,
      "window": "string"
    },
    "id": "string",
    "name": "string",
    "next_run": "2019-08-24T14:15:22Z",
    "prompt": "string",
    "retry": {
      "base_delay": "string",
      "max_retries": 0,
      "strategy": "none"
    },
    "schedule": {
      "expr": "string",
      "interval": "string",
      "mode": "cron",
      "time": "string"
    },
    "scheduler": {
      "catch_up_policy": "string",
      "consecutive_resume_failures": 0,
      "job_id": "string",
      "last_fire_id": "string",
      "last_misfire_at": "2019-08-24T14:15:22Z",
      "last_run_at": "2019-08-24T14:15:22Z",
      "last_scheduled_at": "2019-08-24T14:15:22Z",
      "misfire_count": 0,
      "misfire_grace_seconds": 0,
      "next_run_at": "2019-08-24T14:15:22Z",
      "registered": true,
      "updated_at": "2019-08-24T14:15:22Z"
    },
    "scope": "global",
    "source": "config",
    "task": {
      "description": "string",
      "network_channel": "string",
      "owner": {
        "kind": "human",
        "ref": "string"
      },
      "title": "string"
    },
    "updated_at": "2019-08-24T14:15:22Z",
    "workspace_id": "string"
  }
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
Empty

Update one automation job

PATCH/api/automation/jobs/{id}

Path Parameters

id*string

Automation job id

Request Body

application/json

JSON request body

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X PATCH "https://loading/api/automation/jobs/string" \  -H "Content-Type: application/json" \  -d '{}'
{
  "job": {
    "agent_name": "string",
    "created_at": "2019-08-24T14:15:22Z",
    "enabled": true,
    "fire_limit": {
      "max": 0,
      "window": "string"
    },
    "id": "string",
    "name": "string",
    "next_run": "2019-08-24T14:15:22Z",
    "prompt": "string",
    "retry": {
      "base_delay": "string",
      "max_retries": 0,
      "strategy": "none"
    },
    "schedule": {
      "expr": "string",
      "interval": "string",
      "mode": "cron",
      "time": "string"
    },
    "scheduler": {
      "catch_up_policy": "string",
      "consecutive_resume_failures": 0,
      "job_id": "string",
      "last_fire_id": "string",
      "last_misfire_at": "2019-08-24T14:15:22Z",
      "last_run_at": "2019-08-24T14:15:22Z",
      "last_scheduled_at": "2019-08-24T14:15:22Z",
      "misfire_count": 0,
      "misfire_grace_seconds": 0,
      "next_run_at": "2019-08-24T14:15:22Z",
      "registered": true,
      "updated_at": "2019-08-24T14:15:22Z"
    },
    "scope": "global",
    "source": "config",
    "task": {
      "description": "string",
      "network_channel": "string",
      "owner": {
        "kind": "human",
        "ref": "string"
      },
      "title": "string"
    },
    "updated_at": "2019-08-24T14:15:22Z",
    "workspace_id": "string"
  }
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
Empty

Delete one automation job

DELETE/api/automation/jobs/{id}

Path Parameters

id*string

Automation job id

Response Body

application/json

application/json

application/json

application/json

curl -X DELETE "https://loading/api/automation/jobs/string"
Empty
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
Empty

List run history for one automation job

GET/api/automation/jobs/{id}/runs

Path Parameters

id*string

Automation job id

Query Parameters

status?string

Filter by run status

Value in"scheduled" | "running" | "delegated" | "completed" | "failed" | "canceled"
since?string

Only runs started since this timestamp

Formatdate-time
until?string

Only runs started before this timestamp

Formatdate-time
limit?integer

Maximum number of records to return

Formatint32

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://loading/api/automation/jobs/string/runs"
{
  "runs": [
    {
      "attempt": 0,
      "delivery_error": "string",
      "delivery_error_at": "2019-08-24T14:15:22Z",
      "ended_at": "2019-08-24T14:15:22Z",
      "error": "string",
      "fire_id": "string",
      "id": "string",
      "job_id": "string",
      "scheduled_at": "2019-08-24T14:15:22Z",
      "session_id": "string",
      "started_at": "2019-08-24T14:15:22Z",
      "status": "scheduled",
      "task_id": "string",
      "task_run_id": "string",
      "trigger_id": "string"
    }
  ]
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
Empty

Trigger one automation job immediately

POST/api/automation/jobs/{id}/trigger

Path Parameters

id*string

Automation job id

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://loading/api/automation/jobs/string/trigger"
{
  "run": {
    "attempt": 0,
    "delivery_error": "string",
    "delivery_error_at": "2019-08-24T14:15:22Z",
    "ended_at": "2019-08-24T14:15:22Z",
    "error": "string",
    "fire_id": "string",
    "id": "string",
    "job_id": "string",
    "scheduled_at": "2019-08-24T14:15:22Z",
    "session_id": "string",
    "started_at": "2019-08-24T14:15:22Z",
    "status": "scheduled",
    "task_id": "string",
    "task_run_id": "string",
    "trigger_id": "string"
  }
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
Empty

List automation runs

GET/api/automation/runs

Query Parameters

job_id?string

Filter by automation job id

trigger_id?string

Filter by automation trigger id

status?string

Filter by run status

Value in"scheduled" | "running" | "delegated" | "completed" | "failed" | "canceled"
since?string

Only runs started since this timestamp

Formatdate-time
until?string

Only runs started before this timestamp

Formatdate-time
limit?integer

Maximum number of records to return

Formatint32

Response Body

application/json

application/json

application/json

application/json

curl -X GET "https://loading/api/automation/runs"
{
  "runs": [
    {
      "attempt": 0,
      "delivery_error": "string",
      "delivery_error_at": "2019-08-24T14:15:22Z",
      "ended_at": "2019-08-24T14:15:22Z",
      "error": "string",
      "fire_id": "string",
      "id": "string",
      "job_id": "string",
      "scheduled_at": "2019-08-24T14:15:22Z",
      "session_id": "string",
      "started_at": "2019-08-24T14:15:22Z",
      "status": "scheduled",
      "task_id": "string",
      "task_run_id": "string",
      "trigger_id": "string"
    }
  ]
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
Empty

Get one automation run

GET/api/automation/runs/{id}

Path Parameters

id*string

Automation run id

Response Body

application/json

application/json

application/json

application/json

curl -X GET "https://loading/api/automation/runs/string"
{
  "run": {
    "attempt": 0,
    "delivery_error": "string",
    "delivery_error_at": "2019-08-24T14:15:22Z",
    "ended_at": "2019-08-24T14:15:22Z",
    "error": "string",
    "fire_id": "string",
    "id": "string",
    "job_id": "string",
    "scheduled_at": "2019-08-24T14:15:22Z",
    "session_id": "string",
    "started_at": "2019-08-24T14:15:22Z",
    "status": "scheduled",
    "task_id": "string",
    "task_run_id": "string",
    "trigger_id": "string"
  }
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
Empty

List automation triggers

GET/api/automation/triggers

Query Parameters

scope?string

Filter by automation scope

Value in"global" | "workspace"
workspace_id?string

Filter by workspace id

source?string

Filter by trigger source

Value in"config" | "dynamic"
event?string

Filter by trigger event

limit?integer

Maximum number of records to return

Formatint32

Response Body

application/json

application/json

application/json

application/json

curl -X GET "https://loading/api/automation/triggers"
{
  "triggers": [
    {
      "agent_name": "string",
      "created_at": "2019-08-24T14:15:22Z",
      "enabled": true,
      "endpoint_slug": "string",
      "event": "string",
      "filter": {
        "property1": "string",
        "property2": "string"
      },
      "fire_limit": {
        "max": 0,
        "window": "string"
      },
      "id": "string",
      "name": "string",
      "prompt": "string",
      "retry": {
        "base_delay": "string",
        "max_retries": 0,
        "strategy": "none"
      },
      "scope": "global",
      "source": "config",
      "updated_at": "2019-08-24T14:15:22Z",
      "webhook_id": "string",
      "webhook_secret_hash": "string",
      "webhook_secret_present": true,
      "workspace_id": "string"
    }
  ]
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
Empty

Create an automation trigger

POST/api/automation/triggers

Request Body

application/json

JSON request body

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://loading/api/automation/triggers" \  -H "Content-Type: application/json" \  -d '{    "agent_name": "string",    "event": "string",    "name": "string",    "prompt": "string",    "scope": "global"  }'
{
  "trigger": {
    "agent_name": "string",
    "created_at": "2019-08-24T14:15:22Z",
    "enabled": true,
    "endpoint_slug": "string",
    "event": "string",
    "filter": {
      "property1": "string",
      "property2": "string"
    },
    "fire_limit": {
      "max": 0,
      "window": "string"
    },
    "id": "string",
    "name": "string",
    "prompt": "string",
    "retry": {
      "base_delay": "string",
      "max_retries": 0,
      "strategy": "none"
    },
    "scope": "global",
    "source": "config",
    "updated_at": "2019-08-24T14:15:22Z",
    "webhook_id": "string",
    "webhook_secret_hash": "string",
    "webhook_secret_present": true,
    "workspace_id": "string"
  }
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
Empty

Get one automation trigger

GET/api/automation/triggers/{id}

Path Parameters

id*string

Automation trigger id

Response Body

application/json

application/json

application/json

application/json

curl -X GET "https://loading/api/automation/triggers/string"
{
  "trigger": {
    "agent_name": "string",
    "created_at": "2019-08-24T14:15:22Z",
    "enabled": true,
    "endpoint_slug": "string",
    "event": "string",
    "filter": {
      "property1": "string",
      "property2": "string"
    },
    "fire_limit": {
      "max": 0,
      "window": "string"
    },
    "id": "string",
    "name": "string",
    "prompt": "string",
    "retry": {
      "base_delay": "string",
      "max_retries": 0,
      "strategy": "none"
    },
    "scope": "global",
    "source": "config",
    "updated_at": "2019-08-24T14:15:22Z",
    "webhook_id": "string",
    "webhook_secret_hash": "string",
    "webhook_secret_present": true,
    "workspace_id": "string"
  }
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
Empty

Update one automation trigger

PATCH/api/automation/triggers/{id}

Path Parameters

id*string

Automation trigger id

Request Body

application/json

JSON request body

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X PATCH "https://loading/api/automation/triggers/string" \  -H "Content-Type: application/json" \  -d '{}'
{
  "trigger": {
    "agent_name": "string",
    "created_at": "2019-08-24T14:15:22Z",
    "enabled": true,
    "endpoint_slug": "string",
    "event": "string",
    "filter": {
      "property1": "string",
      "property2": "string"
    },
    "fire_limit": {
      "max": 0,
      "window": "string"
    },
    "id": "string",
    "name": "string",
    "prompt": "string",
    "retry": {
      "base_delay": "string",
      "max_retries": 0,
      "strategy": "none"
    },
    "scope": "global",
    "source": "config",
    "updated_at": "2019-08-24T14:15:22Z",
    "webhook_id": "string",
    "webhook_secret_hash": "string",
    "webhook_secret_present": true,
    "workspace_id": "string"
  }
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
Empty

Delete one automation trigger

DELETE/api/automation/triggers/{id}

Path Parameters

id*string

Automation trigger id

Response Body

application/json

application/json

application/json

application/json

curl -X DELETE "https://loading/api/automation/triggers/string"
Empty
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
Empty

List run history for one automation trigger

GET/api/automation/triggers/{id}/runs

Path Parameters

id*string

Automation trigger id

Query Parameters

status?string

Filter by run status

Value in"scheduled" | "running" | "delegated" | "completed" | "failed" | "canceled"
since?string

Only runs started since this timestamp

Formatdate-time
until?string

Only runs started before this timestamp

Formatdate-time
limit?integer

Maximum number of records to return

Formatint32

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://loading/api/automation/triggers/string/runs"
{
  "runs": [
    {
      "attempt": 0,
      "delivery_error": "string",
      "delivery_error_at": "2019-08-24T14:15:22Z",
      "ended_at": "2019-08-24T14:15:22Z",
      "error": "string",
      "fire_id": "string",
      "id": "string",
      "job_id": "string",
      "scheduled_at": "2019-08-24T14:15:22Z",
      "session_id": "string",
      "started_at": "2019-08-24T14:15:22Z",
      "status": "scheduled",
      "task_id": "string",
      "task_run_id": "string",
      "trigger_id": "string"
    }
  ]
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
Empty

Deliver one global automation webhook

POST/api/webhooks/global/{endpoint}

Path Parameters

endpoint*string

Webhook endpoint slug and id

Header Parameters

X-AGH-Webhook-Timestamp*string

Signed webhook timestamp

X-AGH-Webhook-Signature*string

Signed webhook HMAC signature

Request Body

application/json

JSON request body

TypeScript Definitions

Use the request body type in TypeScript.

[key: string]?unknown

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://loading/api/webhooks/global/string" \  -H "X-AGH-Webhook-Timestamp: string" \  -H "X-AGH-Webhook-Signature: string" \  -H "Content-Type: application/json" \  -d '{    "property1": null,    "property2": null  }'
{
  "result": {
    "matched": 0,
    "runs": [
      {
        "attempt": 0,
        "delivery_error": "string",
        "delivery_error_at": "2019-08-24T14:15:22Z",
        "ended_at": "2019-08-24T14:15:22Z",
        "error": "string",
        "fire_id": "string",
        "id": "string",
        "job_id": "string",
        "scheduled_at": "2019-08-24T14:15:22Z",
        "session_id": "string",
        "started_at": "2019-08-24T14:15:22Z",
        "status": "scheduled",
        "task_id": "string",
        "task_run_id": "string",
        "trigger_id": "string"
      }
    ]
  }
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
Empty

Deliver one workspace-scoped automation webhook

POST/api/webhooks/workspaces/{workspace_id}/{endpoint}

Path Parameters

workspace_id*string

Workspace id

endpoint*string

Webhook endpoint slug and id

Header Parameters

X-AGH-Webhook-Timestamp*string

Signed webhook timestamp

X-AGH-Webhook-Signature*string

Signed webhook HMAC signature

Request Body

application/json

JSON request body

TypeScript Definitions

Use the request body type in TypeScript.

[key: string]?unknown

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://loading/api/webhooks/workspaces/string/string" \  -H "X-AGH-Webhook-Timestamp: string" \  -H "X-AGH-Webhook-Signature: string" \  -H "Content-Type: application/json" \  -d '{    "property1": null,    "property2": null  }'
{
  "result": {
    "matched": 0,
    "runs": [
      {
        "attempt": 0,
        "delivery_error": "string",
        "delivery_error_at": "2019-08-24T14:15:22Z",
        "ended_at": "2019-08-24T14:15:22Z",
        "error": "string",
        "fire_id": "string",
        "id": "string",
        "job_id": "string",
        "scheduled_at": "2019-08-24T14:15:22Z",
        "session_id": "string",
        "started_at": "2019-08-24T14:15:22Z",
        "status": "scheduled",
        "task_id": "string",
        "task_run_id": "string",
        "trigger_id": "string"
      }
    ]
  }
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
Empty