> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/nemo/guardrails/llms.txt.
> For full documentation content, see https://docs.nvidia.com/nemo/guardrails/llms-full.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.nvidia.com/nemo/guardrails/_mcp/server.

# nemoguardrails.colang.v1_0.runtime.sliding

## Module Contents

### Functions

| Name                                                         | Description                                 |
| ------------------------------------------------------------ | ------------------------------------------- |
| [`slide`](#nemoguardrails-colang-v1_0-runtime-sliding-slide) | Try to slide a flow with the provided head. |

### Data

[`log`](#nemoguardrails-colang-v1_0-runtime-sliding-log)

### API

```python
nemoguardrails.colang.v1_0.runtime.sliding.slide(
    state: State,
    flow_config: FlowConfig,
    head: int
) -> typing.Optional[int]
```

Try to slide a flow with the provided head.

Sliding is the operation of moving through "non-matching" elements e.g., check,
if, jump, expect, etc. It also includes calling sub-flows.

**Parameters:**

The current state of the dialog.

The config of the flow that should be advanced.

The current head.

**Returns:** `Optional[int]`

Optional\[int]: The updated head after sliding. If the flow finishes, returns a negative value.

```python
nemoguardrails.colang.v1_0.runtime.sliding.log = logging.getLogger(__name__)
```