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

# Workflows

> How conversation logic is defined in SentiVue Talk

A **workflow** is the conversation logic you build in SentiVue Talk. It defines what gets said, when the conversation moves on, and what data is collected. You create, edit, version, and run workflows in the dashboard and through the API.

## The graph model

A workflow is a **directed graph** — a set of nodes connected by edges.

```mermaid theme={null}
graph LR
    A[Start Call] -->|Caller greets| B[Qualify Intent]
    B -->|Wants support| C[Support Agent]
    B -->|Wants sales| D[Sales Agent]
    C -->|Issue resolved| E[End Call]
    D -->|Demo booked| E
```

**Nodes** are the steps in the conversation. Each node has a prompt that tells the LLM what to say and do at that point.

**Edges** are the transitions between nodes. Each edge has a condition — a natural language description of when to move on. The LLM evaluates whether the condition has been met based on the conversation so far.

## Node types

| Type         | What it does                                                                                     |
| ------------ | ------------------------------------------------------------------------------------------------ |
| `startCall`  | Entry point for telephony calls. The first thing the agent says when a call connects             |
| `agentNode`  | An LLM-powered conversation step. The core building block                                        |
| `globalNode` | Defines instructions that apply across all agent nodes (e.g. tone, language, fallback behaviour) |
| `endCall`    | Terminates the call                                                                              |
| `trigger`    | Entry point for runs started by API. Places an outbound call to the phone number in the request  |
| `webhook`    | Fires an HTTP request when reached — use for CRM updates, notifications, etc.                    |
| `qa`         | Runs automated quality analysis on the completed call                                            |

## Edges and transitions

An edge connects two nodes and fires when its condition is satisfied:

`transition_speech` is optional — if set, the agent speaks it before moving to the next node.

## Versioning

Every time you update a workflow's `workflow_definition`, SentiVue Talk saves a new version while keeping the history. The current version is always what runs. Old versions are retained for auditing.

## Creating workflows

There are two ways to create a workflow via the API:

* **From a definition** — provide the full node and edge graph yourself. Best for programmatic creation.
* **From a description** — describe what the conversation should do and SentiVue Talk generates the graph with an LLM. Best for getting started quickly.

See the [Workflow Definition Schema](/talk/developer/workflow-schema) for the full field reference.
