first commit
Security: Sync from Public / sync-from-public (push) Has been cancelled
Test: Benchmark Nightly / build (push) Has been cancelled
Test: Benchmark Nightly / Notify Cats on failure (push) Has been cancelled
CI: Python / Checks (push) Has been cancelled
Test: Evals Python / Workflow Comparison Python (push) Has been cancelled
Util: Check Docs URLs / check-docs-urls (push) Has been cancelled
Test: Visual Storybook / Cloudflare Pages (push) Has been cancelled
Test: E2E Performance / build-and-test-performance (push) Has been cancelled
Test: Workflows Nightly / Run Workflow Tests (push) Has been cancelled
Util: Cleanup CI Docker Images / Delete stale CI images (push) Has been cancelled
Test: Benchmark Destroy Env / build (push) Has been cancelled
Util: Update Node Popularity / update-popularity (push) Has been cancelled
Test: E2E Coverage Weekly / Coverage Tests (push) Has been cancelled
Security: Sync from Public / sync-from-public (push) Has been cancelled
Test: Benchmark Nightly / build (push) Has been cancelled
Test: Benchmark Nightly / Notify Cats on failure (push) Has been cancelled
CI: Python / Checks (push) Has been cancelled
Test: Evals Python / Workflow Comparison Python (push) Has been cancelled
Util: Check Docs URLs / check-docs-urls (push) Has been cancelled
Test: Visual Storybook / Cloudflare Pages (push) Has been cancelled
Test: E2E Performance / build-and-test-performance (push) Has been cancelled
Test: Workflows Nightly / Run Workflow Tests (push) Has been cancelled
Util: Cleanup CI Docker Images / Delete stale CI images (push) Has been cancelled
Test: Benchmark Destroy Env / build (push) Has been cancelled
Util: Update Node Popularity / update-popularity (push) Has been cancelled
Test: E2E Coverage Weekly / Coverage Tests (push) Has been cancelled
This commit is contained in:
@@ -0,0 +1,78 @@
|
||||
import type { INodeTypeBaseDescription, IVersionedNodeType } from 'n8n-workflow';
|
||||
import { VersionedNodeType } from 'n8n-workflow';
|
||||
|
||||
import { AgentV1 } from './V1/AgentV1.node';
|
||||
import { AgentV2 } from './V2/AgentV2.node';
|
||||
import { AgentV3 } from './V3/AgentV3.node';
|
||||
|
||||
export class Agent extends VersionedNodeType {
|
||||
constructor() {
|
||||
const baseDescription: INodeTypeBaseDescription = {
|
||||
displayName: 'AI Agent',
|
||||
name: 'agent',
|
||||
icon: 'fa:robot',
|
||||
iconColor: 'black',
|
||||
group: ['transform'],
|
||||
description: 'Generates an action plan and executes it. Can use external tools.',
|
||||
codex: {
|
||||
alias: ['LangChain', 'Chat', 'Conversational', 'Plan and Execute', 'ReAct', 'Tools'],
|
||||
categories: ['AI'],
|
||||
subcategories: {
|
||||
AI: ['Agents', 'Root Nodes'],
|
||||
},
|
||||
resources: {
|
||||
primaryDocumentation: [
|
||||
{
|
||||
url: 'https://docs.n8n.io/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.agent/',
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
defaultVersion: 3.1,
|
||||
builderHint: {
|
||||
relatedNodes: [
|
||||
{
|
||||
nodeType: 'n8n-nodes-base.aggregate',
|
||||
relationHint: 'Use to combine multiple items together before the agent',
|
||||
},
|
||||
{
|
||||
nodeType: '@n8n/n8n-nodes-langchain.outputParserStructured',
|
||||
relationHint:
|
||||
'Attach for structured output; reference fields as $json.output.fieldName for use in subsequent nodes (conditions, storing data)',
|
||||
},
|
||||
{
|
||||
nodeType: '@n8n/n8n-nodes-langchain.agentTool',
|
||||
relationHint: 'For multi-agent systems using orchestrator pattern',
|
||||
},
|
||||
{
|
||||
nodeType: '@n8n/n8n-nodes-langchain.memoryBufferWindow',
|
||||
relationHint:
|
||||
'Required for conversational workflows - connect memory to every agent that needs to recall previous messages in the conversation',
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
|
||||
const nodeVersions: IVersionedNodeType['nodeVersions'] = {
|
||||
1: new AgentV1(baseDescription),
|
||||
1.1: new AgentV1(baseDescription),
|
||||
1.2: new AgentV1(baseDescription),
|
||||
1.3: new AgentV1(baseDescription),
|
||||
1.4: new AgentV1(baseDescription),
|
||||
1.5: new AgentV1(baseDescription),
|
||||
1.6: new AgentV1(baseDescription),
|
||||
1.7: new AgentV1(baseDescription),
|
||||
1.8: new AgentV1(baseDescription),
|
||||
1.9: new AgentV1(baseDescription),
|
||||
2: new AgentV2(baseDescription),
|
||||
2.1: new AgentV2(baseDescription),
|
||||
2.2: new AgentV2(baseDescription),
|
||||
2.3: new AgentV2(baseDescription),
|
||||
3: new AgentV3(baseDescription),
|
||||
3.1: new AgentV3(baseDescription),
|
||||
// IMPORTANT Reminder to update AgentTool
|
||||
};
|
||||
|
||||
super(nodeVersions, baseDescription);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user