# Flows

Flows are the core orchestration mechanism in MindedJS that define how your AI agent processes conversations. A flow represents a complete conversation pathway from trigger to completion, consisting of nodes (processing units), edges (routing logic), and memory (shared state).

## Flow Structure

Every flow follows this YAML structure:

```yaml
id: flow-id                    # Unique flow identifier
name: Flow Name                # Human-readable flow name
nodes:                         # Array of processing nodes
  - type: trigger
    name: node-name
    displayName: Node Name
    # ... node-specific properties

edges:                         # Array of routing connections
  - source: source-node-name
    target: target-node-name
    type: stepForward
    # ... edge-specific properties
```

### Flow Properties

* `id` (string, required): Unique identifier for the flow
* `name` (string, required): Human-readable name for the flow
* `nodes` (array, required): Array of node definitions
* `edges` (array, required): Array of edge definitions connecting nodes

## Flow Components

| Component                              | Purpose    | Description                                          |
| -------------------------------------- | ---------- | ---------------------------------------------------- |
| [**Nodes**](/low-code-editor/nodes.md) | Processing | Handle specific tasks like LLM calls, tool execution |
| [**Edges**](/low-code-editor/edges.md) | Routing    | Define transitions and decision logic between nodes  |
| [**Memory**](/sdk/memory.md)           | State      | Shared context that persists throughout the flow     |

## Example

```yaml
id: customer-support-flow
name: Customer Support Flow
nodes:
  - type: trigger
    triggerType: webhook
    name: customer-request
    displayName: Customer Request

  - type: promptNode
    name: support-agent
    displayName: Support Agent
    prompt: |
      You are a helpful customer support agent.
      Assist the customer with their inquiry.

edges:
  - source: customer-request
    target: support-agent
    type: stepForward
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.minded.com/low-code-editor/flows.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
