When to reach for an agent
An agent costs tokens, and that cost varies from run to run. It earns that cost only when cheaper, predictable blocks cannot produce the answer. Reach for the Web agent or Custom agent block when every one of these is true:- The input is unstructured text or public web context. No Filter or Formula block can read it reliably.
- A fixed rule would be brittle. The signal lives in nuance, not in a single field value.
- A correct answer is worth more than the tokens it costs to produce.
- A human can live with the occasional uncertain or wrong answer downstream.
When to use a cheaper block instead
A logic, math, or lookup block is faster, free, and predictable. Prefer it whenever it can decide the answer on its own. Skip the agent and reach for one of these deterministic blocks when any of these is true:- A Filter, Formula, or Find records block can produce the answer from data you already have.
- The workflow runs at high volume. Token cost adds up across every run.
- The result changes a customer-facing message and no human reviews it first.
- The source the agent would need is private, login-gated, or unreliable. The Web agent block cannot read it.
The Classify record, Classify text, and Summarize record blocks sit between these two extremes. They are AI blocks, so they too carry a variable token cost. But their job is narrow and their output is tightly constrained. They are often the right middle choice before you reach for a full agent.
Writing a prompt that returns usable fields
A good agent prompt does three things. It names the role the agent plays, it limits the evidence the agent may use, and it demands a fixed output shape. That fixed shape is what lets you map each part of the answer into a separate attribute downstream. Ask for the exact fields you plan to save. Tell the agent to admit uncertainty rather than invent a value. The prompt below qualifies an inbound account. It returns four labeled parts you can map one-to-one into text attributes. It also tells the agent to writeunknown instead of guessing.
acme.com with owner Priya Sharma. The agent returns a short summary paragraph, a qualification signal such as Strong fit, a plain note of what it could not verify, and a recommended next action. Each of those four parts becomes the value of a separate attribute in the next step.
Choosing a model
The Custom agent block lets you pick the model that runs the prompt. Attio offers OpenAI’s GPT, Anthropic’s Sonnet and Opus, and Google’s Gemini Flash and Gemini Pro. A faster, cheaper model handles classification and short summaries well. A stronger model costs more per token. Use it only on synthesis tasks, where better reasoning changes the answer.Saving the output so it persists
An agent does not write to a record on its own. The answer it returns lives only inside the run. So an agent step by itself changes nothing in your data. To keep the answer, follow the agent with a write block and map each returned field into an attribute. Skip that step and the answer disappears when the run ends.1
Add the agent block
Place the Web agent or Custom agent block after your trigger and any filtering. Configure its questions or prompt to return the exact fields you intend to store.
2
Add a write block after it
Add an Update record block for a record, or an Update list entry block for a list entry. The agent block must run before the write block so its output is available.
3
Map each answer into an attribute
In the write block, set each target text attribute to the matching part of the agent’s response. For the qualification prompt, map the summary into a
Research notes attribute and the qualification signal into an ICP fit attribute.acme.com writes the agent’s summary and qualification signal onto the company record. The rest of the team can then read them. Without the write block, the same run produces an answer that no one ever sees.
Controlling token cost before you publish
Agent blocks carry a variable, token-based credit cost. A careless trigger can spend far more than a fixed-cost block ever would. Three habits keep that cost bounded. They are listed here from most effective to least.1
Filter before the agent, never after
Put a free Filter block ahead of the agent. Only records that pass the filter reach it. Every record that touches the agent costs tokens, and the free filter does the gatekeeping for nothing.
2
Trim the prompt surface
Ask the Web agent block fewer, sharper questions. Give the Custom agent block tighter instructions. Fewer questions and shorter context mean fewer tokens per run.
3
Measure ten representative runs
Run the workflow on ten representative records and read the per-run credit cost in the run viewer. Use that figure to decide whether the agent triggers on every new record or only on a filtered subset.