Bridge
βοΈ Core Concept: Customizing Workflow Connections
π Key Concepts
- What is a Bridge? A Bridge is a customizable connector between two blocks in a workflow. It replaces the default INTELLITHING Router Engine and allows you to explicitly define how outputs flow into inputs.
-
Why Bridges?
-
Override default routing.
- Enable complex workflows.
- Control data flow, formatting, and transformations.
π§ Navigation
- Bridges appear in the Workflow tab next to the Block Editor.
- They can be dragged into the workflow canvas and connected visually.
βοΈ Bridge Configuration
1. Input and Output Mapping
- Connects the last node of a block (output) to the first node of another block (input).
- Overrides default router behavior.
- Allows multi-agent and multi-connector orchestration.
Example:
SQL β Bridge β Slack
SQL results are mapped directly to Slack input.
2. Input and Output Formatting & Manipulation
Bridges support lightweight transformations before passing data.
-
Placeholders:
-
{result}
β output from the previous block. -
{user query}
β original user query. -
Use cases:
-
Simple formatting.
- JSON wrapping.
- Rich analysis / business logic injection.
π Syntaxes
Bridge syntaxes let you reference the outputs of specific modules anywhere in the workflow. All syntaxes are enclosed in curly brackets {}
.
There are two main forms:
{output.BLOCKNAME}
β The synthesized natural language output from a block.{raw.output.BLOCKNAME}
β The raw data output from a block before it is synthesized.
The key difference between {result}
and the above is scope:
{result}
always refers to the output of the immediately preceding block.{output}
and{raw.output}
allow you to pull the output from any block in the workflow, not just the previous one.
β οΈ Case Sensitivity for Agents
For agents with dynamic naming, syntaxes are case sensitive. They can be used as follows:
{output.AGENTNAME}
β The final synthesized natural language output from the agent.{raw.output.AGENTNAME}
β The raw outputs collected from tools before the agent synthesizes them.{raw.output.AGENTNAME.TOOLNAME}
β The raw data from a specific tool used by the agent.
π§© Example Scenarios
Example 1 β Agents and Tools
Suppose you have an agent named MyNewAgent
with tools MyPdfTool
and MySlackTool
:
{output.MyNewAgent}
β The agentβs final synthesized response after tool use and reasoning.{raw.output.MyNewAgent}
β A list of raw outputs from all tools used (one or multiple).{raw.output.MyNewAgent.MyPdfTool}
β The raw output specifically fromMyPdfTool
.
Workflow Example:
- In
bridge3
, if you want the SQL output (instead of{result}
, which only gives the RAG output), use:
- If you want the raw tool data from the agent before synthesis into natural language, use:
Example 2 β Simple Formatting
Example 3 β Business-Aware Analysis
You are INTELLI-BOT, a proactive strategist.
Given:
- User Query: {user query}
- SQL Result: {result}
Steps:
1. Interpret intent.
2. Classify as π Opportunity, β οΈ Risk, π§ Status Quo, or β Issue.
3. Provide takeaways.
4. Suggest next-best action.
Slack Output Example:
π― Intent: Analyze churn by plan.
β οΈ Situation: Risk
π Takeaways: Basic plan has highest churn.
π οΈ Next-Best Action: Run survey for Basic-tier users.
π οΈ Best Practices
- Keep transformations minimal to avoid complexity in debugging.
- Use bridges for data prep, enrichment, and flow control.
- Chain multiple bridges for layered analysis and formatting.
π Summary
Bridges give you precision, flexibility, and power in shaping your workflow. They transform a simple LLM-centric flow into a custom orchestration system tuned for your exact needs.