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

# RuntimeObserver

> Caller-owned observer, invoked synchronously by observing clients

```python theme={null}
from grid_cortex_client import RuntimeObserver
```

Caller-owned observer, invoked synchronously by observing clients.

Methods should finish quickly, for example by queuing a snapshot for a
background writer. The SDK neither flushes nor closes the observer. An
observer shared across clients must support their calling threads/tasks.
Ordinary observer exceptions never replace inference results or exceptions.

## Methods

### `on_error()`

```python Signature theme={null}
on_error() -> None
```

Mark recording incomplete after event construction or delivery failed.

### `on_event()`

```python Signature theme={null}
on_event(event: CortexExecutionEvent) -> None
```

Receive a request, response, or error event.


## Related topics

- [grid-cortex-client](/v2.2/python-api/grid-cortex-client/overview.md)
- [create_execution_observer](/v2.2/python-api/grid-nexus-client/create_execution_observer.md)
- [grid-nexus-client](/v2.2/python-api/grid-nexus-client/overview.md)
- [Session Configuration](/v2.2/simulation/airgen/session_configuration.md)
- [CortexExecutionEvent](/v2.2/python-api/grid-cortex-client/cortexexecutionevent.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.