workflows.fit
Back to n8n workflows
n8n templateFreeBy ResilNext

Route AI tasks between Anthropic Claude models with Postgres policies and SLA

Overview This workflow implements a policy-driven LLM orchestration system that dynamically routes AI tasks to different language models based on task complexity, policies, and performance constraints. Instead of send...

DevelopmentData & StorageCore NodesAILangchainUtilityWebhookSet
Loading interactive preview...

Template notes

Overview

This workflow implements a policy-driven LLM orchestration system that dynamically routes AI tasks to different language models based on task complexity, policies, and performance constraints.

Instead of sending every request to a single model, the workflow analyzes each task, applies policy rules, and selects the most appropriate model for execution. It also records telemetry data such as latency, token usage, and cost, enabling continuous optimization.

A built-in self-tuning mechanism runs weekly to analyze historical telemetry and automatically update routing policies. This allows the system to improve cost efficiency, performance, and reliability over time without manual intervention.

This architecture is useful for teams building AI APIs, agent platforms, or multi-model LLM systems where intelligent routing is needed to balance cost, speed, and quality.

---

How It Works

1. Webhook Task Input - The workflow begins when a request is sent to the webhook endpoint. - The request contains a task and optional priority metadata.