> ## Documentation Index
> Fetch the complete documentation index at: https://docs.machinefi.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Monitoring Modes and Delivery Patterns

> Understand Trio endpoint modes and how results are delivered

## Core Model

Trio exposes two interaction styles:

* Synchronous check: one request, one immediate result
* Asynchronous jobs: create a job, then receive progress/results by polling, webhook, or SSE

## Endpoints by Monitoring Mode

| Endpoint             | Purpose                              | Typical output                  |
| -------------------- | ------------------------------------ | ------------------------------- |
| `POST /check-once`   | One immediate yes/no check           | JSON response                   |
| `POST /live-monitor` | Detect when a condition becomes true | Job lifecycle + trigger result  |
| `POST /live-digest`  | Generate summaries over time windows | Job lifecycle + summary results |

## Delivery Patterns

### 1. Synchronous JSON

Use `POST /check-once` when you need a direct answer in one call.

### 2. Polling

Create a monitor or digest job, then poll `GET /jobs/{job_id}` until terminal status.

### 3. Webhooks

Include `webhook_url` in the request body to receive push callbacks.

### 4. SSE

Send `Accept: text/event-stream` for live event streaming during request handling.

## Delivery Selection Rules

### `POST /live-monitor`

1. `webhook_url` present -> webhook mode
2. `Accept: text/event-stream` and no `webhook_url` -> SSE mode
3. otherwise -> polling mode

### `POST /live-digest`

1. `Accept: text/event-stream` and no `webhook_url` -> SSE mode
2. `webhook_url` present -> webhook mode
3. otherwise -> polling mode

## Picking the Right Pattern

* Prefer `check-once` for validation and quick decision points.
* Prefer polling for simple backend jobs.
* Prefer webhooks for workflow automation.
* Prefer SSE for live progress in apps.

## Next Steps

* Job states and transitions: [Job Lifecycle](/core-concepts/job-lifecycle)
* Endpoint-level response behavior: [Live Monitor](/api-reference/live-monitor)
* Delivery with callbacks: [Use Webhooks](/guides/webhooks)
* Delivery with polling: [Use Polling](/guides/poll-jobs)
* Delivery with streams: [Use SSE Streaming](/guides/sse-streaming)
