Logic & Routing
In linear automation, data moves sequentially from point A to point B. However, sophisticated agents require the ability to branch, loop, and adapt to user intent.
The Logic Nodes in VibeAgent serve as the traffic control system for your workflow. They allow you to shift from rigid, linear scripts to dynamic networks that can handle complex decision-making in real-time.
Deterministic vs. Probabilistic
VibeAgent offers two distinct approaches to routing:
- Decision Logic – Rigid, rule-based branching (If/Else)
- Supervisor – Intelligent, LLM-based delegation
Decision Logic
The Decision Logic node is the foundational building block for rule-based routing. It evaluates data against a strict set of criteria to determine a binary outcome.
Configuration
To configure a decision, you define a precise condition using three parameters:
- Variable – The data source to check (e.g.,
User InputorPrevious Output) - Operator – The logical rule to apply (e.g.,
Contains,Equals,Starts With) - Value – The specific keyword or data point to match
Visual Execution
Once configured, the node visually splits the workflow into two distinct paths on the canvas:
- True Path (Green) – Executed when the condition is met
- False Path (Red) – Executed when the condition fails
Rule-based scenarios where conditions are black and white—keyword filtering, error handling, or segmenting users based on specific inputs.
Supervisor
While the Decision node follows rigid code, the Supervisor Node behaves like a human manager. It leverages a Large Language Model (LLM) to analyze the intent behind a request rather than just matching specific keywords.
Routing Strategy
Instead of defining "If/Else" rules, you provide the Supervisor with natural language instructions in the Routing Strategy field.
Example Strategy: "Route technical support questions to the Engineer Agent, and billing inquiries to the Sales Agent. If the request is unclear, route to General Support."
Model Configuration
Because the Supervisor performs reasoning tasks, it requires its own LLM configuration:
- Provider & Model – Select a model capable of reasoning (e.g., GPT-4 or Claude 3.5)
- API Key – Ensure a valid key is provided for the selected model provider
Complex workflows involving multiple specialized agents where user requests are unpredictable and require semantic understanding to route correctly.