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

# Parent Agent Flow Builder

> Use the flow view to understand nodes, edges, and execution order

## Flow view

Use **Flow view** as your primary workspace. Most users build, route, and review workflows directly in the flow.

<Frame>
  <img src="https://mintcdn.com/maadify/X4aEKWAIWIr8YAhZ/images/parent-agents/parent_agent_flows_simple.png?fit=max&auto=format&n=X4aEKWAIWIr8YAhZ&q=85&s=9d73de956c6e1f227902faa238de6dfa" alt="Flow view showing nodes and connections across the workflow" width="1892" height="972" data-path="images/parent-agents/parent_agent_flows_simple.png" />
</Frame>

## Node types and meanings

The flow builder visualizes your workflow as nodes:

* **Agent nodes**: sub-agents and their prompts.
* **Tool nodes**: execute-tool actions and their inputs.
* **Trigger nodes**: schedules and webhook entry points.
* **Approval nodes**: manual approvals that pause execution.
* **Error nodes**: explicit error states for routing and notifications.

<Tabs>
  <Tab title="Agent">
    <Frame>
      <img src="https://mintcdn.com/maadify/K7CT7HZ-nt5ok2U5/images/flows/agent_node.png?fit=max&auto=format&n=K7CT7HZ-nt5ok2U5&q=85&s=eae4613a8b5a6fd2910dcc4703769a1c" alt="Agent node showing a sub-agent and its prompt configuration" width="934" height="739" data-path="images/flows/agent_node.png" />
    </Frame>
  </Tab>

  <Tab title="Tool">
    <Frame>
      <img src="https://mintcdn.com/maadify/K7CT7HZ-nt5ok2U5/images/flows/execution_node.png?fit=max&auto=format&n=K7CT7HZ-nt5ok2U5&q=85&s=418b47a54e8baa721417d55ef850dd4c" alt="Tool node showing an execute-tool action and its inputs" width="383" height="429" data-path="images/flows/execution_node.png" />
    </Frame>
  </Tab>

  <Tab title="Trigger">
    <Frame>
      <img src="https://mintcdn.com/maadify/K7CT7HZ-nt5ok2U5/images/flows/trigger_node.png?fit=max&auto=format&n=K7CT7HZ-nt5ok2U5&q=85&s=fff10efbe2b212998b2f90c2bb374982" alt="Trigger node showing a schedule or webhook entry point" width="455" height="422" data-path="images/flows/trigger_node.png" />
    </Frame>
  </Tab>

  <Tab title="Approval">
    <Frame>
      <img src="https://mintcdn.com/maadify/K7CT7HZ-nt5ok2U5/images/flows/approval_node.png?fit=max&auto=format&n=K7CT7HZ-nt5ok2U5&q=85&s=7cd219592d396281fccd36136fdc22ab" alt="Approval node showing a manual approval that pauses execution" width="433" height="379" data-path="images/flows/approval_node.png" />
    </Frame>
  </Tab>

  <Tab title="Error">
    <Frame>
      <img src="https://mintcdn.com/maadify/K7CT7HZ-nt5ok2U5/images/flows/error_node.png?fit=max&auto=format&n=K7CT7HZ-nt5ok2U5&q=85&s=3decdfb4ec3993efe12d09341a636c6d" alt="Error node showing an explicit error state for routing and notifications" width="424" height="466" data-path="images/flows/error_node.png" />
    </Frame>
  </Tab>

  <Tab title="Edge conditions">
    <Frame>
      <img src="https://mintcdn.com/maadify/K7CT7HZ-nt5ok2U5/images/flows/edge_conditions.png?fit=max&auto=format&n=K7CT7HZ-nt5ok2U5&q=85&s=50bc3d229b346d09d1f5da21d179ffa9" alt="Edge conditions showing how routing decisions connect nodes" width="486" height="859" data-path="images/flows/edge_conditions.png" />
    </Frame>
  </Tab>
</Tabs>

## Edge meaning and routing

Edges represent routing decisions made by **rules**. When a rule matches on a node, the edge to the selected action becomes the next step.

<Tip>
  If a node has multiple rules, edges can represent multiple outcomes. Use rule order to control which condition is evaluated first.
</Tip>

## Inspect and edit a node

<Steps>
  <Step title="Select a node">
    Click a node to open its details and current rule configuration.
  </Step>

  <Step title="Edit configuration">
    Update the sub-agent prompt, tool inputs, or trigger settings from the panel.

    <Tabs>
      <Tab title="Agent details">
        <Frame>
          <img src="https://mintcdn.com/maadify/K7CT7HZ-nt5ok2U5/images/flows/edit_agent_detail.png?fit=max&auto=format&n=K7CT7HZ-nt5ok2U5&q=85&s=440002420183694c53396523cf10ae9e" alt="Edit agent details showing the agent prompt, tool inputs, and trigger settings" width="739" height="942" data-path="images/flows/edit_agent_detail.png" />
        </Frame>
      </Tab>

      <Tab title="Prompt template">
        <Frame>
          <img src="https://mintcdn.com/maadify/K7CT7HZ-nt5ok2U5/images/flows/edit_prompt_template.png?fit=max&auto=format&n=K7CT7HZ-nt5ok2U5&q=85&s=bd83d0ad088d378b333a42f8608e7249" alt="Edit details showing the agent prompt, tool inputs, and trigger settings" width="879" height="879" data-path="images/flows/edit_prompt_template.png" />
        </Frame>
      </Tab>

      <Tab title="Tool execution">
        <Frame>
          <img src="https://mintcdn.com/maadify/K7CT7HZ-nt5ok2U5/images/flows/edit_tool_execution.png?fit=max&auto=format&n=K7CT7HZ-nt5ok2U5&q=85&s=66d8332da156c424799d6d0477bea743" alt="Edit details showing the agent prompt, tool inputs, and trigger settings" width="1229" height="869" data-path="images/flows/edit_tool_execution.png" />
        </Frame>
      </Tab>

      <Tab title="Trigger">
        <Frame>
          <img src="https://mintcdn.com/maadify/K7CT7HZ-nt5ok2U5/images/flows/trigger_detail.png?fit=max&auto=format&n=K7CT7HZ-nt5ok2U5&q=85&s=cc8ececab450c777f60000d95d08e6b3" alt="Edit details showing the agent prompt, tool inputs, and trigger settings" width="1382" height="858" data-path="images/flows/trigger_detail.png" />
        </Frame>
      </Tab>
    </Tabs>
  </Step>

  <Step title="Set rule order">
    Open **Rule order** to change evaluation priority for that node.

    <Frame>
      <img src="https://mintcdn.com/maadify/K7CT7HZ-nt5ok2U5/images/flows/rule_order.png?fit=max&auto=format&n=K7CT7HZ-nt5ok2U5&q=85&s=b6b99ac3cfa7cf753715001c9dc98606" alt="Rule order showing how to change evaluation priority for a node" width="1114" height="731" data-path="images/flows/rule_order.png" />
    </Frame>
  </Step>
</Steps>

## Manage tenant configurations

Use the **View Tenant Configurations** button in the flow view to manage how the parent agent is shared across relationships.

<Steps>
  <Step title="Open tenant configurations">
    Select a parent agent, then choose **View Tenant Configurations**.
  </Step>

  <Step title="Edit existing configurations">
    In **Existing Configurations**, select **Edit Config** to open the same configuration dialog you use in **Companies**.

    You can update visibility switches, review tool status, and save configuration changes.
  </Step>

  <Step title="Add the agent to new relationships">
    In **Add to Relationships**, select **Add Agent Name - Action** to attach the parent agent to that relationship.

    <Info>
      You only see relationships you own and have permission to update.
    </Info>
  </Step>

  <Step title="Include inactive relationships when needed">
    Toggle **Show Inactive Relationships** to include inactive relationships in both tabs.
  </Step>
</Steps>

<Note>
  The tenant configuration dialog uses the same permissions and validation rules as the main **Manage Companies** table.
</Note>

<Tabs>
  <Tab title="Existing Configurations">
    <Frame>
      <img src="https://mintcdn.com/maadify/K7CT7HZ-nt5ok2U5/images/flows/tenant_existing_configs.png?fit=max&auto=format&n=K7CT7HZ-nt5ok2U5&q=85&s=e0bff07b7af42f253d5b548d7b142982" alt="Parent agent tenant configurations dialog showing existing relationship rows and Edit Config buttons" width="1727" height="557" data-path="images/flows/tenant_existing_configs.png" />
    </Frame>
  </Tab>

  <Tab title="Add to Relationships">
    <Frame>
      <img src="https://mintcdn.com/maadify/K7CT7HZ-nt5ok2U5/images/flows/tenant_configurations_add.png?fit=max&auto=format&n=K7CT7HZ-nt5ok2U5&q=85&s=ac0d1de6264a5b767a4a9d400b98a87a" alt="Parent agent tenant configurations dialog showing add to relationships rows and add buttons" width="1729" height="895" data-path="images/flows/tenant_configurations_add.png" />
    </Frame>
  </Tab>
</Tabs>

## Edit rules from edges

Edges represent rule outcomes. Clicking a connection opens the rule that created that path so you can edit the condition or action without hunting through the rule list.

<Steps>
  <Step title="Select a connection">
    Click an edge to open the rule tied to that route.
  </Step>

  <Step title="Update conditions or actions">
    Edit the rule logic, then save to update the edge behavior.
  </Step>
</Steps>

<Tabs>
  <Tab title="Add condition">
    <Frame>
      <img src="https://mintcdn.com/maadify/K7CT7HZ-nt5ok2U5/images/flows/add_condition.png?fit=max&auto=format&n=K7CT7HZ-nt5ok2U5&q=85&s=e4097ad1bd9f18c84d3503672ea121cf" alt="Add condition dialog showing how to define a rule condition on an edge" width="1193" height="538" data-path="images/flows/add_condition.png" />
    </Frame>
  </Tab>

  <Tab title="Action detail">
    <Frame>
      <img src="https://mintcdn.com/maadify/K7CT7HZ-nt5ok2U5/images/flows/action_detail_view.png?fit=max&auto=format&n=K7CT7HZ-nt5ok2U5&q=85&s=0526b90bc8afe96824fdcf886010cd5f" alt="Action detail view showing the configured action for the selected rule" width="789" height="634" data-path="images/flows/action_detail_view.png" />
    </Frame>
  </Tab>

  <Tab title="Approval action">
    <Frame>
      <img src="https://mintcdn.com/maadify/K7CT7HZ-nt5ok2U5/images/flows/approval_action_rule.png?fit=max&auto=format&n=K7CT7HZ-nt5ok2U5&q=85&s=c8e46ebccfd936e2936458611f9dc54d" alt="Approval action rule showing approval configuration on an edge" width="1217" height="717" data-path="images/flows/approval_action_rule.png" />
    </Frame>
  </Tab>
</Tabs>

## Drag edges to re-route

You can rewire a workflow directly in the flow view. When you connect an edge between two nodes, the rule behind that edge is generated for you:

* The **source node** becomes the rule's **condition**. The rule evaluates after that node finishes, so its output is what triggers the next step.
* The **target node** becomes the rule's **action**. Execution flows to that node when the condition matches.

This means you rarely have to write a rule from scratch when you draw an edge — the connection itself defines "after this node, run that node," and you only need to refine the condition or action if you want behavior beyond the default routing.

<Steps>
  <Step title="Grab the edge handle">
    Drag the edge end from the current node. The node you start from is captured as the rule's condition source.
  </Step>

  <Step title="Drop on a new node">
    Release on the target node to update the routing path. The target node is automatically set as the rule's action, so the new edge represents "when the source node completes, run the target node."
  </Step>

  <Step title="Review the rule">
    Confirm the rule action now points to the new node. Open the edge to fine-tune the condition (for example, only route on a specific output) or change the action type if you need more than a direct hand-off.
  </Step>
</Steps>

<Tip>
  Because the source and target are wired in for you, dragging edges is the fastest way to sketch a workflow. Use the rule editor afterwards only when you need conditional branching beyond the default "previous node → next node" pattern.
</Tip>

<Frame>
  <img src="https://mintcdn.com/maadify/K7CT7HZ-nt5ok2U5/images/flows/drag_node.png?fit=max&auto=format&n=K7CT7HZ-nt5ok2U5&q=85&s=cb18a1a06a5ced4ee17bef20fbb1b6b3" alt="Drag Node Result" width="902" height="713" data-path="images/flows/drag_node.png" />
</Frame>
