FM
FlowMarket
AI Agents Intermediate ⚡ 10 n8n Nodes

Custom LangChain agent written in JavaScript

This workflow has multiple functionalities. It starts with a manual trigger, "When clicking 'Execute Workflow'", that activates two separate paths. The first...

🔌 Nodes & Integrations Used (3)

Lm Chat Open Ai Agent Tool Code

📖 Implementation & Setup Guide

This workflow has multiple functionalities. It starts with a manual trigger, "When clicking 'Execute Workflow'", that activates two separate paths.

The first path takes a preset string "Tell me a joke" and processes it through a custom Language Learning Model (LLM) chain node. This node interacts with an OpenAI node for query processing.

The second path takes another preset string "What year was Einstein born?" and passes it to an "Agent" node. This agent further interacts with a Chat OpenAI node and a custom Wikipedia node to produce the required information.

The workflow uses both built-in and custom nodes, and integrates with OpenAI for both paths. It's built for experimenting with language models, specifically in the context of conversational agents and information retrieval.

Note that to use this template, you need to be on n8n version 1.19.4 or later.

⚡ How to import this workflow into n8n:

  1. Click the Direct Download JSON button above to save Custom LangChain agent written in JavaScript.json.
  2. Log in to your n8n Cloud or self-hosted n8n instance.
  3. In your workflow canvas, click the menu in top-right and select Import from File (or paste the JSON directly).
  4. Configure your credentials (e.g. API keys, database URLs) in the corresponding node settings.
  5. Click Execute Workflow to test and switch to Active!

Related AI Agents Workflows

View All in AI Agents →