Skip to main content

AI Nodes

AI nodes bring intelligence to your workflows. The AI Agent node is the core AI building block — it handles conversations autonomously with support for tools, knowledge bases, multi-turn memory, and multi-agent handoffs.

ai.agent

Let an AI agent handle the conversation with the contact. The AI Agent node is a full-featured conversational agent. It can call tools, search knowledge bases, hand off to specialized sub-agents, and maintain multi-turn conversation memory — all within a single workflow node.

Configuration

OptionTypeRequiredDescription
agentIdstringNoLink to a pre-configured agent from the Agents page. Overrides inline config with the agent’s saved instructions, model, tools, and knowledge
systemPromptstringYes (if no agentId)Instructions that define the agent’s personality, knowledge, and behavior
modelstringNoAI model to use. Select from the available models in your workspace AI settings
temperaturenumberNoResponse randomness, 0.0 to 2.0 (default: 0.7). Lower = more deterministic
maxTokensnumberNoMaximum tokens in the generated response
toolIdsarrayNoIDs of tools the agent can call during execution (HTTP tools, integrations)
enableWebSearchbooleanNoEnable built-in OpenAI web search for real-time information
knowledgeLinksarrayNoURLs or documents the agent can reference for context
tonestringNoResponse tone (e.g., “professional”, “friendly”, “concise”)
answerLengthstringNoResponse length preference (e.g., “short”, “medium”, “detailed”)
exitConditionsarrayNoConditions that end the agent’s turn (each with label and optional instruction)
handoffAgentIdsarrayNoIDs of other agents this agent can hand off to for specialized topics

Linked Agents

Instead of configuring everything inline, you can link to a pre-configured agent from the Agents page. When agentId is set, the node inherits the agent’s:
  • Instructions (system prompt)
  • Model selection
  • Tools (HTTP tools, integrations)
  • Knowledge (documents, URLs)
Inline configuration overrides linked agent settings where both are specified.

Tools

AI Agent nodes can use tools during conversation to fetch information and take actions:
Tool TypeDescription
Web SearchBuilt-in OpenAI web search for real-time information (enable via enableWebSearch)
HTTP ToolsCall external REST APIs during execution
Integration ToolsUse connected third-party integrations (configured in Settings > Tools)
When tools are configured, the agent autonomously decides when to call them based on the conversation context. Tool results are incorporated into the agent’s response.

Knowledge & RAG

Agents can access knowledge through two mechanisms:
  • Knowledge Links: URLs and documents attached to the agent. Content is scraped and injected into the system prompt as context.
  • Document Search (RAG): When documents are uploaded to an agent, the platform performs vector search against the inbound message to find relevant chunks. These are injected into the system prompt automatically.

Multi-Agent Handoffs

Agents can hand off conversations to specialized sub-agents. When handoffAgentIds is configured:
  1. The primary agent receives the message and begins processing
  2. If the conversation requires a different specialization, the agent transfers to the appropriate handoff agent
  3. The handoff agent takes over with its own instructions, tools, and knowledge
  4. The handoff chain is logged in the run step output
Each handoff agent is a fully configured agent with its own system prompt, tools, and knowledge base.

Exit Conditions

Define conditions that end the agent’s turn and route to the next node in the workflow:
FieldTypeDescription
labelstringName of the exit condition (e.g., “needs_human”, “purchase_complete”)
instructionstringOptional guidance for the AI on when to trigger this exit
Exit conditions create output handles on the node, enabling branching logic based on the agent’s assessment of the conversation.

Outputs

OutputTypeDescription
response.textstringThe generated response text
response.exitConditionstringWhich exit condition was triggered (if any)
response.tokensUsedobjectToken consumption breakdown (prompt, completion, total)
response.toolCallsarrayLog of tools called during execution
response.lastAgentstringName of the agent that produced the final response (relevant for handoffs)
response.handoffChainarraySequence of agent handoffs that occurred

Connections

  • Inputs: Single input handle receiving conversation context
  • Outputs: Default output handle, plus one handle per exit condition

Multi-Turn Conversations

AI Agent nodes automatically maintain persistent multi-turn memory. Each WhatsApp contact gets a dedicated conversation thread, so the agent remembers previous messages without you managing context manually.

Example Use Cases

Customer support agent: Configure with your product knowledge base, connect HTTP tools for order lookup, and set exit conditions for “needs_human” (routes to wa.handoff) and “issue_resolved” (routes to a satisfaction survey). Sales qualification agent: Link a sales-focused agent with web search enabled, set tone to “professional”, and configure handoff agents for “technical_questions” (routes to a technical specialist agent) and “pricing_inquiries” (routes to a pricing agent).
Token costs: AI agent execution consumes tokens billed by OpenAI. Always set a maxTokens limit to control costs. The platform enforces a per-run safety cap of 150,000 tokens to prevent runaway agent loops. The agent runs a maximum of 6 turns per execution.