Guard rails and budget for an agent
An agent in Flow always runs in a box: a budget for tokens, tool calls and time, and guard rails that run before the model and cannot be got around with a clever prompt. You create an agent, set its budget and guard rails, and watch an attempt at prompt injection fail before the model sees anything.
Say what it does
Under Brain you choose the AI model at Execution. The goal and the instructions steer the behaviour. Also write what the agent must never do: the box enforces the limits, the instructions make them understandable.
- In Execution Rules (no AI model) · region LOCAL Echo (test, no model) · region LOCA, choose Scripted AI (test street) · region UNKNOWN
- In Goal, type
Answers questions about purchasing and delivery times. - In Instructions, type
Answer briefly and factually. Never make promises about prices or discounts.

Set the budget
The budget applies per run: so many tokens, so many tool calls, so many seconds. Before every model call Flow estimates what it costs, so the agent stops before it overspends, not afterwards. The seconds also hold during a call: a model that does not answer never waits longer than the time left, and every retry shows in the trace.
Try an attack
On the right under Try you fill in the agent's input. A question that tries to talk the agent round never even reaches the model: the guard rail stops it and the outcome is blocked, with the reason.
Ask an ordinary question
Now a real question. The model answers inside the box; under Usage you see tokens, tool calls and time against the budget, and under What happened every decision of the box.
This guide was carried out step by step on 22 Oct 2026 by an automated test on Flow (version 3e563176).
















