Skip to main content
Agent Node

Overview

The Agent node is where AI comes into your workflow. It can analyze text, make intelligent decisions, extract structured data, generate content, answer questions, and much more - all using natural language instructions.
Best for: Content analysis, categorization, data extraction, decision-making, summarization, and any task requiring intelligence.

When to Use Agent Node

Perfect for:
  • Analyzing and categorizing content
  • Extracting structured data from unstructured text
  • Making decisions based on criteria
  • Generating summaries or reports
  • Sentiment analysis
  • Answering questions about data
  • Content generation
  • Translation and language tasks
Not ideal for:
  • Simple data transformations (use Code Node)
  • Mathematical calculations (use Code Node)
  • Direct API calls (use HTTP Request Node)

Configuration

Select or Create Agent

Use Existing Assistant
  • Choose from your workspace assistants
  • Inherits assistant’s configuration and knowledge
  • Consistent behavior across chat and workflows
Create New Agent
  • Define agent specifically for this workflow
  • Configure independently
  • Optimized for automation

Agent Instructions

Provide clear instructions for what the agent should do: Good Instructions:
Analyze the customer feedback and determine:
1. Sentiment (positive, neutral, negative)
2. Main topic category (product, service, pricing, support)
3. Urgency level (low, medium, high)
4. Key issues mentioned

Feedback: {{trigger.output.feedback_text}}
Poor Instructions:
Analyze this feedback: {{trigger.feedback_text}}

Input Variables

Pass data from previous nodes to the agent:
Customer:
{{trigger.output.customer_name}}
Order ID:
{{trigger.output.order_id}}
Issue:
{{trigger.output.description}}

Please analyze this support ticket and categorize it.
Define the exact structure you want from the agent: Why Use Structured Output:
  • Guaranteed format (always valid JSON)
  • No parsing errors
  • Reliable for downstream nodes
  • Easier to debug
Example:
{
  "sentiment": "positive",
  "category": "product_feedback",
  "priority": "medium",
  "summary": "Customer loves the new feature",
  "action_needed": false
}
Configure:
  1. Enable “Structured Output”
  2. Define output fields:
    • Field name
    • Type (string, number, boolean, array)
    • Description

Tools & Capabilities

Enable additional capabilities for the agent: Web Search
  • Agent can search the internet
  • Good for fact-checking and current information
  • Adds cost per search
Code Execution
  • Agent can write and run Python code
  • Good for calculations and data analysis
  • Safe sandboxed environment
Integrations
  • Agent can use connected integration actions
  • Access to your tools and data
  • Good for dynamic workflows

Example Use Cases

Content Categorization

Agent Configuration:
- Instructions: "Categorize this article by topic and suggest tags"
- Input: {{trigger.article_text}}
- Model: GPT-3.5 Turbo
- Structured Output:
  {
    "category": "string",
    "tags": ["string"],
    "confidence": "number"
  }

Lead Qualification

Agent Configuration:
- Instructions: "Score this lead based on company size, role, and use case"
- Input:
  Company: {{trigger.company}}
  Role: {{trigger.role}}
  Use case: {{trigger.use_case}}
- Model: GPT-4
- Structured Output:
  {
    "score": "number (0-100)",
    "qualification": "hot|warm|cold",
    "reasoning": "string"
  }

Document Summarization

Agent Configuration:
- Instructions: "Summarize this document in 3-5 bullet points"
- Input: {{trigger.document_text}}
- Model: Claude Sonnet
- Structured Output:
  {
    "summary_points": ["string"],
    "key_topics": ["string"],
    "word_count": "number"
  }

Sentiment Analysis

Agent Configuration:
- Instructions: "Analyze sentiment and emotional tone"
- Input: {{trigger.customer_message}}
- Model: GPT-3.5 Turbo
- Structured Output:
  {
    "sentiment": "positive|neutral|negative",
    "emotion": "string",
    "confidence": "number"
  }

Accessing Agent Output

Without Structured Output:
{{agent_node_name.output.response}}
With Structured Output:
{{agent_node_name.output.sentiment}}
{{agent_node_name.output.category}}
{{agent_node_name.output.summary}}
{{agent_node_name.output.tags[0]}}

Prompt Engineering Tips

Be Explicit
❌ "Analyze this text"
✅ "Analyze this customer feedback and categorize as bug, feature request, or question"
Provide Context
You are analyzing customer support tickets for a SaaS company.
Categorize by urgency based on:
- Urgent: System down, data loss, security issue
- High: Blocking user's work
- Medium: Inconvenience but has workaround
- Low: Feature request or question
Use Examples
Categorize these issues:
Example 1: "Can't log in, getting 500 error" → Urgent
Example 2: "How do I export data?" → Low

Now categorize: {{trigger.issue}}
Constrain Output
Respond with ONLY one of these categories: bug, feature, question
Do not explain your reasoning.

Best Practices

For workflows, structured output is almost always better. It prevents parsing errors and makes data easier to use in subsequent nodes.
Clear, detailed instructions lead to better results. Include examples if the task is complex.
Agents work best with focused inputs. If processing long documents, consider extracting relevant sections first.
Agent performance can vary. Test with actual data examples to ensure consistent results.
Add validation after the agent node to handle unexpected outputs or errors.

Next Steps