# How do hooks work

Squid's hooks are powered by the [Squid Multicall contract.](https://docs.squidrouter.com/additional-resources/contracts) An arbitrary number of calls can be executed before or after a swap or bridge.

<figure><img src="/files/LFTvoiWAOQENEXv3c1uE" alt=""><figcaption></figcaption></figure>

Note that hooks can be executed before or after a single chain swap too.

<figure><img src="/files/62UQXrWcVcuT8YJBCfCu" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.squidrouter.com/api-and-sdk-integration/key-concepts/hooks/how-do-hooks-work.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
