# AsyncApprovalHITLMiddleware

> **Class** in `deepagents_code`

📖 [View in docs](https://reference.langchain.com/python/deepagents-code/agent/AsyncApprovalHITLMiddleware)

Stock HITL routing with an async live-mode read after model completion.

The transient routing marker is added only to a shallow state copy passed
directly into stock HITL routing. It is neither checkpointed nor accepted
without the process-local `_RoutingDecision` type identity, so graph input
cannot forge an autonomous mode.

## Signature

```python
AsyncApprovalHITLMiddleware(
    self,
    interrupt_on: Mapping[str, bool | InterruptOnConfig],
)
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `interrupt_on` | `Mapping[str, bool \| InterruptOnConfig]` | Yes | Stock per-tool approval configurations. |

## Extends

- `HumanInTheLoopMiddleware[Any, Any, Any]`

## Constructors

```python
__init__(
    self,
    interrupt_on: Mapping[str, bool | InterruptOnConfig],
) -> None
```

| Name | Type |
|------|------|
| `interrupt_on` | `Mapping[str, bool \| InterruptOnConfig]` |


## Properties

- `trace_policy`
- `name`

## Methods

- [`aafter_model()`](https://reference.langchain.com/python/deepagents-code/agent/AsyncApprovalHITLMiddleware/aafter_model)
- [`after_model()`](https://reference.langchain.com/python/deepagents-code/agent/AsyncApprovalHITLMiddleware/after_model)

---

[View source on GitHub](https://github.com/langchain-ai/deepagents/blob/caaa7e7c12d214afa5cf0a1afed8eb6232aa6f7b/libs/code/deepagents_code/agent.py#L2182)