> ## 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.

# Drain Requested • AI Agent SDK

> drain_requested: Return whether ``marker`` is a live drain request for this instance.

# drain\_requested

<div className="flex items-center gap-2">
  <Badge color="purple">Method</Badge>
</div>

> This is a method of the [**DrainMarkerPolicy**](../classes/DrainMarkerPolicy) class in the [**protocols**](../modules/protocols) module.

Return whether `marker` is a live drain request for this instance.

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def drain_requested(marker: Optional[Dict[str, Any]], current_epoch: str, now: float) -> bool
```

## Parameters

<ParamField query="marker" type="Optional" required={true}>
  Parsed marker contents, or `None` when no marker file is present.
</ParamField>

<ParamField query="current_epoch" type="str" required={true}>
  The current instantiation epoch (see :func:`current_epoch`).
</ParamField>

<ParamField query="now" type="float" required={true}>
  A monotonic timestamp (unused by the default policy; accepted so subclasses can implement TTL/debounce without changing the call site).
</ParamField>

### Returns

<ResponseField name="Returns" type="bool">
  `True` only for a non-stale, current-epoch drain request that has
  not already been handled.
</ResponseField>

## Source

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