Mindket

Chat agent that runs any model through OpenRouter

Newversion 1 · updated

Overview

An n8n chat agent whose model is a text setting. It sends each message through OpenRouter to the model you name, from any maker on its list, and keeps the last few messages of each chat.

Chat agent that runs any model through OpenRouter is an n8n workflow in the Developer category, listed by Mindket. It is free. This is version 1, last updated on . Download it on this page or copy its JSON, then import it into an n8n canvas. Nothing runs until you activate it in n8n.

At a glance

Runs in
  • n8n Cloud: import the file into a new workflow there
  • Your own n8n server: the same file and steps
  • A chat page: switch on the trigger’s public chat to share the address

Platform

Connects 2 apps

How it works

Trigger

Chat message

It starts when someone sends a message in the chat, and it needs:

  • The message text
  • A model ID in the Settings node, such as deepseek/deepseek-v4-flash

Actions

  1. The message, the chat’s session ID and the model ID are collected in one node
  2. The agent takes the message as its prompt
  3. The model named in Settings answers through OpenRouter
  4. The last 5 messages of the chat are kept as memory

Result

An answer in the chat from the model you named, with the chat’s recent history in mind

Integrations

What you need before you start.

OpenRouter

Model gateway

Receives each call at one address and runs the model whose ID you set.

NeedsOpenRouter API key, in an OpenAI API credential with the base URL changed

OpenAI

Chat model node

Provides the node that makes the chat call. Here its address points at OpenRouter.

NeedsNo OpenAI account, only the credential type

Workflow check

Checked by Mindket on 13 Nov 2026

Steps
3 steps, starting on a chat message
AI
1 step calls an AI model: AI Agent
Sign-ins
Signs in to: OpenAI
API keys
No API key is left in the file
Step types
Mindket’s checker reads all 3 of its step types

Read from the workflow’s file, not from a run.

About

What it is

This n8n chat agent has a model that is only a line of text. You type a message in the chat, and the agent answers with whichever model you named in one node. The call goes through OpenRouter, which fronts models from many makers, so switching is a matter of changing that line. A simple memory keeps the last messages of each chat. Five nodes run it, beside three sticky notes.

Who it suits

Builders who want to compare models on the same chat, and small teams who need to change models without rebuilding a workflow. Skip it if you want one fixed provider with no extra account, since every call here passes through OpenRouter.

Who uses it, and how
IndustryWho uses itHow they use itExample
Automationn8n buildersTry several models in the same chat before choosing oneA builder asks one question and then swaps the model line to compare answers.
ProductProduct teamsTest which model suits a support or writing flowA team checks three cheap models on the same ten questions.
ResearchAnalystsReach a model that no other node offersAn analyst calls a newly released model by its ID.
TeachingTrainersShow how model choice changes an answerA trainer runs one prompt on a small and a large model.

You need a little n8n: import a file, add one credential with a changed base URL and press the chat button.

Where to use it

Any n8n that can reach OpenRouter will run it. The chat works inside n8n, and you can make it public for other people.

  • n8n Cloud: import the file into a new workflow there
  • Your own n8n server: the same file and steps
  • A chat page: switch on the trigger’s public chat to share the address

Setup

Download saves a zip with workflow.json and Mindket’s setup notes in your downloads folder. You need an OpenRouter key and one credential.

What you need first
NeedDetail
n8nOn n8n Cloud or on a server of your own
OpenRouterAn account and an API key
A credentialAn OpenAI API credential with the OpenRouter key and the base URL https://openrouter.ai/api/v1
  1. In n8n, create a workflow, open its menu, choose Import from File and pick workflow.json.
  2. Add an OpenAI API credential. Put your OpenRouter key in the key field and set the base URL to https://openrouter.ai/api/v1.
  3. Select that credential in LLM Model.
  4. Open Settings and check the model value, an OpenRouter model ID.
  5. Press the Chat button and send a message.

How to use it

Chat as you like. To change the model, edit the model value in Settings and send another message. The agent keeps the last 5 messages of each chat.

What to change for a different result
To changeWhere
The modelThe model value in Settings
How much the chat remembersContext Window Length in Chat Memory
The agent’s behaviourA system message in AI Agent, under Options
A public chatMake Chat Publicly Available in the trigger

Example

A builder sends the message “Summarize the plot of Hamlet in two sentences.” With deepseek/deepseek-v4-flash in Settings, the agent answers from that model.

Changing the value to google/gemini-3.8-flash and sending the same message gives a second answer from another maker, with the earlier messages of the chat still in the memory.

For newcomers and experts

If you are new. n8n draws a workflow as boxes joined by lines, and each box, a node, does one job. An agent is a node that asks a chat model to answer and can use memory and tools. OpenRouter is a service with one address and many models behind it.

For experts. Settings copies chatInput into prompt and the chat’s sessionId, and LLM Model reads its model from {{ $json.model }}. Chat Memory uses the custom key {{ $json.sessionId }}, and its context window is left at the default, 5.

Where to look closer
NodeWhat it doesWhat to know
SettingsSets model, prompt and sessionIdThe one place to pick the model
LLM ModelThe OpenAI Chat Model node, version 1.1Its credential points at OpenRouter
AI AgentAnswers the prompt, version 1.7No tools are connected
Chat MemorySimple Memory, version 1.3Kept in n8n’s own process

Good to know

Model IDs change often, and the file’s default model was gone.

  • Default model: the file’s deepseek/deepseek-r1-distill-llama-8b and the other four example IDs are no longer on OpenRouter’s public model list, read on 12 November 2026. Mindket’s copy uses deepseek/deepseek-v4-flash and lists six IDs that are
  • Check IDs: a withdrawn ID makes OpenRouter refuse the call. See https://openrouter.ai/models first
  • Newer n8n: it has a dedicated OpenRouter Chat Model node, which suits a new build. This copy also runs on older versions
  • Memory: it is lost on a restart and does not suit a setup with several workers
  • Public chat: anyone who finds the address can spend your OpenRouter credit
  • Billing: OpenRouter bills by the price of the model you choose, for each message and the history sent with it
  • Your data: messages and history go to OpenRouter, which passes them to the company that runs the model
  • Credentials: the JSON holds none

README and files

README

Chat agent that runs any model through OpenRouter

An n8n chat agent whose language model is a setting. You type a message in the chat, and the agent answers with whichever model
you named in one node. The model call goes through OpenRouter, which fronts models from many companies, so you can switch from
one maker's model to another by changing a single line of text. The agent keeps the last few messages of each chat.

What is inside

  • workflow.json: the workflow as n8n exports it, eight nodes. Five of them run and three are sticky notes. It holds no
    credential.
  • README.md: these notes.

What we changed from the original copy

  • The default model in Settings was deepseek/deepseek-r1-distill-llama-8b. OpenRouter's public model list, read on 12 November
    2026, no longer holds it. The default is deepseek/deepseek-v4-flash now, which the list does hold.
  • The sticky note of model examples named five models that the same list no longer holds. It names six that it does: openai/gpt-6-luna,
    google/gemini-3.8-flash, deepseek/deepseek-v4-flash, mistralai/mistral-small-2603, qwen/qwen3.8-flash and
    google/gemma-4-26b-a4b-it:free.
  • The credential link and the chat webhook ID are gone, and the file's name is ours.
  • Nothing else. The agent, the memory and the model node are as the file had them.

Before you start

  • An n8n instance, on n8n Cloud or your own server.
  • An OpenRouter account and API key.

Set it up

  1. In n8n, create a workflow, open its menu and choose Import from File. Pick workflow.json.
  2. Add a credential of the type OpenAI API. Put your OpenRouter key in the key field, and set the base URL to
    https://openrouter.ai/api/v1. Name it something like OpenRouter.
  3. Select that credential in LLM Model.
  4. Open Settings and check the model value. It is an OpenRouter model ID, such as deepseek/deepseek-v4-flash.
  5. Press the Chat button and send a message.

How a run goes

  1. When chat message received starts a run for each message and passes on the text as chatInput, with a sessionId.
  2. Settings sets three fields: model, which holds the model ID, prompt, which copies the message, and sessionId, which
    copies the chat's session ID.
  3. AI Agent (version 1.7) takes {{ $json.prompt }} as its prompt, with the prompt type set to define.
  4. LLM Model is the OpenAI Chat Model node, version 1.1. Its model field reads {{ $json.model }} from Settings, and its
    credential points at OpenRouter, so the call goes there.
  5. Chat Memory is a Simple Memory node, version 1.3. It uses the custom key {{ $json.sessionId }}, so each chat keeps its own
    history. Its context window length is left at the default, 5.

Change the look

  • The model: the model value in Settings, or the model field of LLM Model directly.
  • How much the chat remembers: Context Window Length in Chat Memory.
  • The agent's behaviour: add a system message in AI Agent, under Options.
  • Tools: connect them to AI Agent. The model you pick must support tool calls.
  • A chat page for other people: switch on Make Chat Publicly Available in When chat message received.

Good to know

  • Model IDs change often. If a model is withdrawn, OpenRouter refuses the call. Check the list at https://openrouter.ai/models
    before you rely on an ID.
  • Newer n8n versions have a dedicated OpenRouter Chat Model node, as n8n's source showed on 12 November 2026. This copy uses the
    OpenAI Chat Model node with an OpenRouter address, which also runs on older versions.
  • The memory is kept in n8n's own process. It is gone after a restart, and it does not suit a setup that runs several workers.
  • A public chat lets anyone who finds its address spend your OpenRouter credit.
  • IDs that end in :free carry no price in the model list. They change often, so check one before you rely on it.
  • Where the data goes: each message and the chat history go to OpenRouter, which passes them on to the company that runs the model
    you chose.
  • Billing: OpenRouter charges by the price of the model you choose, for the tokens of each message and of the history sent with it.
Files
NOTICE.md  596 B
README.md  4 KB
workflow.json  4 KB

3 files, 9 KB, downloaded as a zip.

What’s new

  • Version 1 · 2026-11-12

Reviews

No ratings yet

Write a review

No reviews yet.

More from Mindket

See all from Mindket

Huashu Design

alchaincyf · Skill

Turns a one-line request in your AI agent into a finished design: a launch animation, a clickable app prototype, an editable slide deck, an infographic or a se…

New29.4k

Guizang PPT Skill

op7418 · Skill

Skill that makes single-file HTML slide decks, slide illustrations and platform covers in two visual styles, with a presenter mode for rehearsal. For speakers…

New29.8k

Claude Code Skills & Plugins

alirezarezvani · Skill

Adds 411 ready-made skills for Claude Code and other coding agents, grouped by role from engineering and product to marketing, finance and compliance. Installs…

New29.8k

Similar in Developer

See all in Developer

buzz

block · Kit

Self-hostable workspace where people and AI agents share the same rooms, built on a Nostr relay that logs every action as a signed event. For teams that want t…

New37.3k

plannotator

backnotprop · Kit

Opens your AI coding agent's plans, specs and code changes in a browser so you can annotate or comment on them and send the feedback straight back to the agent.

New10.5k

open-code-review

alibaba · Kit

Reviews Git changes with an AI agent that reads files and searches the codebase, then writes comments tied to exact lines. It suits developers who want automat…

New50.7k