Orchestrator Agent icon

Orchestrator Agent

Intelligent routing node for multi-agent systems. Classifies incoming messages and routes them to the correct sub-agent using LLM, Semantic Embeddings, Vector Store (RAG), or Hybrid strategies.

Orchestrator Agent

AI-generated

Summary

Classify incoming user messages using various routing strategies (LLM, Semantic Embeddings, Vector Store, Hybrid, or Contextual Hybrid) to route them to the most appropriate sub-agent defined by the user. Supports configurable fallback handling, confidence thresholds, input message resolution, and extended analysis fields.

Inputs

  • Sub-Agents (required) — Define multiple sub-agents, each with a unique name, user-facing routing description, and example training phrases to guide routing.
  • Routing Strategy (required) — Select the routing method: LLM Classification, Semantic Embeddings, Vector Store (RAG), Hybrid (Vector Store + LLM), or Contextual Hybrid (session-aware).
  • Agent Field in Vector Store — Specify metadata key in vector store documents identifying the corresponding agent (defaults to 'agentName').
  • Vector Search Depth — Number of documents retrieved per query from the vector store for routing decisions (default 10).
  • Relevance Score Mode — Specify how relevance scores are reported by the vector store: similarity or distance.
  • Finalist Agents for LLM — When using Hybrid or Contextual Hybrid routing, how many top vector store candidates to present to the LLM (default 3).
  • Observation Field in Vector Store — For Contextual Hybrid routing, a metadata field holding mandatory routing rules per scenario.
  • Message Source (required) — Select how to obtain the user message to route: auto-detect common fields or via a custom expression.
  • Message Expression — Expression to extract the user message text when custom message source is selected.
  • System Prompt (Orchestrator Agent) — Optional high-priority instructions to guide the LLM routing decisions, overriding agent descriptions and vector store scores.
  • Enable Fallback Branch (required) — Enable a fallback output branch for messages that do not match any agent or score below threshold.
  • Confidence Threshold — Minimum confidence required to assign a message to a sub-agent; otherwise routed to fallback.
  • Use Output Parser — Enable preprocessing of routing output through an Output Parser sub-node.
  • Enable Extra Analysis Fields — Extract additional custom fields from the LLM alongside routing decision.
  • Extra Analysis Fields (JSON Schema) — JSON Schema defining additional fields to extract in extended analysis.
  • Session ID — Session identifier passed to memory node for conversation history (LLM strategy only).
  • Options (Max Tokens, Forward All Input Fields, Auto-Retry on Parse Error, Temperature) — Additional options controlling LLM call tokens, input forwarding, parse error retry, and LLM temperature.

Output shape

Multiple output branches — one per configured sub-agent plus an optional fallback branch. Each output item contains the original input data plus an 'orchestrator' JSON object with routing metadata.

Outputs are arrays of items routed by the node, where each item's 'orchestrator' field includes the chosen agent's name and index, confidence score, reasoning for the decision, input text, latency metrics, and optionally vector store candidates and extra analysis fields if enabled. The fallback branch handles messages with low confidence or unmatched agents. The number of outputs dynamically matches the configured sub-agents plus fallback if enabled.

Examples

Example 1: Route user chat messages to specialized sub-agents based on message content using LLM classification with fallback.

Define several sub-agents with unique names and descriptive routing instructions. Set routing strategy to 'LLM Classification'. Enable 'Fallback' with a confidence threshold of 0.5 to catch ambiguous messages. Configure input to auto-detect message text.

Example 2: Route messages using hybrid semantic search and LLM for high-accuracy routing with session context.

Provide a vector store and chat model as inputs. Enable 'Hybrid' or 'Contextual Hybrid' routing strategy. Define vector store metadata keys matching agent names. Optionally define additional routing rules via 'System Prompt' and vector store 'observation' fields. Use fallback branch for low-confidence cases.

Links

Discussion