Skip to main content

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​

NodePurposeUse Case
LLM IntegrationGenerate text with AI modelsContent creation, analysis, classification
Prompt TemplateCreate structured, reusable promptsConsistent AI interactions
Core AgentMulti-tool AI orchestratorComplex, multi-step task automation
KB SearchSearch knowledge basesFind relevant documents
KB RAG QueryQuestion-answering from your dataAI answers grounded in documents
Text ResponseFormat AI outputsUser-facing responses

Node Selection Guide​

NeedUse
Generate textLLM Integration
Find documentsKB Search
Q&A from docsKB RAG Query
Multi-tool AI tasksCore Agent
Structured promptsPrompt Template
Format / send a responseText 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​

FieldTypeRequiredDescriptionDefault
LLM ProviderSelectYesLLM integration to use (OpenAI, Claude, etc.)—
ModelSelectYesSpecific model to usegpt-4o-mini
TemperatureSliderNoCreativity level (0.0-2.0)0.2
TimeoutNumberNoRequest timeout in seconds (10-600)—
Max RetriesNumberNoRetry attempts on failure (0-5)—
System PromptTextNoAI persona / instructions"You are a helpful assistant"
Prompt TemplateTextYesUser prompt with variables{{message}}
Max TokensNumberNoMaximum response length1000
JSON ModeToggleNoForce JSON output formatfalse

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:

ModelBest ForCost
gpt-4oComplex reasoning$$$
gpt-4o-miniGeneral use (recommended)$
gpt-4-turboFast + capable$$
gpt-3.5-turboSimple tasks / budget$

Anthropic Claude:

ModelBest ForCost
claude-3-opusMost capable$$$
claude-3-sonnetBalanced$$
claude-3-haikuFast + cheap$

Google:

ModelBest ForCost
gemini-1.5-proFull featured$$
gemini-1.5-flashQuick 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​

FieldTypeRequiredDescription
Template TypeSelectYescustom or prompt_library
PromptTextYesMain prompt template
System PromptTextNoContext / persona
Include System PromptToggleNoAdd system prompt to output
FormattingSelectNomarkdown, plain, json, html
Selected Prompt IDsArrayNoIDs 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​

FieldTypeRequiredDescriptionDefault
NameTextNoDisplay name for agent instance—
LLM ProviderSelectYesAI provider integration—
ModelSelectYesModel for reasoninggpt-4o-mini
TemperatureSliderNoResponse creativity (0-1)0.7
System PromptTextYesAgent instructions and persona"You are a helpful assistant"
Max IterationsNumberNoMaximum tool-use cycles10
Available ToolsMulti-selectNoTools the agent can access—
Memory TypeSelectNonone, buffer, summarybuffer
Max Memory MessagesNumberNoMessages to remember50

How It Works​

The agent follows a Think → Act → Observe loop:

  1. Think: Analyze the task and decide what to do
  2. Act: Use a tool to get information or take action
  3. Observe: Process the tool's result
  4. 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
tip

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​

FieldTypeRequiredDescriptionDefault
Vector DB IntegrationSelectConditionalVector database—
Knowledge BaseSelectConditionalKB to search (or use kb_id)—
QueryTextYesSearch query—
Top KNumberNoCandidates to retrieve20
LimitNumberNoResults to return5
ThresholdNumberNoMinimum similarity (0-1)—
Use Hybrid SearchToggleNoBM25 + Vector searchtrue
BM25 WeightSliderNoKeyword vs semantic balance (0-1)0.5
Metadata FiltersObjectNoFilter 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
info

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​

FieldTypeRequiredDescriptionDefault
Knowledge BaseSelectYesKB to query—
QuestionTextYesQuestion to answer—
ModelSelectNoAI model for answersgpt-4o-mini
TemperatureSliderNoAnswer creativity (0-1)0.7
Top K / Max Context DocsNumberNoDocuments in context (1-20)5
Max TokensNumberNoAnswer length limit (50-2000)500
Similarity ThresholdNumberNoMinimum relevance0.3
System PromptTextNoCustom instructions—
Include SourcesToggleNoInclude source citations—
Use Hybrid SearchToggleNoEnable BM25 + Vector—
Answer StyleSelectNocomprehensive or concise—

How It Works​

  1. Retrieve: Search the KB for relevant documents
  2. Augment: Add documents to the AI context
  3. 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​

FieldDescriptionDefault
TextResponse template{{output}}
Typing IndicatorShow typing before sendfalse
DelaySeconds before sending0

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}}
tip

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 ComplexityRecommended ModelCost
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​

  1. Check prompt — Is it clear what you want?
  2. Verify variables — Are they resolving?
  3. Check max_tokens — Is it too low?
  4. Review integration — Is the API key valid?

Poor Quality Answers​

  1. Improve prompt — Be more specific
  2. Add examples — Show expected output
  3. Use a better model — Upgrade if needed
  4. Adjust temperature — Lower for factual tasks

KB Search Returns Nothing​

  1. Check KB content — Are documents indexed?
  2. Lower threshold — Try a lower similarity score
  3. Simplify query — Shorter, clearer queries
  4. Enable hybrid search — Combine keyword + semantic

Agent Loops or Fails​

  1. Lower max_iterations — Prevent infinite loops
  2. Simplify system prompt — Clearer instructions
  3. Check tool availability — Are tools configured?
  4. 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​

ValueUse Case
0.0Deterministic (classification, extraction)
0.2-0.3Balanced (Q&A, summaries)
0.7Creative (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:

  1. Testing Workflows — Debug AI workflows
  2. Error Handling — Handle AI failures gracefully
  3. Knowledge Bases — Build the data your AI nodes search
  4. Agentic Mode — Autonomous, skill-driven AI experiences