> Source: https://wexa.ai/docs/agents/list-executions

# list-executions

List the project's runs, newest first, so you can find one without knowing its id. Filter by process flow, status, what started it and a time window. Needs the `fabric:orchestrate.read` grant.

**List completed runs of one process flow**

**Wexa MCP server**

```bash
curl -sS -X POST https://fabric.wexa.ai/mcp/$FABRIC_PROJECT_ID \
  -H "authorization: Bearer $FABRIC_API_KEY" \
  -H "Mcp-Session-Id: $MCP_SESSION_ID" \
  -H "content-type: application/json" -H "accept: application/json" \
  -d '{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"list-executions","arguments":{"process_flow_id":"6ab53f5364cf27507387b8b5","status":"completed","limit":1}}}'
```

```json
{
  "content": [
    {
      "type": "text",
      "text": "{\"lifecycle_id\":\"qlc_000001\",\"result\":{\"executions\":[{\"execution_id\":\"f46feb95-102c-4631-9a8f-cfac9944abc4\",\"agentflow_name\":\"servicenow\",\"status\":\"completed\",\"trigger_source\":\"manual\",\"goal\":\"list the incidents from the account\"}],\"has_more\":true,\"limit\":1,\"page\":1}}"
    }
  ],
  "isError": false
}
```

**REST API**

```bash
curl -sS https://fabric.wexa.ai/v1/list-executions \
  -H "authorization: Bearer $FABRIC_API_KEY" \
  -H "content-type: application/json" \
  -d '{"process_flow_id":"6ab53f5364cf27507387b8b5","status":"completed","limit":1}'
```

```json
{
  "lifecycle_id": "qlc_000001",
  "result": {
    "executions": [
      {
        "execution_id": "f46feb95-102c-4631-9a8f-cfac9944abc4",
        "agentflow_name": "servicenow",
        "status": "completed",
        "trigger_source": "manual",
        "goal": "list the incidents from the account"
      }
    ],
    "has_more": true,
    "limit": 1,
    "page": 1
  }
}
```

**TypeScript SDK**

```ts
import { Fabric } from '@wexa-fabric/sdk'

const fabric = new Fabric()
const result = await fabric.listExecutions({
  process_flow_id: '6ab53f5364cf27507387b8b5',
  status: 'completed',
  limit: 1
})
```

```ts
// result is the payload itself, with no `.result` to read
{
  executions: [
    {
      execution_id: 'f46feb95-102c-4631-9a8f-cfac9944abc4',
      agentflow_name: 'servicenow',
      status: 'completed',
      trigger_source: 'manual',
      goal: 'list the incidents from the account'
    }
  ],
  has_more: true,
  limit: 1,
  page: 1
}
```

**Python SDK**

```python
from wexa import Fabric

fabric = Fabric()
out = fabric.list_executions(
    process_flow_id="6ab53f5364cf27507387b8b5",
    status="completed",
    limit=1,
)
```

```python
# out is the result, already unwrapped
{
    "executions": [
        {
            "execution_id": "f46feb95-102c-4631-9a8f-cfac9944abc4",
            "agentflow_name": "servicenow",
            "status": "completed",
            "trigger_source": "manual",
            "goal": "list the incidents from the account"
        }
    ],
    "has_more": True,
    "limit": 1,
    "page": 1
}
```

## Parameters

| Parameter | Type | Required | Notes |
| --- | --- | --- | --- |
| `process_flow_id` | string | Optional | Only runs of this process flow. Leave out for every run in the project. |
| `status` | string | Optional | Only runs in this status, one of running, ready, completed, scheduled, failed, anomaly_detected, awaiting_input, input_required, paused, cancelled, in_preview, processing or interop_pending. |
| `trigger_source` | string | Optional | Only runs started this way, one of scheduled, webhook, api, mcp, manual, do_mode or flow. |
| `since` | number | Optional | Only runs created at or after this time, in Unix seconds. Not after `until`. |
| `until` | number | Optional | Only runs created at or before this time, in Unix seconds. |
| `limit` | integer | Optional | Runs per page, 1 to 100 (default 20). |
| `page` | integer | Optional | Page number, from 1 (default 1). |

**Show full response**

A real response, captured from a live call to `list-executions` with `process_flow_id`, `status: "completed"` and `limit: 1` (the email in `executed_by` is replaced):

**Result of list-executions**

**REST API**

```json
{
  "lifecycle_id": "qlc_000001",
  "result": {
    "executions": [
      {
        "agent_type": "Task",
        "agentflow_id": "6ab53f5364cf27507387b8b5",
        "agentflow_name": "servicenow",
        "created_at": 1790849767.840899,
        "duration_ms": 100624,
        "end_time": 1790849868.464971,
        "executed_by": {
          "application_user_id": null,
          "is_external_application": false,
          "metadata": null,
          "name": "you@example.com",
          "type": "manual"
        },
        "execution_id": "f46feb95-102c-4631-9a8f-cfac9944abc4",
        "goal": "list the incidents from the account",
        "has_simulated_output": null,
        "parent_execution_id": null,
        "projectID": "6ab518d2d052b490e24a3302",
        "session_id": null,
        "simulation": false,
        "status": "completed",
        "total_price": 0.019374,
        "total_tokens": 25086,
        "trigger_source": "manual"
      }
    ],
    "has_more": true,
    "limit": 1,
    "page": 1,
    "status_counts": {
      "completed": 2,
      "failed": 2
    },
    "total_count": 2
  }
}
```

**Wexa MCP server**

```json
{
  "content": [
    {
      "type": "text",
      "text": "{\"lifecycle_id\":\"qlc_000001\",\"result\":{\"executions\":[{\"agent_type\":\"Task\",\"agentflow_id\":\"6ab53f5364cf27507387b8b5\",\"agentflow_name\":\"servicenow\",\"created_at\":1790849767.840899,\"duration_ms\":100624,\"end_time\":1790849868.464971,\"executed_by\":{\"application_user_id\":null,\"is_external_application\":false,\"metadata\":null,\"name\":\"you@example.com\",\"type\":\"manual\"},\"execution_id\":\"f46feb95-102c-4631-9a8f-cfac9944abc4\",\"goal\":\"list the incidents from the account\",\"has_simulated_output\":null,\"parent_execution_id\":null,\"projectID\":\"6ab518d2d052b490e24a3302\",\"session_id\":null,\"simulation\":false,\"status\":\"completed\",\"total_price\":0.019374,\"total_tokens\":25086,\"trigger_source\":\"manual\"}],\"has_more\":true,\"limit\":1,\"page\":1,\"status_counts\":{\"completed\":2,\"failed\":2},\"total_count\":2}}"
    }
  ],
  "isError": false
}
```

**TypeScript SDK**

```ts
// the object you get back IS the result; there is no `.result` to read
{
  executions: [
    {
      agent_type: 'Task',
      agentflow_id: '6ab53f5364cf27507387b8b5',
      agentflow_name: 'servicenow',
      created_at: 1790849767.840899,
      duration_ms: 100624,
      end_time: 1790849868.464971,
      executed_by: {
        application_user_id: null,
        is_external_application: false,
        metadata: null,
        name: 'you@example.com',
        type: 'manual'
      },
      execution_id: 'f46feb95-102c-4631-9a8f-cfac9944abc4',
      goal: 'list the incidents from the account',
      has_simulated_output: null,
      parent_execution_id: null,
      projectID: '6ab518d2d052b490e24a3302',
      session_id: null,
      simulation: false,
      status: 'completed',
      total_price: 0.019374,
      total_tokens: 25086,
      trigger_source: 'manual'
    }
  ],
  has_more: true,
  limit: 1,
  page: 1,
  status_counts: {
    completed: 2,
    failed: 2
  },
  total_count: 2
}
```

**Python SDK**

```python
# the dict you get back IS the result; there is no ["result"] to read
{
    "executions": [
        {
            "agent_type": "Task",
            "agentflow_id": "6ab53f5364cf27507387b8b5",
            "agentflow_name": "servicenow",
            "created_at": 1790849767.840899,
            "duration_ms": 100624,
            "end_time": 1790849868.464971,
            "executed_by": {
                "application_user_id": None,
                "is_external_application": False,
                "metadata": None,
                "name": "you@example.com",
                "type": "manual"
            },
            "execution_id": "f46feb95-102c-4631-9a8f-cfac9944abc4",
            "goal": "list the incidents from the account",
            "has_simulated_output": None,
            "parent_execution_id": None,
            "projectID": "6ab518d2d052b490e24a3302",
            "session_id": None,
            "simulation": False,
            "status": "completed",
            "total_price": 0.019374,
            "total_tokens": 25086,
            "trigger_source": "manual"
        }
    ],
    "has_more": True,
    "limit": 1,
    "page": 1,
    "status_counts": {
        "completed": 2,
        "failed": 2
    },
    "total_count": 2
}
```

**More details**

With no arguments you get the 20 newest runs in the project: runs a schedule or webhook started, or one another app started. Pass a row's `execution_id` to [get-execution](/docs/agents/get-execution) for the run's output. A value outside the allowed set is refused before the tool runs, at the validation stage.

`trigger_source` means: `scheduled` (a schedule fired), `webhook` (an event or trigger), `api`, `mcp`, `manual` (Run in the console), `do_mode` (a chat) or `flow` (spawned by another run). In the console, open **Orchestrate**, then **Executions** to filter and search the same list.

### Result fields

| Field | What it is |
| --- | --- |
| `executions` | The runs on this page, newest first. Each has `execution_id`, `agentflow_id`, `agentflow_name`, `status`, `trigger_source`, `created_at` and `end_time` (Unix seconds), `duration_ms`, `executed_by`, `goal`, `total_tokens` and `total_price`. |
| `total_count` | How many runs match the filters, across all pages. |
| `has_more` | Whether a later page has more runs. Ask for `page` + 1 while it is true. |
| `page`, `limit` | The page you got and its size. |
| `status_counts` | Runs per status. It counts every status, so a `status` filter narrows `executions` and `total_count` but not this. |

Every tool call works the same way: [How every tool call works](/docs/sdks-and-apis/how-every-tool-call-works).
