Skip to main content
Embedded AI agent that can use tools, access data, and have multi-turn conversations with users.

Configuration

  • id: Unique node identifier
  • system_prompt: Instructions for the agent’s behavior
  • provider_model_name: AI model to use
  • temperature: Model creativity, 0.0-1.0 (default: 0.0)
  • max_iterations: Maximum tool calls/responses (default: 80)
  • max_tokens: Maximum tokens per response (default: 8192)
  • reasoning_effort: For o1 models - low, medium, high (optional)
  • webhooks: Custom API tools (optional)
  • mcp_servers: MCP server tools (optional, HTTP streamable only)

MCP server configuration

MCP server URLs and headers support variable substitution:
# URL with variables
https://api.example.com/mcp/{{system.customer.external_customer_id}}

# Headers with env and context
Authorization: Bearer ${ENV:MCP_API_KEY}
X-Customer-Id: {{system.customer.id}}
X-Phone: {{context.phone_number}}
Supported: {{vars.*}}, {{system.*}}, {{context.*}}, ${ENV:KEY}
URLs resolving to localhost or private IPs will fail in production (SSRF protection).

Built-in tools

Send a message to the user without waiting for a response.Parameters:
  • message (string, required): The text message to send
Usage: Send progress updates, confirmations, or notifications
Send media files to the user via WhatsApp.Parameters:
  • media_url (string, required): URL of the media file
  • media_type (string, required): “image”, “video”, “audio”, or “document”
  • caption (string, optional): Caption for the media
Usage: Share images, documents, or other media content
Access flow execution context and variables.Parameters: NoneReturns: Flow variables, execution context, and metadataUsage: Access stored data and flow state information
Get WhatsApp conversation details.Parameters: NoneReturns: Phone number, conversation ID, and contact informationUsage: Access user contact details for personalization
Store data for use in later flow steps.Parameters:
  • key (string, required): Variable name
  • value (any, required): Value to store
Usage: Save user data, API responses, or calculated values
Retrieve previously stored data.Parameters:
  • key (string, required): Variable name to retrieve
Usage: Access data saved in earlier steps
Get the current date and time.Parameters: NoneReturns: Current timestamp in ISO formatUsage: Time-based logic and timestamp generation
Complete the agent’s task and continue the flow.Parameters: NoneUsage: Signal task completion and advance to next step
Transfer the conversation to a human agent.Parameters:
  • reason (string, optional): Reason for handoff
Usage: Escalate complex issues to human support
Custom tools for external API integration.Parameters: Defined by webhook configurationUsage: Call external APIs, fetch data, trigger actions

How it works

  1. Starts conversation: Uses system prompt and conversation history
  2. Tool access: Can call built-in tools and custom webhooks
  3. Multi-turn: Continues until calls complete_task or needs user input
  4. Message injection: New user messages are automatically injected during conversation
  5. Workflow control: Returns next edge when task completed, wait when needs input

Usage patterns

Support workflow Data processing