- Notifications
You must be signed in to change notification settings - Fork0
A dynamic input-based LLM routing AI-agent built with n8n. It selects the most suitable language model based on user queries, and uses the selected model to answer, solve, or address the input accordingly.
License
m3mentomor1/Input-based-LLM-Routing-Agent
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
A dynamic input-based LLM routing AI-agent built with n8n. It selects the most suitable language model:
- Sonar (Perplexity)
- GPT o3-mini-high (OpenAI)
- Claude 3.5 Sonnet (Anthropic)
based on user queries, and uses the selected model to answer, solve, or address the input accordingly.
The workflow above contains the following nodes:
Chat Trigger(Chat Input)AI Agent(Routing Agent, Agent Output)OpenRouter Chat Model(gpt-4o-mini, Dynamic Model)Simple Memory(Memory 1, Memory 2)Structured Output Parser
1. Make sure to have the following requirements:
- n8n account (Clickhere to create an account.)
- OpenRouter account + enough credits (Clickhere to create an account.)
- Docker Desktop (Optional for local hosting. Downloadhere.)
2. Clone this repository.
Run this command in your terminal:
git clone https://github.com/m3mentomor1/Input-based-LLM-Routing-Agent.git(Optional: You can alsoFork this repository.)
3. Go to the repository's main directory.
Run this command in your terminal:
cd Input-based-LLM-Routing-Agent4. Import workflow into n8n.
- Create a new workflow or open an existing one (n8n website or local via docker).
- Click the••• menu in the top-right corner.
- SelectImport from File...
- Chooseworkflow.json from this repository.
About
A dynamic input-based LLM routing AI-agent built with n8n. It selects the most suitable language model based on user queries, and uses the selected model to answer, solve, or address the input accordingly.
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
