AI Nodes
AI nodes add artificial intelligence to your workflows: text generation with LLMs, knowledge base search, Retrieval-Augmented Generation, reusable prompts, and autonomous agents that orchestrate multiple tools.
This page is the single reference for every AI node — its parameters and outputs — combined with practical prompt-engineering guidance, common patterns, and troubleshooting.
Time to work through the guidance sections: 20-25 minutes
AI Node Overview
| Node | Purpose | Use Case |
|---|---|---|
| LLM Integration | Generate text with AI models | Content creation, analysis, classification |
| Prompt Template | Create structured, reusable prompts | Consistent AI interactions |
| Core Agent | Multi-tool AI orchestrator | Complex, multi-step task automation |
| KB Search | Search knowledge bases | Find relevant documents |
| KB RAG Query | Question-answering from your data | AI answers grounded in documents |
| Text Response | Format AI outputs | User-facing responses |
Node Selection Guide
| Need | Use |
|---|---|
| Generate text | LLM Integration |
| Find documents | KB Search |
| Q&A from docs | KB RAG Query |
| Multi-tool AI tasks | Core Agent |
| Structured prompts | Prompt Template |
| Format / send a response | Text Response |
LLM Integration Node
Generate text using AI language models configured through the integration system.
When to Use
- Generate content (emails, summaries, responses)
- Analyze text (sentiment, classification, extraction)
- Transform data (reformat, translate, simplify)
- Answer questions based on context
Configuration
| Field | Type | Required | Description | Default |
|---|---|---|---|---|
| LLM Provider | Select | Yes | LLM integration to use (OpenAI, Claude, etc.) | — |
| Model | Select | Yes | Specific model to use | gpt-4o-mini |
| Temperature | Slider | No | Creativity level (0.0-2.0) | 0.2 |
| Timeout | Number | No | Request timeout in seconds (10-600) | — |
| Max Retries | Number | No | Retry attempts on failure (0-5) | — |
| System Prompt | Text | No | AI persona / instructions | "You are a helpful assistant" |
| Prompt Template | Text | Yes | User prompt with variables | {{message}} |
| Max Tokens | Number | No | Maximum response length | 1000 |
| JSON Mode | Toggle | No | Force JSON output format | false |
Model Override
Use model_override for dynamic model selection at runtime:
Model Override: {{evaluator.recommended_model}}
Available Models
Models depend on your configured integrations. Common options:
OpenAI:
| Model | Best For | Cost |
|---|---|---|
gpt-4o | Complex reasoning | $$$ |
gpt-4o-mini | General use (recommended) | $ |
gpt-4-turbo | Fast + capable | $$ |
gpt-3.5-turbo | Simple tasks / budget | $ |
Anthropic Claude:
| Model | Best For | Cost |
|---|---|---|
claude-3-opus | Most capable | $$$ |
claude-3-sonnet | Balanced | $$ |
claude-3-haiku | Fast + cheap | $ |
Google:
| Model | Best For | Cost |
|---|---|---|
gemini-1.5-pro | Full featured | $$ |
gemini-1.5-flash | Quick responses | $ |
Prompt Template Syntax
Use variables in your prompts:
System Prompt:
You are a professional email writer for {{company_name}}.
Prompt Template:
Write a follow-up email to {{contact.first_name}} about {{deal.name}}.
Key points to include:
- Last meeting date: {{last_meeting.date}}
- Action items: {{last_meeting.notes}}
- Next steps: {{deal.next_steps}}
Keep the tone professional but friendly.
Output Variables
{{llmintegration_1.output}} - Generated text
{{llmintegration_1.success}} - true/false
{{llmintegration_1.model}} - Model used
{{llmintegration_1.tokens_used}} - Total tokens
{{llmintegration_1.prompt_tokens}} - Input tokens
{{llmintegration_1.completion_tokens}} - Output tokens
{{llmintegration_1.cost}} - Estimated cost
Best Practices
✅ Be specific in prompts
✅ Use system prompt for persona
✅ Include examples in complex tasks
✅ Set appropriate temperature
✅ Handle empty outputs
❌ Don't use vague instructions
❌ Don't skip system prompt
❌ Don't set max_tokens too low
Prompt Template Node
Create reusable, structured prompts with variable substitution.
When to Use
- Standardize AI interactions
- Separate prompt logic from LLM calls
- Create complex multi-part prompts
- Use prompts from your prompt library
Configuration
| Field | Type | Required | Description |
|---|---|---|---|
| Template Type | Select | Yes | custom or prompt_library |
| Prompt | Text | Yes | Main prompt template |
| System Prompt | Text | No | Context / persona |
| Include System Prompt | Toggle | No | Add system prompt to output |
| Formatting | Select | No | markdown, plain, json, html |
| Selected Prompt IDs | Array | No | IDs from the Prompt Library |
Variable Syntax
Basic variables:
Hello {{first_name}}, welcome to {{company_name}}!
Nested paths:
Order #{{order.id}} for {{order.customer.name}}
Array access:
First item: {{items[0].name}}
Last item: {{items[-1].name}}
Fallback values:
Hello {{first_name|"Valued Customer"}}
Type conversions:
Score: {{lead_score|int}}
Price: {{amount|float}}
Active: {{is_active|bool}}
Special variables:
Date: {{date}} // Current date (YYYY-MM-DD)
Time: {{time}} // Current time (HH:MM:SS)
Example Template
You are analyzing customer feedback.
Customer: {{contact.first_name}} {{contact.last_name}}
Company: {{contact.company.name}}
Message: {{message}}
Provide:
1. Sentiment analysis
2. Key topics mentioned
3. Recommended action
Output Variables
{{prompttemplate_1.output}} - Processed prompt
{{prompttemplate_1.system_prompt}} - System prompt
{{prompttemplate_1.variables_used}} - Variables resolved
Core Agent Node
AI orchestrator that can use tools to complete complex, multi-step tasks autonomously.
When to Use
- Multi-step reasoning required
- Need to use multiple tools
- Dynamic decision-making
- Complex problem-solving
Configuration
| Field | Type | Required | Description | Default |
|---|---|---|---|---|
| Name | Text | No | Display name for agent instance | — |
| LLM Provider | Select | Yes | AI provider integration | — |
| Model | Select | Yes | Model for reasoning | gpt-4o-mini |
| Temperature | Slider | No | Response creativity (0-1) | 0.7 |
| System Prompt | Text | Yes | Agent instructions and persona | "You are a helpful assistant" |
| Max Iterations | Number | No | Maximum tool-use cycles | 10 |
| Available Tools | Multi-select | No | Tools the agent can access | — |
| Memory Type | Select | No | none, buffer, summary | buffer |
| Max Memory Messages | Number | No | Messages to remember | 50 |
How It Works
The agent follows a Think → Act → Observe loop:
- Think: Analyze the task and decide what to do
- Act: Use a tool to get information or take action
- Observe: Process the tool's result
- Repeat: Continue until the task is complete or max iterations is reached
Available Tools
The agent can access any workflow node configured as a tool:
- Knowledge Base Search
- CRM Manager (contacts, companies, deals)
- Database Query
- API Request
- Email Send
- And more...
System Prompt Example
You are a customer support agent for TechCorp.
Your capabilities:
- Search the knowledge base for product information
- Look up customer orders in the CRM
- Send follow-up emails
Guidelines:
- Always search the KB before answering product questions
- Be polite and professional
- If you can't find an answer, say so honestly
- Summarize findings clearly
Output Variables
{{coreagent_1.output}} - Final response
{{coreagent_1.success}} - Completion status
{{coreagent_1.steps}} - Reasoning steps taken
{{coreagent_1.tool_calls}} - Tools used
{{coreagent_1.metrics.total_duration}} - Time taken
{{coreagent_1.metrics.llm_calls}} - LLM calls made
{{coreagent_1.metrics.tokens_used}} - Total tokens
For chat-style, autonomous experiences with skills, see Agentic Mode.
KB Search Node
Search your knowledge bases for relevant documents using semantic search.
When to Use
- Find documents matching a query
- Provide context to AI prompts
- Search product documentation
- Look up policies and procedures
Configuration
| Field | Type | Required | Description | Default |
|---|---|---|---|---|
| Vector DB Integration | Select | Conditional | Vector database | — |
| Knowledge Base | Select | Conditional | KB to search (or use kb_id) | — |
| Query | Text | Yes | Search query | — |
| Top K | Number | No | Candidates to retrieve | 20 |
| Limit | Number | No | Results to return | 5 |
| Threshold | Number | No | Minimum similarity (0-1) | — |
| Use Hybrid Search | Toggle | No | BM25 + Vector search | true |
| BM25 Weight | Slider | No | Keyword vs semantic balance (0-1) | 0.5 |
| Metadata Filters | Object | No | Filter by metadata fields | — |
Search Modes
Semantic Search (default):
- Finds conceptually similar content
- Works even with different wording
- Good for: "What's our refund policy?"
Query: "customer onboarding process"
Hybrid Search (recommended):
- Combines keyword + semantic
- Better for specific terms
- Good for: "Order #12345 status"
Use Hybrid Search: true
BM25 Weight: 0.5
Query: "onboarding checklist"
With variables:
query: "{{contact.inquiry}} for {{contact.product}}"
Metadata filtering:
Query: "return policy"
Metadata Filters: {
"document_type": "policy",
"department": "support",
"entity_type": "deals",
"status": "active"
}
Output Variables
{{kbsearch_1.results}} - Array of matches
{{kbsearch_1.results[0].content}} - First result content
{{kbsearch_1.results[0].similarity}} - Match score (0-1)
{{kbsearch_1.results[0].metadata}} - Document metadata
{{kbsearch_1.total_count}} - Total matches found
{{kbsearch_1.success}} - true/false
Learn how to build and populate knowledge bases in Knowledge Bases.
KB RAG Query Node
Ask questions and get AI-generated answers from your knowledge base using Retrieval-Augmented Generation.
When to Use
- Answer questions from documentation
- Customer support automation
- Internal Q&A systems
- Policy inquiries
Configuration
| Field | Type | Required | Description | Default |
|---|---|---|---|---|
| Knowledge Base | Select | Yes | KB to query | — |
| Question | Text | Yes | Question to answer | — |
| Model | Select | No | AI model for answers | gpt-4o-mini |
| Temperature | Slider | No | Answer creativity (0-1) | 0.7 |
| Top K / Max Context Docs | Number | No | Documents in context (1-20) | 5 |
| Max Tokens | Number | No | Answer length limit (50-2000) | 500 |
| Similarity Threshold | Number | No | Minimum relevance | 0.3 |
| System Prompt | Text | No | Custom instructions | — |
| Include Sources | Toggle | No | Include source citations | — |
| Use Hybrid Search | Toggle | No | Enable BM25 + Vector | — |
| Answer Style | Select | No | comprehensive or concise | — |
How It Works
- Retrieve: Search the KB for relevant documents
- Augment: Add documents to the AI context
- Generate: AI creates an answer from the context
Question Example
Question: What is the return policy for electronics?
System Prompt (optional):
You are a customer support agent. Answer based only on the
provided documents. If the answer isn't in the documents,
say "I don't have that information."
Output Variables
{{kbragquery_1.answer}} - AI-generated answer
{{kbragquery_1.sources}} - Source documents used
{{kbragquery_1.confidence_score}} - Answer confidence (0-1)
{{kbragquery_1.citations}} - Specific citations
{{kbragquery_1.search_results}} - Raw search results
{{kbragquery_1.success}} - true/false
Text Response Node
Format and send AI-generated responses to users.
When to Use
- Send final responses to users
- Format AI output nicely
- Add typing indicators
- Control response timing
Configuration
| Field | Description | Default |
|---|---|---|
| Text | Response template | {{output}} |
| Typing Indicator | Show typing before send | false |
| Delay | Seconds before sending | 0 |
Formatting Options
Simple variable:
{{llmintegration_1.output}}
With formatting:
Here's what I found:
{{kbragquery_1.answer}}
Sources:
{{#each kbragquery_1.sources}}
- {{item.document_title}}
{{/each}}
Conditional content:
{{#if success}}
✅ Your request has been processed!
{{else}}
❌ Sorry, there was an error. Please try again.
{{/if}}
Array Iteration
Found {{results.length}} results:
{{#each results}}
{{@index1}}. {{item.title}}
Relevance: {{item.similarity}}
{{/each}}
Output Variables
{{textresponse_1.response_text}} - Final formatted text
{{textresponse_1.output}} - For chaining
Common AI Patterns
Pattern 1: Simple Q&A
User Message Trigger
│
▼
KB RAG Query (question: {{message}})
│
▼
Text Response ({{kbragquery_1.answer}})
Pattern 2: Contextual Response
User Message Trigger
│
▼
Contact Lookup (get user context)
│
▼
KB Search (find relevant docs)
│
▼
Prompt Template (combine context + docs)
│
▼
LLM Integration (generate response)
│
▼
Text Response (send to user)
Pattern 3: Agent with Tools
User Message Trigger
│
▼
Core Agent Node
├── Can use: KB Search
├── Can use: CRM Lookup
├── Can use: Email Send
└── Can use: API Request
│
▼
Text Response (agent's final answer)
Pattern 4: Content Generation
Database Trigger (new deal created)
│
▼
Transform Data (prepare context)
│
▼
LLM Integration (generate proposal)
│
▼
Email Send (send to contact)
Pattern 5: Classification + Routing
Webhook Trigger (new inquiry)
│
▼
LLM Integration (classify intent)
│
▼
Multi-Condition (route by intent)
│
├── Sales → Sales Workflow
├── Support → Support Workflow
└── Billing → Billing Workflow
Compact Pattern Reference
Simple Generation:
[Prompt Template] → [LLM Integration] → [Text Response]
RAG-Enhanced Response:
[KB Search] → [LLM Integration with context] → [Text Response]
Agent Task:
[User Input] → [Core Agent] → [Response Builder]
↓
[Uses tools as needed]
Prompt Engineering Tips
Be Specific
❌ Bad: "Write an email"
✅ Good: "Write a professional follow-up email to a prospect
who attended our webinar yesterday. Include:
- Thank them for attending
- Summarize key points from the webinar
- Offer a free consultation
- Keep it under 150 words"
Use Examples
System Prompt:
Classify customer inquiries into categories.
Examples:
- "I need help resetting my password" → account_access
- "When will my order arrive?" → order_status
- "I want a refund" → billing
Now classify this inquiry:
{{customer_message}}
Set Constraints
Generate a product description.
Constraints:
- Exactly 2-3 sentences
- Include the key benefit
- End with a call-to-action
- No superlatives (best, greatest)
- Use active voice
Chain of Thought
Analyze this customer feedback and determine the sentiment.
Think step by step:
1. Identify the main topic
2. List positive mentions
3. List negative mentions
4. Weigh the overall tone
5. Provide final sentiment (positive/negative/neutral)
Feedback: {{feedback_text}}
Reusable prompts can be stored and versioned in the Prompts Library, then referenced from the Prompt Template node. To measure and improve prompt quality, see AI Evaluation.
Cost Optimization
Choose the Right Model
| Task Complexity | Recommended Model | Cost |
|---|---|---|
| Simple (classification, extraction) | gpt-4o-mini, claude-3-haiku | $ |
| Medium (summarization, Q&A) | gpt-4o-mini, claude-3-sonnet | $$ |
| Complex (reasoning, analysis) | gpt-4o, claude-3-opus | $$$ |
Reduce Token Usage
✅ Use concise prompts
✅ Limit context documents (max_context_docs)
✅ Set appropriate max_tokens
✅ Use temperature=0 for deterministic tasks
❌ Don't include unnecessary context
❌ Don't ask for verbose responses
❌ Don't use opus for simple tasks
Narrow Before You Generate
Use KB Search with metadata filters to narrow results before RAG queries — fewer, more relevant context documents mean lower cost and better answers.
Troubleshooting
Empty AI Response
- Check prompt — Is it clear what you want?
- Verify variables — Are they resolving?
- Check max_tokens — Is it too low?
- Review integration — Is the API key valid?
Poor Quality Answers
- Improve prompt — Be more specific
- Add examples — Show expected output
- Use a better model — Upgrade if needed
- Adjust temperature — Lower for factual tasks
KB Search Returns Nothing
- Check KB content — Are documents indexed?
- Lower threshold — Try a lower similarity score
- Simplify query — Shorter, clearer queries
- Enable hybrid search — Combine keyword + semantic
Agent Loops or Fails
- Lower max_iterations — Prevent infinite loops
- Simplify system prompt — Clearer instructions
- Check tool availability — Are tools configured?
- Review error logs — See what failed
Quick Reference
Variable Syntax
{{variable}} - Simple variable
{{node.output.field}} - Nested path
{{items[0].name}} - Array access
{{var|"default"}} - Fallback value
{{value|int}} - Type conversion
Models (by capability)
High: gpt-4o, claude-3-opus
Medium: gpt-4o-mini, claude-3-sonnet
Fast: gpt-3.5-turbo, claude-3-haiku
Temperature Guide
| Value | Use Case |
|---|---|
| 0.0 | Deterministic (classification, extraction) |
| 0.2-0.3 | Balanced (Q&A, summaries) |
| 0.7 | Creative (content generation) |
| 1.0+ | Very creative (brainstorming) |
KB Search Parameters
top_k: 20 - Candidates to consider
limit: 5 - Final results
threshold: 0.5 - Minimum similarity
bm25_weight: 0.5 - Hybrid balance
Next Steps
With AI nodes mastered, continue with:
- Testing Workflows — Debug AI workflows
- Error Handling — Handle AI failures gracefully
- Knowledge Bases — Build the data your AI nodes search
- Agentic Mode — Autonomous, skill-driven AI experiences