Konnectify

Build reliable AI agent workflows with Path Merge

Build reliable AI agent workflows with Path Merge

Path Merge introduces a single, permanent Output node that acts as the final destination for every execution path in a custom tool, giving AI agents a consistent, predictable response regardless of which branch executed.

Single output node Branch-aware mapping Consistent agent outputs Lower LLM cost

What is Path Merge?

Previously, custom tool workflows with conditional branching could end at multiple disconnected points making it unclear what data would ultimately be returned to the AI agent.

With Path Merge, every branch is automatically connected to a single Output node, ensuring the tool always produces a consistent response structure. This makes custom tools more predictable, easier to maintain, and more reliable when called by AI agents.

The problem it solves

Before

Multiple disconnected endpoints — ambiguous return structure, agent misconfigurations

After

Single permanent Output node — every branch terminates at the same return point

How Path Merge works

When a workflow contains conditions, filters, or switch logic, multiple execution paths are created. Path Merge handles them all through a single output point.

Step 01

Branching logic runs

Each branch follows its own path — conditions, filters, or switch nodes route execution

Step 02

Every branch auto-connects

The builder automatically wires each branch path to the single Output node

Step 03

Output fields defined once

Configure branch-specific values where needed — all within a single mapping surface

Step 04

Agent receives consistent response

Regardless of which branch executed, the agent always receives the same field structure

Example

Branch A finds an existing customer and returns their details. Branch B creates a new customer and returns the new record. With Path Merge, both branches populate the same output fields — the agent processes the response identically, without needing separate handling logic for each path.

Branch-aware output mapping

The Output node supports branch-aware mappings. For each output field you can define a name, value source, field type, and optional description. When multiple branches feed into the same Output node, each branch can return different values while maintaining the same structure.

Output field configuration

Field name
The key the agent will reference in downstream steps
Value source
Which step output or branch result to use — configurable per branch
Field type
Text, Number, Boolean, Object, or Array
Description
Optional — helps the agent understand what the field contains

Example — per-branch value mapping

Output field
Branch A value
Branch B value
customer_id
Existing customer ID
Newly created customer ID
status
Existing
Created

The AI agent always receives the same fields — customer_id and status — regardless of which path was taken.

Benefits of Path Merge

Path Merge makes every layer of your workflow stack simpler — from tool configuration through to agent performance and operational cost.

Consistent agent outputs

Reliability

AI agents receive a predictable response structure every time a tool runs. This reduces ambiguity and improves the reliability of downstream reasoning.

Reduced agent complexity

Simplicity

Instead of teaching an agent how to handle multiple possible response formats, you define a single output schema that works across all branches, keeping agent instructions clean and maintainable.

Lower LLM consumption

Cost

By returning only the fields the agent actually needs, Path Merge reduces the amount of information sent to the model. Smaller, structured outputs require fewer tokens to process helping optimize LLM usage and operational cost.

Fewer workflow errors

Quality

A single return point eliminates uncertainty around which branch output should be consumed, reducing downstream mapping errors and handling issues.

Easier maintenance

Scale

As workflows grow more complex, Path Merge keeps the return structure centralized and easier to manage, one place to update when your business logic changes.

Why use custom tools for AI agents?

Custom tools transform complex business processes into structured, reusable workflows that AI agents can execute reliably. Instead of letting the agent reason through every step using natural language alone, you define exactly how a task should be performed and what should be returned.

 COST 

Reduce LLM usage and cost

Tools perform the heavy lifting outside the model, retrieving, filtering, and transforming data before passing only what the agent needs.

✓ Reduce token consumption
✓ Lower AI operating costs
✓ Improve response speed
 RELIABILITY 

Improve reliability

Tools execute predefined actions consistently instead of relying entirely on AI reasoning, producing predictable outcomes.

✓ Retrieve and update records
✓ Execute business logic
✓ Reduce incorrect actions
 CONTROL 

Control what the AI sees

Tools act as a controlled interface between your systems and the agent. You decide which inputs are provided, which actions run, and which outputs are returned.

 SCALE 

Reuse across multiple agents

Build a tool once and share it across agents. Every agent follows the same workflow and business rules with no logic duplication.

 SIMPLICITY 

Simplify agent instructions

Reference a named tool instead of embedding operational logic into prompts, keeping agent instructions clean and maintainable.

 REUSABILITY 

Build complex workflows once

Combine multi-app actions, conditional logic, transformations, and decision points into a single reusable capability.

Key takeaway

Custom tools allow you to move business logic out of prompts and into reusable workflows. By controlling inputs, actions, and outputs. With features like Path Merge ensuring consistent return structures you can build AI agents that are more reliable, cost-efficient, and easier to maintain while reducing unnecessary LLM consumption.

Reliable

Consistent outputs

Cost-efficient

Lower LLM spend

Scalable

Reuse across agents

Maintainable

Logic in one place

Get started

Build reliable workflows with Path Merge.

Open any custom tool with branching logic — every path now terminates at a single, consistent output.

Get started free

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article