工作流

n8n 本地聊天工作流|Chat Trigger 与 Ollama 入门示例

Demo workflow

n8n 官方入门套件中的三个节点示例,将聊天触发器、基础大模型链与 Ollama 连接,可下载 JSON 后在自己的 n8n 环境核对配置。

获取与使用

可直接下载

下载已核对的官方示例 JSON,在自己的 n8n 环境导入

使用难度进阶
国内可用性待核验

2026-11-08 更新 · 本站尚未实测

项目介绍

工作流 · 2026-11-08 更新 · 本站尚未实测

这是 n8n 官方自托管 AI 入门套件中的 Demo workflow JSON,重点展示聊天入口如何连接基础大模型链和本地 Ollama 模型。它不是独立 Agent,也不代表已经构建了完整的自动决策系统。

核心能力

点击能力名称查看输入、输出和原文依据。

文件包含三个节点:Chat Trigger 接收聊天输入,Basic LLM Chain 组织模型调用,Ollama Chat Model 提供模型连接。节点及连线来自原始 JSON。具体回复由实际模型与运行配置决定,本站没有生成或展示虚构的运行结果。

实际应用场景

适用场景

适合已经准备 n8n 和 Ollama 环境、希望认识 AI 节点连接方式的使用者。官方套件还包含其他组件,但不能把整个套件的全部能力算到这份三节点示例上。

工作流导入与配置

工作流使用路径

确认平台与依赖 → 下载实际文件 → 导入平台 → 填写自己的凭据和变量 → 检查节点 → 手动测试。

该路径为编辑引导,不代表已完成运行;具体导入步骤和节点信息见下方项目资料。不存在文件时不会显示下载按钮。

节点结构预览

依据已保存配置 JSON 生成,3 个节点;连线来自 connections。仅显示结构,不代表已导入或运行。

n8n 本地聊天工作流|Chat Trigger 与 Ollama 入门示例:配置节点与连线 Chat TriggerBasic LLM ChainOllama Chat Model
查看节点类型与依赖
节点名称节点类型
Chat Trigger@n8n/n8n-nodes-langchain.chatTrigger
Basic LLM Chain@n8n/n8n-nodes-langchain.chainLlm
Ollama Chat Model@n8n/n8n-nodes-langchain.lmChatOllama

导入与使用步骤

  1. 获取本页面的 JSON 文件,先阅读配套资源中的来源与许可。
  2. 在自己的 n8n 环境使用工作流导入功能,菜单位置以目标版本为准。
  3. 核对 Local Ollama service 凭据、Ollama 服务地址,以及 JSON 引用的 llama3.2:latest 模型是否准备好。
  4. 检查三个节点及连线后,按官方 README 的 Chat 入口手动测试。首次使用可能需要等待模型下载。

若尚未准备环境,官方 README 提供 Docker Compose 的 CPU、GPU 和 Mac 路径;请按自己的硬件阅读对应说明。本页面没有代替你执行部署命令。

变量说明

需要核对 JSON 节点参数和凭据占位,尚未配置

导入步骤

从官方文件获取 JSON,在 n8n 中导入后核对节点、凭据和模型设置。具体环境按套件 README,未执行导入。

配置与配套资源

配置示例

{
  "createdAt": "2024-02-23T16:58:31.616Z",
  "updatedAt": "2024-02-23T16:58:31.616Z",
  "id": "srOnR8PAY3u4RSwb",
  "name": "Demo workflow",
  "active": false,
  "nodes": [
    {
      "parameters": {},
      "id": "74003dcd-2ac7-4caa-a1cd-adecc5143c07",
      "name": "Chat Trigger",
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "typeVersion": 1,
      "position": [
        660,
        340
      ],
      "webhookId": "cdb5c076-d458-4b9d-8398-f43bd25059b1"
    },
    {
      "parameters": {},
      "id": "ce8c3da4-899c-4cc4-af73-8096c64eec64",
      "name": "Basic LLM Chain",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "typeVersion": 1.7,
      "position": [
        880,
        340
      ]
    },
    {
      "parameters": {
        "model": "llama3.2:latest",
        "options": {}
      },
      "id": "3dee878b-d748-4829-ac0a-cfd6705d31e5",
      "name": "Ollama Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOllama",
      "typeVersion": 1,
      "position": [
        900,
        560
      ],
      "credentials": {
        "ollamaApi": {
          "id": "xHuYe0MDGOs9IpBW",
          "name": "Local Ollama service"
        }
      }
    }
  ],
  "connections": {
    "Chat Trigger": {
      "main": [
        [
          {
            "node": "Basic LLM Chain",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Ollama Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Basic LLM Chain",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1"
  },
  "staticData": null,
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "pinData": {},
  "versionId": "4e2affe6-bb1c-4ddc-92f9-dde0b7656796",
  "triggerCount": 0,
  "tags": []
}

使用条件与限制

是否需要部署
需要已有 n8n 与 Ollama 环境;下载文件不包含环境部署
是否需要注册
需要配置自己的 n8n 实例;本地 Ollama 凭据和外部服务账号按实际使用方式确认
是否需要 API Key
示例引用 Local Ollama service 凭据,不包含你的可用服务密钥;替换模型时核对其认证要求
费用与额度
JSON 副本不代表运行无成本,计算资源、模型和托管服务费用分别核对
所需权限
导入后检查节点、模型地址和凭据,再手动触发测试
许可证与服务条款
已保存入门套件 LICENSE 为 Apache-2.0;n8n、Ollama 等组件各自适用其许可与条款

权限、费用与限制

文件只保存节点和凭据引用,不包含为你配置好的服务账号。运行前应检查节点可能发送到哪些模型服务,勿把自己的密钥上传或分享。模型下载、硬件、电力及可选托管服务可能产生成本;下载 JSON 不等于运行免费。

官方说明该套件用于快速上手与概念验证,未全面针对生产环境优化。本站没有导入、运行或进行性能测试,实际输入输出、模型效果和不同硬件兼容性需要自行验证。

国内使用情况

网友核验 用户经验分享

与站长实测独立,不代表官方认证或本站已实测。

我要核验
0 位参与者0 份有效分项记录

最近核验:暂无有效核验。参与人数按当前项目有效身份去重;不同核验项分别统计,不合并成用户总结果。仅统计审核通过且未过期的记录。

分项统计、有效期与样本量
核验项目有效人数成功 / 部分 / 失败 / 无法判断成功率最近核验 / 有效期
官方网站访问00 / 0 / 0 / 0样本不足暂无 / 7 天
GitHub 仓库访问00 / 0 / 0 / 0样本不足暂无 / 7 天
安装与运行00 / 0 / 0 / 0样本不足暂无 / 30 天
官方服务国内连接 / MCP 连接00 / 0 / 0 / 0样本不足暂无 / 30 天
国内网络情况00 / 0 / 0 / 0样本不足暂无 / 7 天
国内模型兼容性00 / 0 / 0 / 0样本不足暂无 / 30 天
自定义 API00 / 0 / 0 / 0样本不足暂无 / 30 天
海外服务依赖
00 / 0 / 0 / 0样本不足暂无 / 30 天
海外账号要求
00 / 0 / 0 / 0样本不足暂无 / 30 天
中文界面
00 / 0 / 0 / 0样本不足暂无 / 30 天
客户端兼容性00 / 0 / 0 / 0样本不足暂无 / 30 天
账号及费用信息
00 / 0 / 0 / 0样本不足暂无 / 30 天

成功率 = 成功 ÷(成功 + 部分成功 + 失败);无法判断不计入分母。至少 5 份可判断结果才显示成功率。账号、费用、海外依赖与语言等事实项,成功表示核查结论与资料吻合,具体观察另行统计;不表示免费或没有海外依赖。不同网络、客户端和版本的结果不能直接等同。

最近有效核验

暂无审核通过且未过期的网友核验。欢迎提交真实使用记录。

查看全部有效核验 →

国内实测状态:国内可用性待核验。协议兼容和官方资料说明不等于国内网络可用。

官方网站访问
尚未实测 待核验
GitHub 仓库访问
尚未实测 待核验
官方服务国内连接
尚未实测 待核验
国内网络情况
尚未实测 待核验
国内模型兼容性
尚未实测 待核验
自定义 API
尚未实测 待核验
海外服务依赖
尚未实测 待核验
海外账号要求
尚未实测 待核验
中文界面
尚未实测 待核验
国内最后核验时间
尚未实测

许可与国内使用

已核对本地 JSON 与已采集官方文件快照一致,套件许可快照为 Apache-2.0。n8n、Ollama 及其他组件各自的使用条款需另行确认。国内网络、模型下载和实际服务可用性未实测。

项目资料与来源

GitHub 仓库 ↗

官方文档 ↗

官方下载地址 ↗

字段依据与待核验事项

project_type:来源确认 · 官方 n8n workflow JSON:含 nodes 与 connections

editorial_content:来源确认 · docker compose --profile cpu up

原始 README(折叠技术参考)
# Self-hosted AI starter kit

**Self-hosted AI Starter Kit** is an open-source Docker Compose template designed to swiftly initialize a comprehensive local AI and low-code development environment.

![n8n.io - Screenshot](https://raw.githubusercontent.com/n8n-io/self-hosted-ai-starter-kit/main/assets/n8n-demo.gif)

Curated by <https://github.com/n8n-io>, it combines the self-hosted n8n
platform with a curated list of compatible AI products and components to
quickly get started with building self-hosted AI workflows.

> [!TIP]
> [Read the announcement](https://blog.n8n.io/self-hosted-ai/)

### What’s included

✅ [**Self-hosted n8n**](https://n8n.io/) - Low-code platform with over 400
integrations and advanced AI components

✅ [**Ollama**](https://ollama.com/) - Cross-platform LLM platform to install
and run the latest local LLMs

✅ [**Qdrant**](https://qdrant.tech/) - Open-source, high performance vector
store with an comprehensive API

✅ [**PostgreSQL**](https://www.postgresql.org/) -  Workhorse of the Data
Engineering world, handles large amounts of data safely.

### What you can build

⭐️ **AI Agents** for scheduling appointments

⭐️ **Summarize Company PDFs** securely without data leaks

⭐️ **Smarter Slack Bots** for enhanced company communications and IT operations

⭐️ **Private Financial Document Analysis** at minimal cost

## Installation

### Cloning the Repository

```bash
git clone https://github.com/n8n-io/self-hosted-ai-starter-kit.git
cd self-hosted-ai-starter-kit
cp .env.example .env # you should update secrets and passwords inside
```

### Running n8n using Docker Compose

#### For Nvidia GPU users

```bash
git clone https://github.com/n8n-io/self-hosted-ai-starter-kit.git
cd self-hosted-ai-starter-kit
cp .env.example .env # you should update secrets and passwords inside
docker compose --profile gpu-nvidia up
```

> [!NOTE]
> If you have not used your Nvidia GPU with Docker before, please follow the
> [Ollama Docker instructions](https://docs.ollama.com/docker).

### For AMD GPU users on Linux

```bash
git clone https://github.com/n8n-io/self-hosted-ai-starter-kit.git
cd self-hosted-ai-starter-kit
cp .env.example .env # you should update secrets and passwords inside
docker compose --profile gpu-amd up
```

#### For Mac / Apple Silicon users

If you’re using a Mac with an M1 or newer processor, you can't expose your GPU
to the Docker instance, unfortunately. There are two options in this case:

1. Run the starter kit fully on CPU, like in the section "For everyone else"
   below
2. Run Ollama on your Mac for faster inference, and connect to that from the
   n8n instance

If you want to run Ollama on your mac, check the
[Ollama homepage](https://ollama.com/)
for installation instructions, and run the starter kit as follows:

```bash
git clone https://github.com/n8n-io/self-hosted-ai-starter-kit.git
cd self-hosted-ai-starter-kit
cp .env.example .env # you should update secrets and passwords inside
docker compose up
```

##### For Mac users running OLLAMA locally

If you're running OLLAMA locally on your Mac (not in Docker), you need to modify the OLLAMA_HOST environment variable

1. Set OLLAMA_HOST to `host.docker.internal:11434` in your .env file. 
2. Additionally, after you see "Editor is now accessible via: <http://localhost:5678/>":

    1. Head to <http://localhost:5678/home/credentials>
    2. Click on "Local Ollama service"
    3. Change the base URL to "http://host.docker.internal:11434/"

#### For everyone else

```bash
git clone https://github.com/n8n-io/self-hosted-ai-starter-kit.git
cd self-hosted-ai-starter-kit
cp .env.example .env # you should update secrets and passwords inside
docker compose --profile cpu up
```

## ⚡️ Quick start and usage

The core of the Self-hosted AI Starter Kit is a Docker Compose file, pre-configured with network and storage settings, minimizing the need for additional installations.
After completing the installation steps above, simply follow the steps below to get started.

1. Open <http://localhost:5678/> in your browser to set up n8n. You’ll only
   have to do this once.
2. Open the included workflow:
   <http://localhost:5678/workflow/srOnR8PAY3u4RSwb>
3. Click the **Chat** button at the bottom of the canvas, to start running the workflow.
4. If this is the first time you’re running the workflow, you may need to wait
   until Ollama finishes downloading Llama3.2. You can inspect the docker
   console logs to check on the progress.

To open n8n at any time, visit <http://localhost:5678/> in your browser.

With your n8n instance, you’ll have access to over 400 integrations and a
suite of basic and advanced AI nodes such as
[AI Agent](https://docs.n8n.io/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.agent/),
[Text classifier](https://docs.n8n.io/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.text-classifier/),
and [Information Extractor](https://docs.n8n.io/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.information-extractor/)
nodes. To keep everything local, just remember to use the Ollama node for your
language model and Qdrant as your vector store.

> [!NOTE]
> This starter kit is designed to help you get started with self-hosted AI
> workflows. While it’s not fully optimized for production environments, it
> combines robust components that work well together for proof-of-concept
> projects. You can customize it to meet your specific needs

## Upgrading

* ### For Nvidia GPU setups:

```bash
docker compose --profile gpu-nvidia pull
docker compose create && docker compose --profile gpu-nvidia up
```

* ### For Mac / Apple Silicon users

```bash
docker compose pull
docker compose create && docker compose up
```

* ### For Non-GPU setups:

```bash
docker compose --profile cpu pull
docker compose create && docker compose --profile cpu up
```

## 👓 Recommended reading

n8n is full of useful content for getting started quickly with its AI concepts
and nodes. If you run into an issue, go to [support](#support).

- [AI agents for developers: from theory to practice with n8n](https://blog.n8n.io/ai-agents/)
- [Tutorial: Build an AI workflow in n8n](https://docs.n8n.io/advanced-ai/intro-tutorial/)
- [Langchain Concepts in n8n](https://docs.n8n.io/advanced-ai/langchain/langchain-n8n/)
- [Demonstration of key differences between agents and chains](https://docs.n8n.io/advanced-ai/examples/agent-chain-comparison/)
- [What are vector databases?](https://docs.n8n.io/advanced-ai/examples/understand-vector-databases/)

## 🎥 Video walkthrough

- [Installing and using Local AI for n8n](https://www.youtube.com/watch?v=xz_X2N-hPg0)

## 🛍️ More AI templates

For more AI workflow ideas, visit the [**official n8n AI template
gallery**](https://n8n.io/workflows/categories/ai/). From each workflow,
select the **Use workflow** button to automatically import the workflow into
your local n8n instance.

### Learn AI key concepts

- [AI Agent Chat](https://n8n.io/workflows/1954-ai-agent-chat/)
- [AI chat with any data source (using the n8n workflow too)](https://n8n.io/workflows/2026-ai-chat-with-any-data-source-using-the-n8n-workflow-tool/)
- [Chat with OpenAI Assistant (by adding a memory)](https://n8n.io/workflows/2098-chat-with-openai-assistant-by-adding-a-memory/)
- [Use an open-source LLM (via Hugging Face)](https://n8n.io/workflows/1980-use-an-open-source-llm-via-huggingface/)
- [Chat with PDF docs using AI (quoting sources)](https://n8n.io/workflows/2165-chat-with-pdf-docs-using-ai-quoting-sources/)
- [AI agent that can scrape webpages](https://n8n.io/workflows/2006-ai-agent-that-can-scrape-webpages/)

### Local AI templates

- [Tax Code Assistant](https://n8n.io/workflows/2341-build-a-tax-code-assistant-with-qdrant-mistralai-and-openai/)
- [Breakdown Documents into Study Notes with MistralAI and Qdrant](https://n8n.io/workflows/2339-breakdown-documents-into-study-notes-using-templating-mistralai-and-qdrant/)
- [Financial Documents Assistant using Qdrant and](https://n8n.io/workflows/2335-build-a-financial-documents-assistant-using-qdrant-and-mistralai/) [Mistral.ai](http://mistral.ai/)
- [Recipe Recommendations with Qdrant and Mistral](https://n8n.io/workflows/2333-recipe-recommendations-with-qdrant-and-mistral/)

## Tips & tricks

### Accessing local files

The self-hosted AI starter kit will create a shared folder (by default,
located in the same directory) which is mounted to the n8n container and
allows n8n to access files on disk. This folder within the n8n container is
located at `/data/shared` -- this is the path you’ll need to use in nodes that
interact with the local filesystem.

**Nodes that interact with the local filesystem**

- [Read/Write Files from Disk](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.filesreadwrite/)
- [Local File Trigger](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.localfiletrigger/)
- [Execute Command](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.executecommand/)

## 📜 License

This project is licensed under the Apache License 2.0 - see the
[LICENSE](LICENSE) file for details.

## 💬 Support

Join the conversation in the [n8n Forum](https://community.n8n.io/), where you
can:

- **Share Your Work**: Show off what you’ve built with n8n and inspire others
  in the community.
- **Ask Questions**: Whether you’re just getting started or you’re a seasoned
  pro, the community and our team are ready to support with any challenges.
- **Propose Ideas**: Have an idea for a feature or improvement? Let us know!
  We’re always eager to hear what you’d like to see next.
历史前置条件说明(补充参考)

需要自己的 n8n 与 Ollama 运行环境。JSON 引用 Local Ollama service 凭据及 llama3.2:latest 模型,导入后需核对模型地址和凭据;官方套件支持多种硬件路径,本站未验证兼容性或实际响应。