AgentLoops
AI Nodes

Agent

A general-purpose AI agent for text generation and processing.

Agent

The Agent node is a versatile AI-powered node that processes inputs and generates text responses based on a customizable system prompt. It's the most flexible AI node, suitable for a wide range of text generation tasks.

Overview

Use the Agent node when you need to:

  • Generate text based on dynamic inputs
  • Process and transform text content
  • Create conversational responses
  • Summarize, rewrite, or analyze text

Configuration

FieldTypeRequiredDescription
modelstringYesThe AI model to use for generation. Select from available models in the dropdown.
agentPromptstringYesThe system prompt that defines the agent's role and instructions. Supports variable pills for dynamic content.
inputStringstringYesThe user message or input for the agent to process. Supports variable pills for dynamic data.

Loop Mode

The Agent node supports Loop Mode, which allows it to process arrays of inputs individually:

FieldTypeDefaultDescription
loopModebooleanfalseEnable to process each item in an array input separately.
maxIterationsnumber100Maximum number of iterations when loop mode is enabled.
concurrencynumber1Number of parallel executions. Higher values process faster but use more resources.
onErrorstring"stop"Error handling strategy: "stop" halts execution, "continue" skips failed items.

Inputs

The Agent node accepts inputs from connected upstream nodes. These inputs are available as variable pills that can be dragged into the Agent Description or Input fields.

Variable Pills

Variable pills allow you to reference outputs from other nodes:

  • Drag and drop pills from the "Available Inputs" section
  • Pills are automatically replaced with actual values at runtime
  • Use the {{variableName}} syntax for manual insertion

Output

VariableTypeDescription
resultstringThe generated text response from the AI model.

When Loop Mode is enabled, the output is an array of strings, one for each processed input.

Example Use Cases

Content Summarization

Agent Description: You are a content summarizer. Create concise summaries that capture key points.

Input: {{articleContent}}

Email Response Generator

Agent Description: You are a professional email assistant. Write polite, helpful responses.

Input: Original email: {{emailBody}}
       Context: {{customerName}} is asking about {{topic}}

Data Transformation

Agent Description: Transform the input data into a specific format. Output only the transformed data.

Input: {{rawData}}

Best Practices

  1. Be specific in your system prompt: Clearly define the agent's role, tone, and expected output format.

  2. Use variable pills: Instead of hardcoding values, use variable pills to make your workflows dynamic.

  3. Handle edge cases: Include instructions in your system prompt for how to handle unexpected inputs.

  4. Test with sample data: Before deploying, test your agent configuration with representative inputs.

  5. Use Loop Mode wisely: When processing large arrays, consider setting appropriate concurrency levels to balance speed and resource usage.

On this page