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

# File Emergency Stop • AI Agent SDK

> FileEmergencyStop: Durable, fail-safe file-sentinel operator brake.

# FileEmergencyStop

> Defined in the [**protocols**](../modules/protocols) module.

<Badge color="blue">AI Agent</Badge>

Durable, fail-safe file-sentinel operator brake.

Engaging writes a small JSON sentinel at `path`; disengaging removes it.
The engaged state therefore survives a crash/restart (durable) and is
shared by every lane that consults the same path.

Fail-safe: any error reading the sentinel — a partially written file,
corrupt JSON, a permission error — is treated as *engaged*. An ambiguous
brake holds new work; it never silently falls open to "run freely". The
common, unambiguous case (sentinel simply absent) reports not-engaged.

Pure-stdlib (`os`/`json`): no new dependency, safe to live in core.

## Constructor

<ParamField query="path" type="str" required={true}>
  No description available.
</ParamField>

## Methods

<CardGroup cols={2}>
  <Card title="is_engaged()" icon="function" href="../functions/FileEmergencyStop-is_engaged">
    Instance method.
  </Card>

  <Card title="engage()" icon="function" href="../functions/FileEmergencyStop-engage">
    Instance method.
  </Card>

  <Card title="disengage()" icon="function" href="../functions/FileEmergencyStop-disengage">
    Instance method.
  </Card>

  <Card title="state()" icon="function" href="../functions/FileEmergencyStop-state">
    Instance method.
  </Card>
</CardGroup>

## Source

<Card title="View on GitHub" icon="github" href="https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/gateway/protocols.py#L6376">
  `praisonaiagents/gateway/protocols.py` at line 6376
</Card>
