---
agent:
  instructions: "Use this search API to find relevant content across this site with keywords or natural-language queries, instead of crawling individual pages. Results are returned in Markdown."
  endpoint: "https://segmentstream.com/.well-known/search?q={query}"
  method: "GET"
  documentation: "https://developers.cloudflare.com/ai-search/how-to/search-for-agents/"
---

# Inspect agent runtime activity

GET /api/workspaces/{workspaceId}/agent/observability

## Endpoint

**GET**`/api/workspaces/{workspaceId}/agent/observability`

Review aggregate session and run activity to investigate changes in load. This is a repeatable read. See observability_getAgentObservabilitySeries. Required personal key scopes: workspace:view, deployments:logs:read.

## Authorization

Bearer token · workspace:view · deployments:logs:read

## Parameters

- `workspaceId` *path · uuid · required*

  Workspace UUID returned by list workspaces.

- `window` *query · string · optional*

  Reporting interval used to aggregate observations.

  Allowed values: 1h, 24h, 7d, 30d

- `from` *query · string · optional*

  Start of the requested reporting interval.

- `to` *query · string · optional*

  End of the requested reporting interval.

- `API-Version` *header · string · optional*

  Optional platform API major version. Omit to use the current default.

  Allowed values: 1

## Responses

### `200` Success

### application/json schema

```
{
  "type": "object",
  "properties": {
    "workspaceId": {
      "type": "string",
      "description": "Workspace UUID returned by list workspaces."
    },
    "state": {
      "type": "string",
      "enum": [
        "ready",
        "not_deployed"
      ],
      "description": "`not_deployed` when the workspace's current deployment has no agent; figures are zero."
    },
    "source": {
      "type": "string",
      "enum": [
        "vercel"
      ],
      "description": "Origin of the data or source artifact used for deployment."
    },
    "sourceAt": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "When the provider answered; results are reused for a few minutes."
    },
    "window": {
      "type": "object",
      "properties": {
        "from": {
          "type": "string",
          "description": "Inclusive start, aligned to `bucketSeconds`."
        },
        "to": {
          "type": "string",
          "description": "Exclusive end, aligned to `bucketSeconds`; the last bucket may still be in progress."
        },
        "bucketSeconds": {
          "type": "integer",
          "description": "Width of one time-series bucket in seconds."
        },
        "preset": {
          "type": "string",
          "enum": [
            "1h",
            "24h",
            "7d",
            "30d"
          ],
          "description": "Predefined configuration or reporting window selected."
        }
      },
      "required": [
        "from",
        "to",
        "bucketSeconds"
      ],
      "additionalProperties": false,
      "description": "Reporting interval used to aggregate observations."
    },
    "sessions": {
      "type": "object",
      "properties": {
        "started": {
          "type": "integer",
          "minimum": 0,
          "description": "Executions or sessions that began during this interval."
        },
        "byTrigger": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "trigger": {
                "type": "string",
                "description": "Event or schedule that caused execution."
              },
              "started": {
                "type": "integer",
                "minimum": 0,
                "description": "Executions or sessions that began during this interval."
              }
            },
            "required": [
              "trigger",
              "started"
            ],
            "additionalProperties": false
          },
          "description": "By the trigger that started them, such as a channel or `http`; most first."
        },
        "ended": {
          "type": "object",
          "properties": {
            "completed": {
              "type": "integer",
              "minimum": 0,
              "description": "Number of executions that reached completion."
            },
            "failed": {
              "type": "integer",
              "minimum": 0,
              "allOf": [
                {
                  "description": "Executions or steps classified as failed."
                }
              ]
            },
            "cancelled": {
              "type": "integer",
              "minimum": 0,
              "allOf": [
                {
                  "description": "Number of executions that ended in cancellation."
                }
              ]
            }
          },
          "required": [
            "completed",
            "failed",
            "cancelled"
          ],
          "additionalProperties": false,
          "description": "By the status of each session's latest run when read."
        },
        "running": {
          "type": "integer",
          "minimum": 0,
          "allOf": [
            {
              "description": "Executions that were in progress when observed."
            }
          ]
        }
      },
      "required": [
        "started",
        "byTrigger",
        "ended",
        "running"
      ],
      "additionalProperties": false,
      "description": "Sessions started in the window."
    },
    "handoffs": {
      "type": "object",
      "properties": {
        "compaction": {
          "type": "integer",
          "minimum": 0,
          "description": "Compaction handoffs: on the deployment of the run before, after the session's context was compacted. Eve hands off once the session is idle, so several compactions in one busy stretch can make one handoff: this counts handoffs, not compactions."
        },
        "deployment": {
          "type": "integer",
          "minimum": 0,
          "description": "Deployment handoffs: on another deployment, the idle session moved to a newer one."
        },
        "unclassified": {
          "type": "integer",
          "minimum": 0,
          "description": "The run before started before the runs read, so whether it moved is unknown."
        },
        "compactionPerSession": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "median": {
                  "anyOf": [
                    {
                      "type": "number"
                    },
                    {
                      "type": "string",
                      "enum": [
                        "Infinity",
                        "-Infinity",
                        "NaN"
                      ]
                    }
                  ],
                  "allOf": [
                    {
                      "description": "Middle value of the observed distribution."
                    }
                  ]
                },
                "max": {
                  "type": "integer",
                  "minimum": 0,
                  "description": "Largest value observed in the group."
                }
              },
              "required": [
                "median",
                "max"
              ],
              "additionalProperties": false
            },
            {
              "type": "null"
            }
          ],
          "description": "Compaction handoffs of each session started in the window; null without such sessions."
        }
      },
      "required": [
        "compaction",
        "deployment",
        "unclassified",
        "compactionPerSession"
      ],
      "additionalProperties": false,
      "description": "Runs that continued a session, started in the window, by kind."
    },
    "runs": {
      "type": "object",
      "properties": {
        "total": {
          "type": "integer",
          "minimum": 0,
          "description": "Total over the selected interval or matching records."
        },
        "failed": {
          "type": "integer",
          "minimum": 0,
          "allOf": [
            {
              "description": "Executions or steps classified as failed."
            }
          ]
        },
        "failedRunIds": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The latest failed runs, to look up in the provider."
        }
      },
      "required": [
        "total",
        "failed",
        "failedRunIds"
      ],
      "additionalProperties": false,
      "description": "Run records or run counts for the selected scope."
    },
    "truncated": {
      "type": "boolean",
      "description": "The provider's runs were read up to their limit before reaching the window's start, so runs started early in the window are missing from every figure."
    }
  },
  "required": [
    "workspaceId",
    "state",
    "source",
    "sourceAt",
    "window",
    "sessions",
    "handoffs",
    "runs",
    "truncated"
  ],
  "additionalProperties": false
}
```

[Full schema and referenced types ↗](https://segmentstream.com/openapi.json)

### Example

```
{
  "workspaceId": "00000000-0000-4000-8000-000000000001",
  "state": "ready",
  "source": "vercel",
  "sourceAt": "2026-11-15T12:00:00Z",
  "window": {
    "from": "2026-11-15T11:00:00Z",
    "to": "2026-11-15T12:00:00Z",
    "bucketSeconds": 300
  },
  "sessions": {
    "started": 0,
    "byTrigger": [],
    "ended": {
      "completed": 0,
      "failed": 0,
      "cancelled": 0
    },
    "running": 0
  },
  "handoffs": {
    "compaction": 0,
    "deployment": 0,
    "unclassified": 0,
    "compactionPerSession": null
  },
  "runs": {
    "total": 0,
    "failed": 0,
    "failedRunIds": []
  },
  "truncated": false
}
```

### Response headers

- API-Version

  Supported platform API major version.

- RateLimit

  Remaining quota (r) and seconds until reset (t), when admission is available.

- RateLimit-Policy

  Request quota (q) and window in seconds (w).

- Deprecation

  Present when the operation is deprecated. RFC 9745 date in seconds since the Unix epoch.

- Sunset

  Present when retirement is scheduled. HTTP date of planned removal, per RFC 8594.

### `400` Error

### application/json schema

```
{
  "type": "object",
  "properties": {
    "error": {
      "type": "string",
      "description": "Machine-readable error code or diagnostic reported by the operation."
    },
    "detail": {
      "type": "string",
      "description": "Human-readable explanation of the failure."
    },
    "requestId": {
      "type": "string",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$",
      "format": "uuid",
      "description": "Correlation ID for tracing the request with support."
    },
    "retryable": {
      "type": "boolean",
      "description": "Whether retrying the same failed request may succeed."
    }
  },
  "required": [
    "error",
    "detail",
    "requestId",
    "retryable"
  ],
  "additionalProperties": true
}
```

[Full schema and referenced types ↗](https://segmentstream.com/openapi.json)

### Response headers

- API-Version

  Supported platform API major version.

- RateLimit

  Remaining quota (r) and seconds until reset (t), when admission is available.

- RateLimit-Policy

  Request quota (q) and window in seconds (w).

### `401` Error

### application/json schema

```
{
  "type": "object",
  "properties": {
    "error": {
      "type": "string",
      "description": "Machine-readable error code or diagnostic reported by the operation."
    },
    "detail": {
      "type": "string",
      "description": "Human-readable explanation of the failure."
    },
    "requestId": {
      "type": "string",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$",
      "format": "uuid",
      "description": "Correlation ID for tracing the request with support."
    },
    "retryable": {
      "type": "boolean",
      "description": "Whether retrying the same failed request may succeed."
    }
  },
  "required": [
    "error",
    "detail",
    "requestId",
    "retryable"
  ],
  "additionalProperties": true
}
```

[Full schema and referenced types ↗](https://segmentstream.com/openapi.json)

### Response headers

- API-Version

  Supported platform API major version.

- RateLimit

  Remaining quota (r) and seconds until reset (t), when admission is available.

- RateLimit-Policy

  Request quota (q) and window in seconds (w).

### `403` Error

### application/json schema

```
{
  "type": "object",
  "properties": {
    "error": {
      "type": "string",
      "description": "Machine-readable error code or diagnostic reported by the operation."
    },
    "detail": {
      "type": "string",
      "description": "Human-readable explanation of the failure."
    },
    "requestId": {
      "type": "string",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$",
      "format": "uuid",
      "description": "Correlation ID for tracing the request with support."
    },
    "retryable": {
      "type": "boolean",
      "description": "Whether retrying the same failed request may succeed."
    }
  },
  "required": [
    "error",
    "detail",
    "requestId",
    "retryable"
  ],
  "additionalProperties": true
}
```

[Full schema and referenced types ↗](https://segmentstream.com/openapi.json)

### Response headers

- API-Version

  Supported platform API major version.

- RateLimit

  Remaining quota (r) and seconds until reset (t), when admission is available.

- RateLimit-Policy

  Request quota (q) and window in seconds (w).

### `404` Error

### application/json schema

```
{
  "type": "object",
  "properties": {
    "error": {
      "type": "string",
      "description": "Machine-readable error code or diagnostic reported by the operation."
    },
    "detail": {
      "type": "string",
      "description": "Human-readable explanation of the failure."
    },
    "requestId": {
      "type": "string",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$",
      "format": "uuid",
      "description": "Correlation ID for tracing the request with support."
    },
    "retryable": {
      "type": "boolean",
      "description": "Whether retrying the same failed request may succeed."
    }
  },
  "required": [
    "error",
    "detail",
    "requestId",
    "retryable"
  ],
  "additionalProperties": true
}
```

[Full schema and referenced types ↗](https://segmentstream.com/openapi.json)

### Response headers

- API-Version

  Supported platform API major version.

- RateLimit

  Remaining quota (r) and seconds until reset (t), when admission is available.

- RateLimit-Policy

  Request quota (q) and window in seconds (w).

### `406` Unsupported platform API version

### application/json schema

```
{
  "type": "object",
  "properties": {
    "error": {
      "type": "string",
      "description": "Machine-readable error code or diagnostic reported by the operation."
    },
    "detail": {
      "type": "string",
      "description": "Human-readable explanation of the failure."
    },
    "requestId": {
      "type": "string",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$",
      "format": "uuid",
      "description": "Correlation ID for tracing the request with support."
    },
    "retryable": {
      "type": "boolean",
      "description": "Whether retrying the same failed request may succeed."
    }
  },
  "required": [
    "error",
    "detail",
    "requestId",
    "retryable"
  ],
  "additionalProperties": true
}
```

[Full schema and referenced types ↗](https://segmentstream.com/openapi.json)

### Response headers

- API-Version

  Supported platform API major version.

- RateLimit

  Remaining quota (r) and seconds until reset (t), when admission is available.

- RateLimit-Policy

  Request quota (q) and window in seconds (w).

### `409` Error

### application/json schema

```
{
  "type": "object",
  "properties": {
    "error": {
      "type": "string",
      "description": "Machine-readable error code or diagnostic reported by the operation."
    },
    "detail": {
      "type": "string",
      "description": "Human-readable explanation of the failure."
    },
    "requestId": {
      "type": "string",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$",
      "format": "uuid",
      "description": "Correlation ID for tracing the request with support."
    },
    "retryable": {
      "type": "boolean",
      "description": "Whether retrying the same failed request may succeed."
    }
  },
  "required": [
    "error",
    "detail",
    "requestId",
    "retryable"
  ],
  "additionalProperties": true
}
```

[Full schema and referenced types ↗](https://segmentstream.com/openapi.json)

### Response headers

- API-Version

  Supported platform API major version.

- RateLimit

  Remaining quota (r) and seconds until reset (t), when admission is available.

- RateLimit-Policy

  Request quota (q) and window in seconds (w).

### `429` Request limit reached

### application/json schema

```
{
  "type": "object",
  "properties": {
    "error": {
      "type": "string",
      "description": "Machine-readable error code or diagnostic reported by the operation."
    },
    "detail": {
      "type": "string",
      "description": "Human-readable explanation of the failure."
    },
    "requestId": {
      "type": "string",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$",
      "format": "uuid",
      "description": "Correlation ID for tracing the request with support."
    },
    "retryable": {
      "type": "boolean",
      "description": "Whether retrying the same failed request may succeed."
    }
  },
  "required": [
    "error",
    "detail",
    "requestId",
    "retryable"
  ],
  "additionalProperties": true
}
```

[Full schema and referenced types ↗](https://segmentstream.com/openapi.json)

### Response headers

- Retry-After

  Seconds to wait before retrying the request.

- API-Version

  Supported platform API major version.

- RateLimit

  Remaining quota (r) and seconds until reset (t), when admission is available.

- RateLimit-Policy

  Request quota (q) and window in seconds (w).

### `500` Error

### application/json schema

```
{
  "type": "object",
  "properties": {
    "error": {
      "type": "string",
      "description": "Machine-readable error code or diagnostic reported by the operation."
    },
    "detail": {
      "type": "string",
      "description": "Human-readable explanation of the failure."
    },
    "requestId": {
      "type": "string",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$",
      "format": "uuid",
      "description": "Correlation ID for tracing the request with support."
    },
    "retryable": {
      "type": "boolean",
      "description": "Whether retrying the same failed request may succeed."
    }
  },
  "required": [
    "error",
    "detail",
    "requestId",
    "retryable"
  ],
  "additionalProperties": true
}
```

[Full schema and referenced types ↗](https://segmentstream.com/openapi.json)

### Response headers

- API-Version

  Supported platform API major version.

- RateLimit

  Remaining quota (r) and seconds until reset (t), when admission is available.

- RateLimit-Policy

  Request quota (q) and window in seconds (w).

### `503` Error

### application/json schema

```
{
  "type": "object",
  "properties": {
    "error": {
      "type": "string",
      "description": "Machine-readable error code or diagnostic reported by the operation."
    },
    "detail": {
      "type": "string",
      "description": "Human-readable explanation of the failure."
    },
    "requestId": {
      "type": "string",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$",
      "format": "uuid",
      "description": "Correlation ID for tracing the request with support."
    },
    "retryable": {
      "type": "boolean",
      "description": "Whether retrying the same failed request may succeed."
    }
  },
  "required": [
    "error",
    "detail",
    "requestId",
    "retryable"
  ],
  "additionalProperties": true
}
```

[Full schema and referenced types ↗](https://segmentstream.com/openapi.json)

### Response headers

- API-Version

  Supported platform API major version.

- RateLimit

  Remaining quota (r) and seconds until reset (t), when admission is available.

- RateLimit-Policy

  Request quota (q) and window in seconds (w).

[Read as Markdown ↗](https://segmentstream.com/docs/api/observability/observability_getAgentObservability.md)
