Precios Iniciar sesión Empezar gratis
Pipelines

AI Context Router

Teach AI to detect the topic of a request and automatically route it to the right processing branch. Use the AI Classify node for smart routing without complex condition logic.

How it works

The AI Classify node receives the incoming message and a list of named intents. It sends a special classification prompt to the AI asking it to identify which intent the message belongs to and return only the intent key. The result becomes the name of the active output port:

Logicinput message  →  AI Classify  →  "sales"   port  →  next node
                              →  "support" port  →  next node
                              →  "unknown" port  →  fallback node
The variable {{detected_intent}} always contains the classification result — available in templates of subsequent nodes.

Configuring AI Classify

Add an AI Classify node to the canvas
Drag from the "AI" group in the left palette or click to add.
Define the intents list
In the properties panel add intent keys (Latin characters, no spaces): sales, support, billing. The key unknown is added automatically.
Connect output branches
Each intent becomes a separate output port. Connect each port to the appropriate handler node.
Add classification hints (optional)
The "Classify prompt" field lets you add context for the AI: product description, example queries per category.

Example: e-commerce router

Graph[Trigger Widget]
      ↓ output
[AI Classify]
  └─ intents: orders, returns, product_info, other
      ├─ orders       → [AI Chat: "Order assistant"]      → [Reply]
      ├─ returns      → [AI Extract: order_id, reason]    → [Webhook CRM] → [Reply]
      ├─ product_info → [AI Chat: "Product consultant"]   → [Reply]
      └─ other        → [Reply: "Please clarify your request"]

Classification prompt

The system auto-generates a prompt like:

Auto-promptClassify the following message into one of these categories:
sales, support, billing, unknown

Reply with ONLY the category key, nothing else.

Message: "{{message}}"

Tips for accuracy

  • Use 3–7 intents — too many categories reduce accuracy.
  • Add examples of typical questions per category to the classify_prompt field.
  • Always keep the unknown branch — AI can't always classify precisely.
  • For critical routing (finance, healthcare), use smarter models: gpt-4o, claude-sonnet-4-6.