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
| Field | Type | Required | Description |
|---|---|---|---|
model | string | Yes | The AI model to use for generation. Select from available models in the dropdown. |
agentPrompt | string | Yes | The system prompt that defines the agent's role and instructions. Supports variable pills for dynamic content. |
inputString | string | Yes | The 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:
| Field | Type | Default | Description |
|---|---|---|---|
loopMode | boolean | false | Enable to process each item in an array input separately. |
maxIterations | number | 100 | Maximum number of iterations when loop mode is enabled. |
concurrency | number | 1 | Number of parallel executions. Higher values process faster but use more resources. |
onError | string | "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
| Variable | Type | Description |
|---|---|---|
result | string | The 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
-
Be specific in your system prompt: Clearly define the agent's role, tone, and expected output format.
-
Use variable pills: Instead of hardcoding values, use variable pills to make your workflows dynamic.
-
Handle edge cases: Include instructions in your system prompt for how to handle unexpected inputs.
-
Test with sample data: Before deploying, test your agent configuration with representative inputs.
-
Use Loop Mode wisely: When processing large arrays, consider setting appropriate concurrency levels to balance speed and resource usage.