Prerequisites

Install and setup

pip install kapso
kapso login

Create your flow

kapso pull my-project
cd my-project
kapso flow init my_first_flow
This creates flows/my_first_flow/ with:
  • flow.py - Your flow definition
  • metadata.yaml - Flow metadata

Edit your flow

Open flows/my_first_flow/flow.py. The basic template looks like:
from kapso.builder.flows import Flow
from kapso.builder.flows.nodes import StartNode, SendTextNode, WaitForResponseNode

# Replace with your WhatsApp config ID from Kapso
WHATSAPP_CONFIG_ID = 'replace_with_your_whatsapp_config_id_from_kapso'

# Create the flow
flow = Flow(
    name="My First Flow",
    description="A basic flow template"
)

# Add nodes and edges
start_node = StartNode(id="start")
welcome_node = SendTextNode(
    id="welcome",
    whatsapp_config_id=WHATSAPP_CONFIG_ID,
    text="Welcome! How can I help you today?"
)

flow.add_node(start_node)
flow.add_node(welcome_node)
flow.add_edge("start", "welcome")
Important: Replace WHATSAPP_CONFIG_ID with your actual WhatsApp config ID from your Kapso dashboard.

Deploy your flow

kapso flow push my_first_flow
The output shows:
✓ Created new flow in cloud
  Flow ID: flow_abc123
  Name: My First Flow

Test your flow

Go to app.kapso.ai → your project → Flows → click “Test” on your flow. This opens a test modal where you can:
  • Send an initial message to trigger the flow
  • See mock WhatsApp messages in real-time
  • View flow events and variables as it executes
  • Send user responses when the flow waits for input
Unlike agents, flows don’t have a snapshot command - testing happens directly in the web interface.