Skip to main content
Agent Blocks are the bridge between Agents and Workflows. A workflow gives you reliable, repeatable structure — triggers, branching, and integrations that run the same way every time. An agent gives you judgment — the ability to read messy input, reason about it, and decide what to do. An Agent Block lets you drop that judgment into any step of a workflow, so the structured parts stay deterministic while the hard parts get handled by an AI agent.
Agent Blocks run an agent you’ve already built in Scout. If you don’t have one yet, start with Getting Started with Agents and come back once you have an agent to embed.

When to Use an Agent Block

Reach for an Agent Block whenever a step needs to interpret something rather than follow a fixed rule. Processing unstructured data. Pull intent, urgency, and key details out of an incoming email, support ticket, or document — text that has no fixed schema and can’t be parsed with a condition. Intelligent routing. Categorize tickets, score and qualify leads, or tag feedback so downstream blocks can branch on the result. Content generation. Draft a follow-up email, summarize a meeting, or produce a report from the data the workflow has gathered so far. Research and enrichment. Research a company, surface recent news, or assemble context about a contact before the workflow records or acts on it.
If a step is purely deterministic — “route to engineering when priority == 1” — use a Condition Block instead. Agent Blocks are for the steps that genuinely need language understanding or judgment.

How Agent Blocks Work

Adding a block

1

Open the workflow builder

Open the workflow where you want to add AI judgment, and click the + to add a new block.
2

Select Agent Block

Choose Agent Block from the block picker, then select which of your agents should run at this step.
3

Write the prompt and map inputs

Give the agent its instructions for this step and map in the inputs it needs (see below).
4

Set the output format

Choose how the agent should return its result — plain text, JSON, or structured data — based on what downstream blocks expect.

Configuring inputs

An Agent Block can draw its inputs from three sources:
  • The workflow trigger — data from the event that started the run, e.g. {{ trigger.ticket_body }}
  • Previous blocks — output from any block earlier in the workflow
  • Static values — fixed text or configuration you type directly
You reference dynamic inputs with Jinja template syntax. For example, to pass the body of an incoming ticket into the agent:
{{ trigger.ticket_body }}
Keep inputs small and explicit. Pass only the fields the agent needs to make its decision — not the entire workflow state. Focused inputs produce more reliable results and make the workflow easier to debug.

Handling output

The agent’s response is available to downstream blocks as agent_result, referenced through the block’s name. If an Agent Block named analyze_ticket returns a structured result, later blocks can read individual fields:
{{ blocks.analyze_ticket.agent_result.category }}
{{ blocks.analyze_ticket.agent_result.urgency }}
{{ blocks.analyze_ticket.agent_result.suggested_action }}
When an agent returns JSON, parse it with a JSON block before referencing individual fields downstream. That guarantees later blocks receive clean, structured data instead of a raw string.

Example: Meeting Follow-up Workflow

This workflow turns a raw meeting transcript into tracked tasks and a drafted follow-up email — without anyone reviewing the transcript by hand.
1

Webhook trigger

A webhook receives the meeting transcript when the call ends.
2

Agent Block — extract action items

An agent reads the transcript and extracts action items, decisions, and follow-ups, assigning an owner and deadline to each.
3

Action Block — create tasks

An Action Block creates a task in your project tool for each action item the agent returned.
4

Agent Block — draft the email

A second agent drafts a follow-up email summarizing the decisions and next steps.
5

Action Block — send the email

An Action Block sends the draft through Gmail to the meeting attendees.
The workflow runs the same way every time, while the agents absorb the nuance of each individual meeting — different attendees, different decisions, different follow-ups.

Example: Lead Intelligence Workflow

This workflow enriches a new lead, records it, and routes it based on its value — combining research, a CRM write, content generation, and branching in a single run.
1

Webhook trigger

A webhook fires when a new lead submits a form.
2

Agent Block — research the company

An agent researches the lead’s company and assembles context: size, industry, recent news, and a lead score.
3

Action Block — create the CRM record

An Action Block creates a CRM record populated with the enriched data.
4

Agent Block — generate outreach

An agent generates a personalized outreach email tailored to the company and its context.
5

Condition Block — route by lead score

A Condition Block checks the lead score: high-value leads notify a sales rep immediately, while the rest enter a nurture sequence.

Best Practices

Keep agents focused. One task per block. Chain several focused Agent Blocks rather than asking a single agent to do everything — focused agents are more accurate and far easier to debug when something goes wrong. Define clear outputs. Tell the agent exactly what format to return, ideally JSON with named fields like category, urgency, summary, and suggested_action. Predictable output is what makes downstream blocks reliable. Handle edge cases. Add a Condition Block after the agent to catch invalid or low-confidence output and route it to a human review queue instead of letting the workflow act on a bad result. Use instructions as configuration. Be specific in the prompt about the inputs, the required output format, and any constraints. The prompt is how you tune an Agent Block’s behavior for its place in the workflow.

Limitations

  • Agent Blocks run synchronously by default. The workflow waits for the agent to finish before moving to the next block.
  • Split long tasks. Complex work that takes more than a few seconds should be broken across multiple blocks, or handled with async interactions so the workflow isn’t blocked.
  • Use Condition Blocks for deterministic logic. If a decision doesn’t require judgment, a Condition Block is faster and more predictable than an agent.

Next Steps

Workflows Overview

See how triggers, blocks, and branching fit together.

Workflow Blocks

Explore every block type you can combine with Agent Blocks.

Agents Overview

Build and configure the agents you embed in workflows.

Delegation

Coordinate multiple agents on a single complex task.