Execution behavior
Unlike other nodes that execute and immediately advance, agent nodes maintain workflow execution at the node until the agent explicitly calls thecomplete_task tool. This allows:
- Multi-turn conversations: Agent can exchange multiple messages with the user
- Stateful execution: Maintains conversation context throughout
- Tool orchestration: Decides when to call tools, send messages, or complete
- Dynamic input: New user messages are automatically injected into the agent’s conversation
- Controlled completion: Workflow only advances when agent determines task is done
Configuration
id: Unique node identifiersystem_prompt: Instructions for the agent’s behaviorprovider_model_name: AI model to usetemperature: 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)function_tools: Deployed functions as tools (optional)app_integration_tools: Pre-configured app integrations as tools (optional)mcp_servers: MCP server tools (optional, HTTP streamable only)observer_prompt_mode: Behavior when outbound disabled (advanced, see below)
Custom tools
Extend agent capabilities with external integrations.Webhook tools
Call external APIs during agent execution. Configure URL, method, headers, and body with variable interpolation.Function tools
Call deployed functions (Cloudflare Workers) as agent tools. Each function tool has:- Name: Tool identifier the agent calls (letters, numbers, underscores, dashes)
- Description: Tells the agent when to use this tool
- Function: Select a deployed function
- Input Schema: Define the arguments the agent can pass
input. Kapso automatically injects the rest.
Response format:
Return JSON. Include a vars object to update flow variables:
App integration tools
Call pre-configured app integrations as agent tools. Connect to HubSpot, Slack, Google Sheets, Notion, Airtable, and 2,700+ other apps via Pipedream. Each app integration tool has:- Name: Tool identifier the agent calls (letters, numbers, underscores, dashes)
- Description: Tells the agent when to use this tool
- App integration: Select a pre-configured integration from your project
- Configure an app integration in your project (select app, action, connect account)
- Mark fields as “Pre-configured” (fixed values) or “Passed by agent” (runtime)
- Attach the integration to an agent step as a tool
- Agent calls the tool with values for “Passed by agent” fields
MCP servers
MCP server URLs and headers support variable substitution:{{vars.*}}, {{system.*}}, {{context.*}}, ${ENV:KEY}
Observer mode
When a workflow runs with outbound messages disabled (allow_outbound: false), the agent operates in “observer mode”. The observer_prompt_mode setting controls how the agent behaves:
interactive_chat(default): Agent chats with the operator via the Workflow Chat sidebar in the inbox. Use for workflows where human review or input is needed.analysis_only: Agent runs non-interactively with no chat interface. Use for background analysis or logging workflows.
Built-in tools
send_notification_to_user
send_notification_to_user
Send a message to the user without waiting for a response.Parameters:
message(string, required): The text message to send
send_media
send_media
Send media files to the user via WhatsApp.Parameters:
media_url(string, required): URL of the media filemedia_type(string, required): “image”, “video”, “audio”, or “document”caption(string, optional): Caption for the media
get_execution_metadata
get_execution_metadata
Access flow execution context and variables.Parameters: NoneReturns: Flow variables, execution context, and metadataUsage: Access stored data and flow state information
get_whatsapp_context
get_whatsapp_context
Get WhatsApp conversation details.Parameters: NoneReturns: Phone number, conversation ID, and contact informationUsage: Access user contact details for personalization
save_variable
save_variable
Store data for use in later flow steps.Parameters:
key(string, required): Variable namevalue(any, required): Value to store
get_variable
get_variable
Retrieve previously stored data.Parameters:
key(string, required): Variable name to retrieve
get_current_datetime
get_current_datetime
Get the current date and time.Parameters: NoneReturns: Current timestamp in ISO formatUsage: Time-based logic and timestamp generation
complete_task
complete_task
Complete the agent’s task and continue the flow.Parameters: NoneUsage: Signal task completion and advance to next step
handoff_to_human
handoff_to_human
Transfer the conversation to a human agent.Parameters:
reason(string, optional): Reason for handoff
ask_about_file
ask_about_file
Analyze files and answer questions about their content. Supports PDFs, images, text files, and Office documents (.docx, .xlsx, .pptx).Parameters:
file_url(string, required): Kapso file URL (use WhatsAppmedia_data.urlfromget_whatsapp_context)question(string, required): What you want to know about the file
- Max file size: 30MB
- Office docs: Text extracted (DOCX paragraphs, XLSX first 10 sheets/50 rows, PPTX first 40 slides)
- Legacy formats (.doc/.xls/.ppt) not supported - convert to modern format first
Dynamic webhook tools
Dynamic webhook tools
Custom tools for external API integration.Parameters: Defined by webhook configurationUsage: Call external APIs, fetch data, trigger actions
External inputs
When a workflow is resumed via API or receives input from non-WhatsApp sources (e.g., Slack replies, API payloads), the agent automatically tags these as external inputs to distinguish them from direct user messages. How it works: External inputs are wrapped in<external_input> tags when presented to the agent:
- Understand the input source
- Adapt its tone (e.g., acknowledge internal team input differently than user messages)
- Make better decisions about what to communicate to the end user
- Resuming a workflow via the Platform API resume endpoint with a payload
- Using Slack integration to provide internal team responses
- Triggering workflows via API with initial data
How it works
- Starts conversation: Uses system prompt and conversation history
- Tool access: Can call built-in tools and custom webhooks
- Multi-turn: Continues until calls
complete_taskor needs user input - Message injection: New user messages are automatically injected during conversation
- External input tagging: API payloads and non-WhatsApp inputs are wrapped in
<external_input>tags - Workflow control: Returns
nextedge when task completed,waitwhen needs input

