# Sensorium

## GET /v1/{workspace\_id}/sensorium/connector-health

> Per-source event health for the workspace (last 24h)

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"servers":[{"url":"https://api.platform.amigo.ai","description":"Production"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","description":"API key issued via `POST /v1/{workspace_id}/api-keys`. Pass the returned `api_key` value as a Bearer token."}},"schemas":{"ConnectorHealthResponse":{"properties":{"sources":{"items":{"$ref":"#/components/schemas/ConnectorHealthItem"},"type":"array","maxItems":500,"title":"Sources"},"as_of":{"type":"string","format":"date-time","title":"As Of","description":"Server clock at query time (UTC)."}},"type":"object","required":["as_of"],"title":"ConnectorHealthResponse"},"ConnectorHealthItem":{"properties":{"source":{"type":"string","maxLength":256,"minLength":1,"title":"Source","description":"Operator-defined source identifier as written to world.events.source (e.g. 'charm', 'careclinic', 'hazel'). Enum-like; never user input."},"events_per_minute":{"type":"number","minimum":0,"title":"Events Per Minute","description":"Mean events/min over the last hour (events_last_hour / 60)."},"events_last_hour":{"type":"integer","minimum":0,"title":"Events Last Hour"},"events_last_24h":{"type":"integer","minimum":0,"title":"Events Last 24H","description":"Events ingested in the last 24 hours (rolling, not calendar-day)."},"last_ingested_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Ingested At"},"freshness":{"type":"string","enum":["fresh","stale","quiet","never"],"title":"Freshness","description":"fresh < 5min · stale 5-60min · quiet > 60min · never = no events in 24h"}},"type":"object","required":["source","events_per_minute","events_last_hour","events_last_24h","last_ingested_at","freshness"],"title":"ConnectorHealthItem"}}},"paths":{"/v1/{workspace_id}/sensorium/connector-health":{"get":{"tags":["Sensorium"],"summary":"Per-source event health for the workspace (last 24h)","operationId":"get-sensorium-connector-health","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectorHealthResponse"}}}}}}}}}
```

## GET /v1/{workspace\_id}/sensorium/loop-latency

> Sense→act latency distribution for the workspace

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"servers":[{"url":"https://api.platform.amigo.ai","description":"Production"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","description":"API key issued via `POST /v1/{workspace_id}/api-keys`. Pass the returned `api_key` value as a Bearer token."}},"schemas":{"LoopLatencyResponse":{"properties":{"as_of":{"type":"string","format":"date-time","title":"As Of","description":"Server clock at query time (UTC)."},"window_hours":{"type":"integer","title":"Window Hours"},"overall_count":{"type":"integer","title":"Overall Count","description":"Total pairs across the window."},"overall_p50_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Overall P50 Seconds","description":"Median latency across the whole window; null if no pairs."},"sparkline":{"items":{"$ref":"#/components/schemas/LoopLatencyPointItem"},"type":"array","maxItems":168,"title":"Sparkline"},"truncated":{"type":"boolean","title":"Truncated","description":"True when the underlying query hit the row cap; p50 is computed over the truncated sample.","default":false}},"type":"object","required":["as_of","window_hours","overall_count"],"title":"LoopLatencyResponse"},"LoopLatencyPointItem":{"properties":{"hour":{"type":"string","format":"date-time","title":"Hour","description":"UTC hour bucket (truncated to the hour)."},"count":{"type":"integer","title":"Count","description":"Sensing→action pairs whose sensing event lands in this hour."},"p50_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"P50 Seconds","description":"Median latency for this hour; null if no pairs."}},"type":"object","required":["hour","count"],"title":"LoopLatencyPointItem"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/v1/{workspace_id}/sensorium/loop-latency":{"get":{"tags":["Sensorium"],"summary":"Sense→act latency distribution for the workspace","operationId":"get-sensorium-loop-latency","parameters":[{"name":"window_hours","in":"query","required":false,"schema":{"type":"integer","maximum":168,"minimum":1,"description":"Window size in hours (1-168).","default":24,"title":"Window Hours"},"description":"Window size in hours (1-168)."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoopLatencyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.amigo.ai/api-reference/readme/platform/sensorium.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
