Page cover

n8n

n8n is an open-source workflow automation platform that enables developers and businesses to connect APIs, services, and custom logic through visual, node-based workflows. It’s designed for flexibility and extensibility, allowing users to orchestrate complex data flows and automate repetitive tasks without writing full applications. With their Basic LLM Chain and AI Agent nodes, you can connect to language models across a variety of platforms.

This tutorial will guide you through how to use Arcee AI language models in n8n via OpenRouter.

Prerequisites

  • n8n Account

    • If you do not have an n8n account, get started here.

  • Blank workflow in n8n

    • If you need assistance setting up a workflow, follow the steps here.

Setup Steps

  1. Download the workflow schema below

Right click on the file above and select "Open in a New Tab", the page you'll see is the workflow JSON schema. Right click on the page and select "Save as..."

  1. In your blank n8n workflow, select the ellipsis (3 dots "...") in the top right corner and select "Import from File".

  2. Select Build your first Arcee AI agent.json

  3. Your workflow will now look like this:

  1. Select the OpenRouter Chat Model node.

  2. Setup your credentials for OpenRouter using an OpenRouter API Key.

    1. If you have not created an OpenRouter Account and API Key, see the Model Integration page for OpenRouter.

  3. Under Model, select arcee-ai/afm-4.5b or whichever Arcee AI model you want to utilize.

  4. Your OpenRouter Chat Model configuration should now look like this:

  1. Select Open Chat and send a message to your agent

  1. Your message will be passed to the Agent Node, which invokes AFM-4.5B and stores the messages in conversation memory.

Note:

OpenRouter is just one of the integration options for model selection in n8n. If you want to utilize a locally hosted model in n8n, you can utilize ollama.

If you use the Basic LLM Chain node in your workflow, you can also leverage Hugging Face Inference Model deployment for model hosting.

Last updated