> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kapso.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Introduction

> Automate WhatsApp conversations with visual flows and AI steps

A workflow is a directed graph where nodes execute in sequence. Each node performs one action: sending a message, waiting for input, routing logic, running code, or handing off to a human.

Workflows run on a trigger, most often an inbound WhatsApp message.

<iframe src="https://www.tella.tv/video/kapso-workflows-ai-agent-in-2-minutes-3wo4/embed?b=0&title=0&a=1&loop=0&t=0&muted=0&wt=0" width="100%" height="400" frameBorder="0" allowFullScreen />

More in [Examples](/docs/workflows/examples).

## Node categories

**Start node** - Entry point

* Triggers when a message arrives or when the API calls the workflow
* Every workflow has exactly one Start node
* Automatically advances to the first connected node

**Action nodes** - Execute and continue

* Send messages (text, templates, interactive)
* Execute functions
* Call webhooks
* Set workflow variables
* Call other workflows
* Transfer to human agents (handoff)
* Execute immediately and advance to the next node

**Wait nodes** - Pause for input

* Halt execution until the user responds
* Store the response in `{{last_user_input}}` or a custom variable
* Resume when a message arrives

**Decide nodes** - Route execution

* Branch to different paths
* Use AI to interpret intent, or custom function logic
* The returned label determines which edge to follow

**Agent nodes** - AI conversations

* Multi-turn conversations with tool access
* Can call webhooks and functions
* Stay at the node until the agent calls `complete_task`
* New user messages are injected automatically during the conversation

## Execution flow

Execution follows the edges between nodes and continues until:

* A Wait node pauses for user input
* An Agent node is reached, staying there until it calls `complete_task`
* A Handoff node stops the run and transfers to a human
* No connected nodes remain, and the workflow completes

## Two ways to build

<CardGroup cols={2}>
  <Card title="Build in the canvas" icon="diagram-project" href="/docs/workflows/build-in-canvas">
    Drag nodes, connect them, and publish from the dashboard. No setup required.
  </Card>

  <Card title="Build locally" icon="code" href="/docs/workflows/build-locally">
    Pull workflows into a repo, edit them as JSON or TypeScript, and push them back.
  </Card>
</CardGroup>

Both produce the same workflow. You can start in the canvas and pull it into code later, or push from code and keep editing in the canvas.

## Learn more

<CardGroup cols={2}>
  <Card title="Step types" icon="cube" href="/docs/flows/step-types/start-node">
    Every node type and its configuration
  </Card>

  <Card title="Variables and context" icon="brackets-curly" href="/docs/flows/variables-and-context">
    Access user data and workflow state with template variables
  </Card>

  <Card title="Triggers" icon="bolt" href="/docs/flows/triggers">
    Start workflows from messages or API calls
  </Card>

  <Card title="Functions" icon="terminal" href="/docs/functions/overview">
    Serverless JavaScript your workflows can call
  </Card>
</CardGroup>
