Agent Node

Overview

The Agent node executes an AI agent as part of your workflow. This allows you to leverage AI reasoning, decision-making, and natural language processing within structured automation flows.

When to Use

Use an Agent node when you need:

  • Natural language understanding or generation
  • AI-powered decision making
  • Complex reasoning over data
  • Tool usage orchestrated by AI
  • Knowledge base queries
  • Multi-step agent interactions

Configuration

Agent Selection

Agent: Choose an existing agent from your organization

  • The agent’s configuration (model, base instructions, tools, knowledge bases) is inherited
  • You can override the agent’s instructions in this node

Instructions

Instructions: Override or supplement the agent’s base instructions

  • Provide context-specific guidance for this workflow step
  • Reference previous node outputs using handlebars syntax: {{results.nodeId.field}}
  • Keep instructions focused on the task at hand

Example:

Analyze the property data and determine if it meets our investment criteria.

Property Address: {{results.trigger.address}}
Property Details: {{results.propertyData.details}}
Budget: $500,000

Provide a clear recommendation with reasoning.

Output Schema

Define what data you expect the agent to return:

  • Click “Edit Schema” to define output fields
  • The agent will be instructed to return data matching this schema
  • This ensures consistent, structured output you can reference in later nodes

Example Output Schema:

{
  "type": "object",
  "properties": {
    "recommendation": { "type": "string" },
    "score": { "type": "number" },
    "reasoning": { "type": "string" }
  },
  "required": ["recommendation", "score"]
}

Reasoning Level

Reasoning: Control how much the agent thinks before responding

  • None: Fast, direct responses
  • Low: Brief consideration
  • Medium: Balanced thinking
  • High: Deep analysis (slower but more thorough)

Use higher reasoning for complex decisions, lower for simple tasks.

Tools and Knowledge Bases

Tools: Select which tools the agent can use

  • Only tools configured in your workflow are available
  • The agent will decide when to use tools based on the task

Knowledge Bases: Select which knowledge bases the agent can query

  • Only knowledge bases configured in your workflow are available
  • The agent will search these when relevant information is needed

Other Agents: Select other agents this agent can delegate to

  • Enables multi-agent collaboration
  • The agent will decide when to use other agents

Advanced Options

Show Whole Chain State: If enabled, the agent can see the entire workflow execution context

  • Useful when the agent needs visibility into previous steps
  • Disable for privacy or to limit context size

Fail Before Running If: JSONata expression to check before executing

  • If the expression evaluates to true, the node fails immediately
  • Example: $.results.previousNode.status = "invalid"

Fail After Running If: JSONata expression to check after executing

  • If the expression evaluates to true, the node fails even if execution succeeded
  • Example: $.results.currentNode.score < 50

Accessing Agent Output

Agent output is available using JSONPath at $.results.<nodeId>:

{
  "response": "The agent's text response",
  "recommendation": "Value from output schema",
  "score": 85,
  "toolsUsed": ["tool1", "tool2"],
  "knowledgeBasesQueried": ["kb1"]
}

Reference in other nodes: $.results.analyzeProperty.recommendation

Example Configuration

Node ID: analyzeProperty Agent: Property Investment Analyzer Instructions:

Review the property at the following address and provide an investment recommendation.

Address: {{results.trigger.address}}
Owners: {{results.lookup.owners}}
Budget: $500,000

Consider location, price, condition, and market trends in your analysis.

Output Schema:

{
  "recommendation": "BUY",
  "score": 85,
  "reasoning": "Strong location with growth potential...",
  "concerns": ["Needs minor repairs", "High property tax"]
}

Best Practices

  • Clear Instructions: Be specific about what you want the agent to do
  • Structured Output: Always define an output schema for consistent data
  • Right Tool Access: Only give the agent tools it actually needs
  • Reasoning Level: Match reasoning to task complexity
  • Error Handling: Set up onFailure paths for when agents can’t complete tasks
  • Input Validation: Use “Fail Before Running If” to validate inputs before agent execution
  • Handlebars for Instructions: Use {{results.nodeId.field}} syntax in instructions for dynamic data
  • JSONPath for Other Nodes: Use $.results.nodeId.field when referencing outputs in tool calls, functions, etc.