Skip to main content
Most powerful node type. Combines multiple tools (webhooks, knowledge bases, MCP servers, WhatsApp templates) and intelligently selects which to use.

Basic usage

Constructor

Tools

WebhookTool

KnowledgeBaseTool

McpServerTool

WhatsappTemplateTool

Methods

add_tool()

Add any supported tool to the node. Tool names must be unique within the node.

Factory function

Create SubagentNode with tools in one call:

Tool selection

The LLM automatically selects tools based on:
  1. Tool descriptions: Always provide clear descriptions
  2. Tool names: Use descriptive, action-oriented names
  3. Prompt guidance: Reference tools in the node prompt
  4. Context: Current conversation state

Complete example

Built-in tools

SubagentNode includes these built-in tools:
  • send_notification_to_user - Send messages to user
  • MoveToNextNode - Navigate to specific nodes
  • EnterIdleState - Pause and wait
  • AskUserForInput - Request specific information
  • kb_retrieval - Available if knowledge base tools added
  • SendWhatsappTemplateMessage - Available if WhatsApp template tools added

Best practices

Tool naming

Tool descriptions

Error handling

Global usage

Limitations

  • Tools only available within the specific SubagentNode
  • Cannot share tools between different SubagentNodes
  • Tool execution order determined by LLM
  • All tools must complete before moving to next node