Agent Blocks in Workflows
Bring AI intelligence to your automated workflows by using agents as workflow blocks.
What are Agent Blocks?
Agent Blocks let you run AI agents as steps within a workflow. This combines the reliability of predefined workflows with the adaptability of AI agents, giving you the best of both worlds.
Instead of rigid if/then logic, an Agent Block can:
- Analyze data and make intelligent decisions
- Handle variations and unexpected inputs
- Extract information from unstructured text
- Generate personalized content
- Route work to the right destination
When to Use Agent Blocks
Processing Unstructured Data
When a webhook receives data that doesnβt follow a predictable format:
Trigger: New email arrives
β
Agent Block: Analyze email, extract sender intent, urgency and key information
β
Condition: Route based on agent's analysis
ββ Urgent β Create high-priority ticket
ββ Sales inquiry β Forward to CRM
ββ General β Auto-respond and archiveIntelligent Routing
Let an agent decide where data should go:
- Categorize support tickets by topic and assign to the right team
- Evaluate leads and route to appropriate sales rep
- Analyze feedback and tag for product, engineering or marketing
Content Generation
Create personalized content as part of an automation:
- Generate custom email responses
- Create meeting summaries from transcripts
- Draft reports based on collected data
Research and Enrichment
Have an agent research and add context:
- Webhook receives a new contact β Agent researches company and enriches record
- Lead comes in β Agent finds relevant news and adds talking points
- Customer mentioned β Agent pulls recent activity for context
How Agent Blocks Work
Input Configuration
Agent Blocks receive data from:
- Workflow trigger β The initial event (webhook payload, schedule, etc.)
- Previous blocks β Output from earlier workflow steps
- Static values β Fixed parameters you define
Agent Selection
Choose any agent youβve built in Scout:
- Select from your agent library
- Pass context and instructions specific to this workflow
- Configure response format (text, JSON, structured data)
Output Handling
The agentβs response becomes available for subsequent blocks:
// Access agent output in later blocks
{
"agent_result": {
"category": "technical-support",
"urgency": "high",
"suggested_response": "Based on the error...",
"assign_to": "engineering-team"
}
}Example: Meeting Follow-up Workflow
This workflow demonstrates how Agent Blocks create intelligent automation:
Trigger: Webhook (meeting transcript received from video conferencing)
β
Agent Block: Analyze Transcript
Input: meeting_transcript
Instructions: "Extract action items, decisions made and follow-ups.
Identify owners and deadlines."
β
Action Block: Create Tasks
For each action item β Create task in project management tool
β
Agent Block: Draft Follow-up Email
Input: meeting_summary, attendees, action_items
Instructions: "Write a professional follow-up email summarizing
the meeting and highlighting action items."
β
Action Block: Send Email
Send draft via Gmail to all attendeesThe workflow is reliable and repeatable, but the agents handle the nuance of understanding each unique meeting.
Example: Lead Intelligence Workflow
Trigger: Webhook (new lead from website form)
β
Agent Block: Research Company
Input: lead_company_name
Instructions: "Research this company. Find their industry,
size, recent news and potential pain points
our product could address."
β
Action Block: Create CRM Record
Create contact with enriched data
β
Agent Block: Generate Outreach
Input: research_findings, lead_info
Instructions: "Write a personalized outreach email addressing
their likely needs based on the research."
β
Condition: Check Lead Score
If high-value β Notify sales rep immediately
Otherwise β Add to nurture sequenceBest Practices
Keep Agents Focused
Each Agent Block should do one thing well:
- β βExtract the purchase intent from this messageβ
- β βAnalyze everything about this customer and decide what to doβ
Chain multiple focused Agent Blocks instead of one complex agent.
Define Clear Outputs
Structure your agent instructions to return predictable formats:
Instructions: "Analyze this support ticket. Return JSON with:
- category: one of [technical, billing, feature-request, other]
- urgency: one of [low, medium, high, critical]
- summary: 1-2 sentence summary
- suggested_action: what should happen next"This makes the output easy to use in subsequent workflow blocks.
Handle Edge Cases
Agents are powerful but not infallible. Add fallback logic:
Agent Block β Condition Block (was output valid?)
ββ Yes β Continue workflow
ββ No β Route to human review queueUse Agent Instructions as Configuration
Treat agent instructions like workflow configuration. Be specific about:
- What input the agent receives
- What format the output should be
- Any constraints or preferences
Limitations
- Agent Blocks have the same timeout limits as chat interactions
- Large or complex tasks should be broken into smaller Agent Blocks
- For purely deterministic logic, use Condition Blocks instead
Next Steps
- Workflows Overview β Learn more about workflow fundamentals
- Agents β Build agents to use in your workflows
- Getting Started β Start building your first workflow
Built with β€οΈ by Scout OS