# n8n

[n8n](https://n8n.io/) 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](https://docs.n8n.io/).

**Quickstart**

Download the workflow schema below

{% file src="<https://2302384909-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOUJInHjoAOfzq3bL12Af%2Fuploads%2FjtNVzyevV2yl6raW5BAV%2FBuild%20your%20first%20Arcee%20AI%20agent.json?alt=media&token=f7674ca5-cec9-45ec-9e42-2ecfd0221950>" %}

{% hint style="info" %}
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..." to save the file.
{% endhint %}

2. In your blank n8n workflow, select the ellipsis (3 dots "...") in the top right corner and select "Import from File". and select `Build your first Arcee AI agent.json.` Your workflow will now look like this:

<figure><img src="https://2302384909-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOUJInHjoAOfzq3bL12Af%2Fuploads%2FqzUI5ABPB3RtidVcGOdO%2Fimage.png?alt=media&#x26;token=fa40c1e5-0ca5-473a-ba93-3870ec5ddbb0" alt="" width="563"><figcaption></figcaption></figure>

{% hint style="success" %}
This workflow takes in a prompt from chat and passes it to an AI Agent. The AI Agent is powered by a language model (which we'll set to be an Arcee AI model) and has access to memory. With this node you can also configure tools to have your agent access outside systems and APIs.
{% endhint %}

Select the OpenRouter Chat Model node and setup your credentials for OpenRouter using an OpenRouter API Key. Select the Arcee AI model you want to use.

**Your OpenRouter Chat Model configuration should now look like this:**

<figure><img src="https://2302384909-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOUJInHjoAOfzq3bL12Af%2Fuploads%2FtuLLSCkoLsKjxlLq989n%2Fimage.png?alt=media&#x26;token=51ccdb25-0582-4ad0-8424-4679d19b5648" alt="" width="375"><figcaption></figcaption></figure>

Select Open Chat and send a message to your agent

<figure><img src="https://2302384909-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOUJInHjoAOfzq3bL12Af%2Fuploads%2FSavAEijC91XLEoNOxonV%2Fimage.png?alt=media&#x26;token=3aad7d07-b002-4788-bbd4-e1ae35ae8781" alt=""><figcaption></figcaption></figure>

Your message will be passed to the Agent Node, which invokes the model and stores the messages in conversation memory.
