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

# Nodes and Conditions

> Reference for workflow node types and conditions

This page provides a complete reference for all node types and condition options available in workflows.

## Node Types

### Start Node

The Start node is the entry point for the workflow. Duckie creates it automatically when you create a workflow.

**Outputs:**

* **Next** — Begins workflow execution

***

### Tool Node

Executes a tool or another reusable resource.

{/* Screenshot: Tool node configuration panel */}

**Configuration:**

| Field       | Description                                                                              |
| ----------- | ---------------------------------------------------------------------------------------- |
| **Name**    | Display name for this node                                                               |
| **Tool**    | The Duckie tool, app tool, custom tool, MCP tool, agent, runbook, or workflow to execute |
| **Inputs**  | Values mapped to the selected tool's parameters                                          |
| **Outputs** | Values produced by the tool for later nodes                                              |

**Outputs:**

* **Success** — Tool executed successfully
* **Failure** — Tool execution failed

**Example uses:**

* Search company docs
* Send a response with the Responder tool
* Call a custom API
* Call a tool from an MCP server
* Call another agent as a sub-agent
* Run a runbook or another workflow
* Create a Jira ticket or update a Zendesk ticket

When the selected tool is an agent, the node can pass instructions, conversation history, and additional context to the child run. The node output includes the child run status and resolution summary.

***

### Decision Node

Routes the workflow across branches. Branches are evaluated from top to bottom. The first matching branch is taken; if no branch matches, the **Else** path is taken.

{/* Screenshot: Decision node configuration panel */}

**Configuration:**

| Field        | Description                          |
| ------------ | ------------------------------------ |
| **Name**     | Display name for this node           |
| **Branches** | Ordered rule or AI conditions        |
| **Else**     | Fallback path when no branch matches |

**Outputs:**

* One output per branch
* **Else** fallback output

***

### End Node

Marks a workflow path as complete.

## Condition Reference

Decision branches can use a **Rule** condition or an **AI** condition.

### Rule Conditions

Rule conditions compare a selected value against another value.

| Field         | Description                                                 |
| ------------- | ----------------------------------------------------------- |
| **Check**     | The value to evaluate                                       |
| **Condition** | The comparison to apply                                     |
| **Value**     | The value to compare against, when the comparison needs one |

Available comparisons:

| Comparison       | Use for                           |
| ---------------- | --------------------------------- |
| equals           | Exact matches                     |
| does not equal   | Excluding a value                 |
| is greater than  | Numeric comparisons               |
| is less than     | Numeric comparisons               |
| is at least      | Numeric lower bounds              |
| is at most       | Numeric upper bounds              |
| contains         | Text or list membership           |
| does not contain | Excluding text or list membership |
| starts with      | Prefix checks                     |
| ends with        | Suffix checks                     |
| is empty         | Missing or null values            |
| is not empty     | Present values                    |
| is true          | Boolean true                      |
| is false         | Boolean false                     |

### AI Conditions

AI conditions use a prompt and selected inputs to make a judgment.

| Field      | Description                     |
| ---------- | ------------------------------- |
| **Mode**   | Basic or Advanced reasoning     |
| **Prompt** | The decision the AI should make |
| **Inputs** | Context the AI should evaluate  |

Example prompt:

```text theme={null}
Determine whether the customer is satisfied with the resolution.
Consider their latest message, conversation history, and whether the original issue appears resolved.
```

## Input Mapping

Use input mapping to pass values into tool parameters and conditions.

| Source               | Use for                                           |
| -------------------- | ------------------------------------------------- |
| **Manual Value**     | Fixed strings, numbers, booleans, or JSON         |
| **Ticket Data**      | Metadata from the conversation or source ticket   |
| **Previous Node**    | Outputs from earlier workflow nodes               |
| **Saved Value**      | Values saved for reuse in the workflow            |
| **Generate with AI** | Values generated from selected context            |
| **Multiple Items**   | Lists of values for parameters that accept arrays |

## Best Practices

### Node Naming

* Use descriptive names: "Check order eligibility" not "Decision 1"
* Include the action: "Lookup order in database"
* Be consistent across workflows

### Error Handling

* Always connect Failure outputs
* Provide fallback paths for errors
* Consider retry logic for transient failures

### Testing

* Test each path through the workflow
* Verify variable mapping works correctly
* Check edge cases and error conditions

## Next Steps

<CardGroup cols={2}>
  <Card title="Create Workflows" icon="diagram-project" href="/workflows/creating-workflows">
    Build workflows using these nodes
  </Card>

  <Card title="Tools Reference" icon="wrench" href="/tools/overview">
    See available tools for Tool nodes
  </Card>
</CardGroup>
