---
title: "Limits"
space: "Framework"
url: "https://docs.frappe.io/framework/flow/limits"
updated: "2026-11-18"
---

Flow has a few limits that stop a run from going on too long or holding up your site. This page lists them and how to change the ones you can.

## Steps and tokens

You set these on the agent, under **Settings** &gt; **Agents**.

| Limit          | Default   | What you see at the limit                |
| -------------- | --------- | ---------------------------------------- |
| Max iterations | 100 steps | "The agent hit its iteration limit."     |
| Token budget   | No limit  | "The agent hit its output token budget." |


Both limits count for one run, so you can send another message to carry on in the same chat. A new value applies to new chats.

The built-in Flow agent can take 500 steps, and you can't change that.

## Timeouts

| What                               | Limit                          | How to change it                                                         |
| ---------------------------------- | ------------------------------ | ------------------------------------------------------------------------ |
| A tool call                        | 120 seconds                    | Set `flow_callback_timeout` in the site config. It applies to new chats. |
| A tool that runs in the background | 25 minutes                     | Set `flow_background_tool_timeout` in the site config.                   |
| A reply from the model             | 120 seconds without any output |                                                                          |


Both settings are in seconds. For example:

```bash
bench --site your-site set-config -p flow_callback_timeout 300
```

A tool call is a web request to your site, so the web server's own request timeout still applies. If a tool is always slow, open it under **Settings** &gt; **Tools** and turn on **Run in background**. The tool then runs as a background job, so the workers must be running.

## Attachments

- You can attach up to 10 files to a message.
- If the model can't see images, Flow reads only the text in an image.
- In a scanned PDF, Flow reads the text of the first 20 pages.
- Flow can't read a password-protected PDF.