> For the complete documentation index, see [llms.txt](https://docs.augelab.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.augelab.com/function-blocks/blocks-reference/input-output/data-inputs/headless-check.md).

# Headless Check

This function block reports whether the current run is operating in headless mode (no user interface). Use it to adapt behavior when running on servers or automated environments.

## 📥 Inputs <a href="#inputs" id="inputs"></a>

This block does not have any inputs.

## 📤 Outputs <a href="#outputs" id="outputs"></a>

`Check` This output provides a boolean value: TRUE when the scenario is running headless, FALSE when a user interface is available.

## 🕹️ Controls <a href="#controls" id="controls"></a>

This block does not expose any user controls.

## 🎯 Features <a href="#features" id="features"></a>

* Simple TRUE/FALSE indicator suitable for flow control.
* Lightweight and safe to place anywhere in the flow to adapt downstream behavior.
* Works well as a gating signal for UI-dependent blocks or for toggling logging and export behavior in automated runs.

## 📝 How to use <a href="#usage" id="usage"></a>

1. Place the block where you need to decide between UI and non-UI behavior.
2. Connect the `Check` output to logic or control blocks to enable/disable branches (for example, to skip visual outputs when headless).
3. Use the result with logic blocks (And / Or / Not) or flow-control blocks to implement conditional behavior.

## 📊 Evaluation <a href="#evaluation" id="evaluation"></a>

When evaluated, this block returns a single boolean on `Check` indicating the presence or absence of a user interface for the current run.

## 💡 Tips and Tricks <a href="#tips-and-tricks" id="tips-and-tricks"></a>

* To avoid opening windows on servers, use `Check` to gate `Show Image` so image viewers are only enabled when not headless.
* In headless runs you may prefer saving results instead of showing them. Combine `Check` with export blocks like Image Logger, Image Write, Record Video, or CSV Export to automatically save outputs when headless.
* Use `Check` together with logic blocks such as Not, And or Or to build flexible rules (for example: save images only when headless AND a `Logic Input` trigger is active).
* When running automated evaluations, connect `Check` to Stop to gracefully end UI-based scenarios only when a UI is present.

## 🛠️ Troubleshooting <a href="#troubleshooting" id="troubleshooting"></a>

* If the environment seems to be headless but `Check` returns FALSE, verify how the scenario was started (some remote desktop or virtual displays may present as GUI).
* If you need different behavior for partially-headless setups (e.g., background GPU processes but occasional UI), combine `Check` with manual `Logic Input` to refine control.
