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

# Run After Model • AI Agent SDK

> run_after_model: Run all after_model hooks (in reverse order).

# run\_after\_model

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

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

Run all after\_model hooks (in reverse order).

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def run_after_model(response: ModelResponse) -> ModelResponse
```

## Parameters

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

### Returns

<ResponseField name="Returns" type="ModelResponse">
  The result of the operation.
</ResponseField>

## Uses

* `hook`

## Used By

* [`MiddlewareManager.execute_model_call`](../functions/MiddlewareManager-execute_model_call)

## Source

<Card title="View on GitHub" icon="github" href="https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/hooks/middleware.py#L367">
  `praisonaiagents/hooks/middleware.py` at line 367
</Card>
