n8n-nodes-ai-agent-raevon 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (269) hide show
  1. package/dist/index.d.ts +2 -0
  2. package/dist/index.d.ts.map +1 -0
  3. package/dist/index.js +5 -0
  4. package/dist/index.js.map +1 -0
  5. package/dist/nodes/agents/Agent/Agent.node.d.ts +5 -0
  6. package/dist/nodes/agents/Agent/Agent.node.d.ts.map +1 -0
  7. package/dist/nodes/agents/Agent/Agent.node.js +55 -0
  8. package/dist/nodes/agents/Agent/Agent.node.js.map +1 -0
  9. package/dist/nodes/agents/Agent/AgentTool.node.d.ts +5 -0
  10. package/dist/nodes/agents/Agent/AgentTool.node.d.ts.map +1 -0
  11. package/dist/nodes/agents/Agent/AgentTool.node.js +34 -0
  12. package/dist/nodes/agents/Agent/AgentTool.node.js.map +1 -0
  13. package/dist/nodes/agents/Agent/V1/AgentV1.node.d.ts +7 -0
  14. package/dist/nodes/agents/Agent/V1/AgentV1.node.d.ts.map +1 -0
  15. package/dist/nodes/agents/Agent/V1/AgentV1.node.js +385 -0
  16. package/dist/nodes/agents/Agent/V1/AgentV1.node.js.map +1 -0
  17. package/dist/nodes/agents/Agent/V2/AgentToolV2.node.d.ts +7 -0
  18. package/dist/nodes/agents/Agent/V2/AgentToolV2.node.d.ts.map +1 -0
  19. package/dist/nodes/agents/Agent/V2/AgentToolV2.node.js +78 -0
  20. package/dist/nodes/agents/Agent/V2/AgentToolV2.node.js.map +1 -0
  21. package/dist/nodes/agents/Agent/V2/AgentV2.node.d.ts +7 -0
  22. package/dist/nodes/agents/Agent/V2/AgentV2.node.d.ts.map +1 -0
  23. package/dist/nodes/agents/Agent/V2/AgentV2.node.js +116 -0
  24. package/dist/nodes/agents/Agent/V2/AgentV2.node.js.map +1 -0
  25. package/dist/nodes/agents/Agent/V2/utils.d.ts +3 -0
  26. package/dist/nodes/agents/Agent/V2/utils.d.ts.map +1 -0
  27. package/dist/nodes/agents/Agent/V2/utils.js +70 -0
  28. package/dist/nodes/agents/Agent/V2/utils.js.map +1 -0
  29. package/dist/nodes/agents/Agent/V3/AgentToolV3.node.d.ts +8 -0
  30. package/dist/nodes/agents/Agent/V3/AgentToolV3.node.d.ts.map +1 -0
  31. package/dist/nodes/agents/Agent/V3/AgentToolV3.node.js +73 -0
  32. package/dist/nodes/agents/Agent/V3/AgentToolV3.node.js.map +1 -0
  33. package/dist/nodes/agents/Agent/V3/AgentV3.node.d.ts +8 -0
  34. package/dist/nodes/agents/Agent/V3/AgentV3.node.d.ts.map +1 -0
  35. package/dist/nodes/agents/Agent/V3/AgentV3.node.js +118 -0
  36. package/dist/nodes/agents/Agent/V3/AgentV3.node.js.map +1 -0
  37. package/dist/nodes/agents/Agent/agents/ConversationalAgent/description.d.ts +3 -0
  38. package/dist/nodes/agents/Agent/agents/ConversationalAgent/description.d.ts.map +1 -0
  39. package/dist/nodes/agents/Agent/agents/ConversationalAgent/description.js +90 -0
  40. package/dist/nodes/agents/Agent/agents/ConversationalAgent/description.js.map +1 -0
  41. package/dist/nodes/agents/Agent/agents/ConversationalAgent/execute.d.ts +3 -0
  42. package/dist/nodes/agents/Agent/agents/ConversationalAgent/execute.d.ts.map +1 -0
  43. package/dist/nodes/agents/Agent/agents/ConversationalAgent/execute.js +89 -0
  44. package/dist/nodes/agents/Agent/agents/ConversationalAgent/execute.js.map +1 -0
  45. package/dist/nodes/agents/Agent/agents/ConversationalAgent/prompt.d.ts +3 -0
  46. package/dist/nodes/agents/Agent/agents/ConversationalAgent/prompt.d.ts.map +1 -0
  47. package/dist/nodes/agents/Agent/agents/ConversationalAgent/prompt.js +24 -0
  48. package/dist/nodes/agents/Agent/agents/ConversationalAgent/prompt.js.map +1 -0
  49. package/dist/nodes/agents/Agent/agents/OpenAiFunctionsAgent/description.d.ts +3 -0
  50. package/dist/nodes/agents/Agent/agents/OpenAiFunctionsAgent/description.d.ts.map +1 -0
  51. package/dist/nodes/agents/Agent/agents/OpenAiFunctionsAgent/description.js +82 -0
  52. package/dist/nodes/agents/Agent/agents/OpenAiFunctionsAgent/description.js.map +1 -0
  53. package/dist/nodes/agents/Agent/agents/OpenAiFunctionsAgent/execute.d.ts +3 -0
  54. package/dist/nodes/agents/Agent/agents/OpenAiFunctionsAgent/execute.d.ts.map +1 -0
  55. package/dist/nodes/agents/Agent/agents/OpenAiFunctionsAgent/execute.js +8 -0
  56. package/dist/nodes/agents/Agent/agents/OpenAiFunctionsAgent/execute.js.map +1 -0
  57. package/dist/nodes/agents/Agent/agents/OpenAiFunctionsAgent/prompt.d.ts +2 -0
  58. package/dist/nodes/agents/Agent/agents/OpenAiFunctionsAgent/prompt.d.ts.map +1 -0
  59. package/dist/nodes/agents/Agent/agents/OpenAiFunctionsAgent/prompt.js +5 -0
  60. package/dist/nodes/agents/Agent/agents/OpenAiFunctionsAgent/prompt.js.map +1 -0
  61. package/dist/nodes/agents/Agent/agents/PlanAndExecuteAgent/description.d.ts +3 -0
  62. package/dist/nodes/agents/Agent/agents/PlanAndExecuteAgent/description.d.ts.map +1 -0
  63. package/dist/nodes/agents/Agent/agents/PlanAndExecuteAgent/description.js +68 -0
  64. package/dist/nodes/agents/Agent/agents/PlanAndExecuteAgent/description.js.map +1 -0
  65. package/dist/nodes/agents/Agent/agents/PlanAndExecuteAgent/execute.d.ts +3 -0
  66. package/dist/nodes/agents/Agent/agents/PlanAndExecuteAgent/execute.d.ts.map +1 -0
  67. package/dist/nodes/agents/Agent/agents/PlanAndExecuteAgent/execute.js +79 -0
  68. package/dist/nodes/agents/Agent/agents/PlanAndExecuteAgent/execute.js.map +1 -0
  69. package/dist/nodes/agents/Agent/agents/PlanAndExecuteAgent/prompt.d.ts +2 -0
  70. package/dist/nodes/agents/Agent/agents/PlanAndExecuteAgent/prompt.d.ts.map +1 -0
  71. package/dist/nodes/agents/Agent/agents/PlanAndExecuteAgent/prompt.js +11 -0
  72. package/dist/nodes/agents/Agent/agents/PlanAndExecuteAgent/prompt.js.map +1 -0
  73. package/dist/nodes/agents/Agent/agents/ReActAgent/description.d.ts +3 -0
  74. package/dist/nodes/agents/Agent/agents/ReActAgent/description.d.ts.map +1 -0
  75. package/dist/nodes/agents/Agent/agents/ReActAgent/description.js +106 -0
  76. package/dist/nodes/agents/Agent/agents/ReActAgent/description.js.map +1 -0
  77. package/dist/nodes/agents/Agent/agents/ReActAgent/execute.d.ts +3 -0
  78. package/dist/nodes/agents/Agent/agents/ReActAgent/execute.d.ts.map +1 -0
  79. package/dist/nodes/agents/Agent/agents/ReActAgent/execute.js +95 -0
  80. package/dist/nodes/agents/Agent/agents/ReActAgent/execute.js.map +1 -0
  81. package/dist/nodes/agents/Agent/agents/ReActAgent/prompt.d.ts +5 -0
  82. package/dist/nodes/agents/Agent/agents/ReActAgent/prompt.d.ts.map +1 -0
  83. package/dist/nodes/agents/Agent/agents/ReActAgent/prompt.js +11 -0
  84. package/dist/nodes/agents/Agent/agents/ReActAgent/prompt.js.map +1 -0
  85. package/dist/nodes/agents/Agent/agents/SqlAgent/description.d.ts +3 -0
  86. package/dist/nodes/agents/Agent/agents/SqlAgent/description.d.ts.map +1 -0
  87. package/dist/nodes/agents/Agent/agents/SqlAgent/description.js +199 -0
  88. package/dist/nodes/agents/Agent/agents/SqlAgent/description.js.map +1 -0
  89. package/dist/nodes/agents/Agent/agents/SqlAgent/execute.d.ts +4 -0
  90. package/dist/nodes/agents/Agent/agents/SqlAgent/execute.d.ts.map +1 -0
  91. package/dist/nodes/agents/Agent/agents/SqlAgent/execute.js +154 -0
  92. package/dist/nodes/agents/Agent/agents/SqlAgent/execute.js.map +1 -0
  93. package/dist/nodes/agents/Agent/agents/SqlAgent/other/handlers/mysql.d.ts +4 -0
  94. package/dist/nodes/agents/Agent/agents/SqlAgent/other/handlers/mysql.d.ts.map +1 -0
  95. package/dist/nodes/agents/Agent/agents/SqlAgent/other/handlers/mysql.js +20 -0
  96. package/dist/nodes/agents/Agent/agents/SqlAgent/other/handlers/mysql.js.map +1 -0
  97. package/dist/nodes/agents/Agent/agents/SqlAgent/other/handlers/postgres.d.ts +4 -0
  98. package/dist/nodes/agents/Agent/agents/SqlAgent/other/handlers/postgres.d.ts.map +1 -0
  99. package/dist/nodes/agents/Agent/agents/SqlAgent/other/handlers/postgres.js +21 -0
  100. package/dist/nodes/agents/Agent/agents/SqlAgent/other/handlers/postgres.js.map +1 -0
  101. package/dist/nodes/agents/Agent/agents/SqlAgent/other/handlers/sqlite.d.ts +4 -0
  102. package/dist/nodes/agents/Agent/agents/SqlAgent/other/handlers/sqlite.d.ts.map +1 -0
  103. package/dist/nodes/agents/Agent/agents/SqlAgent/other/handlers/sqlite.js +72 -0
  104. package/dist/nodes/agents/Agent/agents/SqlAgent/other/handlers/sqlite.js.map +1 -0
  105. package/dist/nodes/agents/Agent/agents/SqlAgent/other/prompts.d.ts +3 -0
  106. package/dist/nodes/agents/Agent/agents/SqlAgent/other/prompts.d.ts.map +1 -0
  107. package/dist/nodes/agents/Agent/agents/SqlAgent/other/prompts.js +23 -0
  108. package/dist/nodes/agents/Agent/agents/SqlAgent/other/prompts.js.map +1 -0
  109. package/dist/nodes/agents/Agent/agents/ToolsAgent/V1/description.d.ts +3 -0
  110. package/dist/nodes/agents/Agent/agents/ToolsAgent/V1/description.d.ts.map +1 -0
  111. package/dist/nodes/agents/Agent/agents/ToolsAgent/V1/description.js +20 -0
  112. package/dist/nodes/agents/Agent/agents/ToolsAgent/V1/description.js.map +1 -0
  113. package/dist/nodes/agents/Agent/agents/ToolsAgent/V1/execute.d.ts +3 -0
  114. package/dist/nodes/agents/Agent/agents/ToolsAgent/V1/execute.d.ts.map +1 -0
  115. package/dist/nodes/agents/Agent/agents/ToolsAgent/V1/execute.js +93 -0
  116. package/dist/nodes/agents/Agent/agents/ToolsAgent/V1/execute.js.map +1 -0
  117. package/dist/nodes/agents/Agent/agents/ToolsAgent/V2/description.d.ts +5 -0
  118. package/dist/nodes/agents/Agent/agents/ToolsAgent/V2/description.d.ts.map +1 -0
  119. package/dist/nodes/agents/Agent/agents/ToolsAgent/V2/description.js +46 -0
  120. package/dist/nodes/agents/Agent/agents/ToolsAgent/V2/description.js.map +1 -0
  121. package/dist/nodes/agents/Agent/agents/ToolsAgent/V2/execute.d.ts +13 -0
  122. package/dist/nodes/agents/Agent/agents/ToolsAgent/V2/execute.d.ts.map +1 -0
  123. package/dist/nodes/agents/Agent/agents/ToolsAgent/V2/execute.js +301 -0
  124. package/dist/nodes/agents/Agent/agents/ToolsAgent/V2/execute.js.map +1 -0
  125. package/dist/nodes/agents/Agent/agents/ToolsAgent/V3/description.d.ts +3 -0
  126. package/dist/nodes/agents/Agent/agents/ToolsAgent/V3/description.d.ts.map +1 -0
  127. package/dist/nodes/agents/Agent/agents/ToolsAgent/V3/description.js +35 -0
  128. package/dist/nodes/agents/Agent/agents/ToolsAgent/V3/description.js.map +1 -0
  129. package/dist/nodes/agents/Agent/agents/ToolsAgent/V3/execute.d.ts +4 -0
  130. package/dist/nodes/agents/Agent/agents/ToolsAgent/V3/execute.d.ts.map +1 -0
  131. package/dist/nodes/agents/Agent/agents/ToolsAgent/V3/execute.js +95 -0
  132. package/dist/nodes/agents/Agent/agents/ToolsAgent/V3/execute.js.map +1 -0
  133. package/dist/nodes/agents/Agent/agents/ToolsAgent/V3/helpers/buildExecutionContext.d.ts +14 -0
  134. package/dist/nodes/agents/Agent/agents/ToolsAgent/V3/helpers/buildExecutionContext.d.ts.map +1 -0
  135. package/dist/nodes/agents/Agent/agents/ToolsAgent/V3/helpers/buildExecutionContext.js +36 -0
  136. package/dist/nodes/agents/Agent/agents/ToolsAgent/V3/helpers/buildExecutionContext.js.map +1 -0
  137. package/dist/nodes/agents/Agent/agents/ToolsAgent/V3/helpers/checkMaxIterations.d.ts +4 -0
  138. package/dist/nodes/agents/Agent/agents/ToolsAgent/V3/helpers/checkMaxIterations.d.ts.map +1 -0
  139. package/dist/nodes/agents/Agent/agents/ToolsAgent/V3/helpers/checkMaxIterations.js +13 -0
  140. package/dist/nodes/agents/Agent/agents/ToolsAgent/V3/helpers/checkMaxIterations.js.map +1 -0
  141. package/dist/nodes/agents/Agent/agents/ToolsAgent/V3/helpers/createAgentSequence.d.ts +11 -0
  142. package/dist/nodes/agents/Agent/agents/ToolsAgent/V3/helpers/createAgentSequence.d.ts.map +1 -0
  143. package/dist/nodes/agents/Agent/agents/ToolsAgent/V3/helpers/createAgentSequence.js +37 -0
  144. package/dist/nodes/agents/Agent/agents/ToolsAgent/V3/helpers/createAgentSequence.js.map +1 -0
  145. package/dist/nodes/agents/Agent/agents/ToolsAgent/V3/helpers/executeBatch.d.ts +14 -0
  146. package/dist/nodes/agents/Agent/agents/ToolsAgent/V3/helpers/executeBatch.d.ts.map +1 -0
  147. package/dist/nodes/agents/Agent/agents/ToolsAgent/V3/helpers/executeBatch.js +73 -0
  148. package/dist/nodes/agents/Agent/agents/ToolsAgent/V3/helpers/executeBatch.js.map +1 -0
  149. package/dist/nodes/agents/Agent/agents/ToolsAgent/V3/helpers/finalizeResult.d.ts +6 -0
  150. package/dist/nodes/agents/Agent/agents/ToolsAgent/V3/helpers/finalizeResult.d.ts.map +1 -0
  151. package/dist/nodes/agents/Agent/agents/ToolsAgent/V3/helpers/finalizeResult.js +24 -0
  152. package/dist/nodes/agents/Agent/agents/ToolsAgent/V3/helpers/finalizeResult.js.map +1 -0
  153. package/dist/nodes/agents/Agent/agents/ToolsAgent/V3/helpers/index.d.ts +10 -0
  154. package/dist/nodes/agents/Agent/agents/ToolsAgent/V3/helpers/index.d.ts.map +1 -0
  155. package/dist/nodes/agents/Agent/agents/ToolsAgent/V3/helpers/index.js +18 -0
  156. package/dist/nodes/agents/Agent/agents/ToolsAgent/V3/helpers/index.js.map +1 -0
  157. package/dist/nodes/agents/Agent/agents/ToolsAgent/V3/helpers/prepareItemContext.d.ts +17 -0
  158. package/dist/nodes/agents/Agent/agents/ToolsAgent/V3/helpers/prepareItemContext.d.ts.map +1 -0
  159. package/dist/nodes/agents/Agent/agents/ToolsAgent/V3/helpers/prepareItemContext.js +42 -0
  160. package/dist/nodes/agents/Agent/agents/ToolsAgent/V3/helpers/prepareItemContext.js.map +1 -0
  161. package/dist/nodes/agents/Agent/agents/ToolsAgent/V3/helpers/runAgent.d.ts +14 -0
  162. package/dist/nodes/agents/Agent/agents/ToolsAgent/V3/helpers/runAgent.d.ts.map +1 -0
  163. package/dist/nodes/agents/Agent/agents/ToolsAgent/V3/helpers/runAgent.js +93 -0
  164. package/dist/nodes/agents/Agent/agents/ToolsAgent/V3/helpers/runAgent.js.map +1 -0
  165. package/dist/nodes/agents/Agent/agents/ToolsAgent/V3/types.d.ts +35 -0
  166. package/dist/nodes/agents/Agent/agents/ToolsAgent/V3/types.d.ts.map +1 -0
  167. package/dist/nodes/agents/Agent/agents/ToolsAgent/V3/types.js +3 -0
  168. package/dist/nodes/agents/Agent/agents/ToolsAgent/V3/types.js.map +1 -0
  169. package/dist/nodes/agents/Agent/agents/ToolsAgent/common.d.ts +29 -0
  170. package/dist/nodes/agents/Agent/agents/ToolsAgent/common.d.ts.map +1 -0
  171. package/dist/nodes/agents/Agent/agents/ToolsAgent/common.js +246 -0
  172. package/dist/nodes/agents/Agent/agents/ToolsAgent/common.js.map +1 -0
  173. package/dist/nodes/agents/Agent/agents/ToolsAgent/options.d.ts +3 -0
  174. package/dist/nodes/agents/Agent/agents/ToolsAgent/options.d.ts.map +1 -0
  175. package/dist/nodes/agents/Agent/agents/ToolsAgent/options.js +121 -0
  176. package/dist/nodes/agents/Agent/agents/ToolsAgent/options.js.map +1 -0
  177. package/dist/nodes/agents/Agent/agents/ToolsAgent/prompt.d.ts +2 -0
  178. package/dist/nodes/agents/Agent/agents/ToolsAgent/prompt.d.ts.map +1 -0
  179. package/dist/nodes/agents/Agent/agents/ToolsAgent/prompt.js +5 -0
  180. package/dist/nodes/agents/Agent/agents/ToolsAgent/prompt.js.map +1 -0
  181. package/dist/nodes/agents/Agent/agents/utils.d.ts +8 -0
  182. package/dist/nodes/agents/Agent/agents/utils.d.ts.map +1 -0
  183. package/dist/nodes/agents/Agent/agents/utils.js +27 -0
  184. package/dist/nodes/agents/Agent/agents/utils.js.map +1 -0
  185. package/dist/nodes/agents/Agent/utils.d.ts +3 -0
  186. package/dist/nodes/agents/Agent/utils.d.ts.map +1 -0
  187. package/dist/nodes/agents/Agent/utils.js +70 -0
  188. package/dist/nodes/agents/Agent/utils.js.map +1 -0
  189. package/dist/types/types.d.ts +3 -0
  190. package/dist/types/types.d.ts.map +1 -0
  191. package/dist/types/types.js +3 -0
  192. package/dist/types/types.js.map +1 -0
  193. package/dist/utils/agent-execution/buildResponseMetadata.d.ts +4 -0
  194. package/dist/utils/agent-execution/buildResponseMetadata.d.ts.map +1 -0
  195. package/dist/utils/agent-execution/buildResponseMetadata.js +13 -0
  196. package/dist/utils/agent-execution/buildResponseMetadata.js.map +1 -0
  197. package/dist/utils/agent-execution/buildSteps.d.ts +4 -0
  198. package/dist/utils/agent-execution/buildSteps.d.ts.map +1 -0
  199. package/dist/utils/agent-execution/buildSteps.js +184 -0
  200. package/dist/utils/agent-execution/buildSteps.js.map +1 -0
  201. package/dist/utils/agent-execution/createEngineRequests.d.ts +9 -0
  202. package/dist/utils/agent-execution/createEngineRequests.d.ts.map +1 -0
  203. package/dist/utils/agent-execution/createEngineRequests.js +149 -0
  204. package/dist/utils/agent-execution/createEngineRequests.js.map +1 -0
  205. package/dist/utils/agent-execution/index.d.ts +9 -0
  206. package/dist/utils/agent-execution/index.d.ts.map +1 -0
  207. package/dist/utils/agent-execution/index.js +20 -0
  208. package/dist/utils/agent-execution/index.js.map +1 -0
  209. package/dist/utils/agent-execution/memoryManagement.d.ts +11 -0
  210. package/dist/utils/agent-execution/memoryManagement.d.ts.map +1 -0
  211. package/dist/utils/agent-execution/memoryManagement.js +129 -0
  212. package/dist/utils/agent-execution/memoryManagement.js.map +1 -0
  213. package/dist/utils/agent-execution/processEventStream.d.ts +6 -0
  214. package/dist/utils/agent-execution/processEventStream.d.ts.map +1 -0
  215. package/dist/utils/agent-execution/processEventStream.js +61 -0
  216. package/dist/utils/agent-execution/processEventStream.js.map +1 -0
  217. package/dist/utils/agent-execution/processHitlResponses.d.ts +9 -0
  218. package/dist/utils/agent-execution/processHitlResponses.d.ts.map +1 -0
  219. package/dist/utils/agent-execution/processHitlResponses.js +124 -0
  220. package/dist/utils/agent-execution/processHitlResponses.js.map +1 -0
  221. package/dist/utils/agent-execution/serializeIntermediateSteps.d.ts +7 -0
  222. package/dist/utils/agent-execution/serializeIntermediateSteps.d.ts.map +1 -0
  223. package/dist/utils/agent-execution/serializeIntermediateSteps.js +32 -0
  224. package/dist/utils/agent-execution/serializeIntermediateSteps.js.map +1 -0
  225. package/dist/utils/agent-execution/types.d.ts +83 -0
  226. package/dist/utils/agent-execution/types.d.ts.map +1 -0
  227. package/dist/utils/agent-execution/types.js +30 -0
  228. package/dist/utils/agent-execution/types.js.map +1 -0
  229. package/dist/utils/ai-utilities-stub.d.ts +3 -0
  230. package/dist/utils/ai-utilities-stub.d.ts.map +1 -0
  231. package/dist/utils/ai-utilities-stub.js +44 -0
  232. package/dist/utils/ai-utilities-stub.js.map +1 -0
  233. package/dist/utils/common.d.ts +29 -0
  234. package/dist/utils/common.d.ts.map +1 -0
  235. package/dist/utils/common.js +246 -0
  236. package/dist/utils/common.js.map +1 -0
  237. package/dist/utils/descriptions.d.ts +20 -0
  238. package/dist/utils/descriptions.d.ts.map +1 -0
  239. package/dist/utils/descriptions.js +169 -0
  240. package/dist/utils/descriptions.js.map +1 -0
  241. package/dist/utils/helpers.d.ts +13 -0
  242. package/dist/utils/helpers.d.ts.map +1 -0
  243. package/dist/utils/helpers.js +124 -0
  244. package/dist/utils/helpers.js.map +1 -0
  245. package/dist/utils/highlightedData-stub.d.ts +8 -0
  246. package/dist/utils/highlightedData-stub.d.ts.map +1 -0
  247. package/dist/utils/highlightedData-stub.js +12 -0
  248. package/dist/utils/highlightedData-stub.js.map +1 -0
  249. package/dist/utils/options.d.ts +3 -0
  250. package/dist/utils/options.d.ts.map +1 -0
  251. package/dist/utils/options.js +121 -0
  252. package/dist/utils/options.js.map +1 -0
  253. package/dist/utils/output_parsers/N8nOutputParser.d.ts +4 -0
  254. package/dist/utils/output_parsers/N8nOutputParser.d.ts.map +1 -0
  255. package/dist/utils/output_parsers/N8nOutputParser.js +12 -0
  256. package/dist/utils/output_parsers/N8nOutputParser.js.map +1 -0
  257. package/dist/utils/prompt.d.ts +2 -0
  258. package/dist/utils/prompt.d.ts.map +1 -0
  259. package/dist/utils/prompt.js +5 -0
  260. package/dist/utils/prompt.js.map +1 -0
  261. package/dist/utils/schemaParsing.d.ts +7 -0
  262. package/dist/utils/schemaParsing.d.ts.map +1 -0
  263. package/dist/utils/schemaParsing.js +46 -0
  264. package/dist/utils/schemaParsing.js.map +1 -0
  265. package/dist/utils/tracing.d.ts +18 -0
  266. package/dist/utils/tracing.d.ts.map +1 -0
  267. package/dist/utils/tracing.js +75 -0
  268. package/dist/utils/tracing.js.map +1 -0
  269. package/package.json +47 -0
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ // Main entry point for the community node package
3
+ // n8n will discover nodes from the package.json n8n.nodes configuration
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA,kDAAkD;AAClD,wEAAwE"}
@@ -0,0 +1,5 @@
1
+ import { VersionedNodeType } from 'n8n-workflow';
2
+ export declare class Agent extends VersionedNodeType {
3
+ constructor();
4
+ }
5
+ //# sourceMappingURL=Agent.node.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Agent.node.d.ts","sourceRoot":"","sources":["../../../../src/nodes/agents/Agent/Agent.node.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAMjD,qBAAa,KAAM,SAAQ,iBAAiB;;CA+C3C"}
@@ -0,0 +1,55 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Agent = void 0;
4
+ const n8n_workflow_1 = require("n8n-workflow");
5
+ const AgentV1_node_1 = require("./V1/AgentV1.node");
6
+ const AgentV2_node_1 = require("./V2/AgentV2.node");
7
+ const AgentV3_node_1 = require("./V3/AgentV3.node");
8
+ class Agent extends n8n_workflow_1.VersionedNodeType {
9
+ constructor() {
10
+ const baseDescription = {
11
+ displayName: 'AI Agent',
12
+ name: 'agent',
13
+ icon: 'fa:robot',
14
+ iconColor: 'black',
15
+ group: ['transform'],
16
+ description: 'Generates an action plan and executes it. Can use external tools.',
17
+ codex: {
18
+ alias: ['LangChain', 'Chat', 'Conversational', 'Plan and Execute', 'ReAct', 'Tools'],
19
+ categories: ['AI'],
20
+ subcategories: {
21
+ AI: ['Agents', 'Root Nodes'],
22
+ },
23
+ resources: {
24
+ primaryDocumentation: [
25
+ {
26
+ url: 'https://docs.n8n.io/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.agent/',
27
+ },
28
+ ],
29
+ },
30
+ },
31
+ defaultVersion: 3.1,
32
+ };
33
+ const nodeVersions = {
34
+ 1: new AgentV1_node_1.AgentV1(baseDescription),
35
+ 1.1: new AgentV1_node_1.AgentV1(baseDescription),
36
+ 1.2: new AgentV1_node_1.AgentV1(baseDescription),
37
+ 1.3: new AgentV1_node_1.AgentV1(baseDescription),
38
+ 1.4: new AgentV1_node_1.AgentV1(baseDescription),
39
+ 1.5: new AgentV1_node_1.AgentV1(baseDescription),
40
+ 1.6: new AgentV1_node_1.AgentV1(baseDescription),
41
+ 1.7: new AgentV1_node_1.AgentV1(baseDescription),
42
+ 1.8: new AgentV1_node_1.AgentV1(baseDescription),
43
+ 1.9: new AgentV1_node_1.AgentV1(baseDescription),
44
+ 2: new AgentV2_node_1.AgentV2(baseDescription),
45
+ 2.1: new AgentV2_node_1.AgentV2(baseDescription),
46
+ 2.2: new AgentV2_node_1.AgentV2(baseDescription),
47
+ 2.3: new AgentV2_node_1.AgentV2(baseDescription),
48
+ 3: new AgentV3_node_1.AgentV3(baseDescription),
49
+ 3.1: new AgentV3_node_1.AgentV3(baseDescription),
50
+ };
51
+ super(nodeVersions, baseDescription);
52
+ }
53
+ }
54
+ exports.Agent = Agent;
55
+ //# sourceMappingURL=Agent.node.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Agent.node.js","sourceRoot":"","sources":["../../../../src/nodes/agents/Agent/Agent.node.ts"],"names":[],"mappings":";;;AACA,+CAAiD;AAEjD,oDAA4C;AAC5C,oDAA4C;AAC5C,oDAA4C;AAE5C,MAAa,KAAM,SAAQ,gCAAiB;IAC3C;QACC,MAAM,eAAe,GAA6B;YACjD,WAAW,EAAE,UAAU;YACvB,IAAI,EAAE,OAAO;YACb,IAAI,EAAE,UAAU;YAChB,SAAS,EAAE,OAAO;YAClB,KAAK,EAAE,CAAC,WAAW,CAAC;YACpB,WAAW,EAAE,mEAAmE;YAChF,KAAK,EAAE;gBACN,KAAK,EAAE,CAAC,WAAW,EAAE,MAAM,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,OAAO,EAAE,OAAO,CAAC;gBACpF,UAAU,EAAE,CAAC,IAAI,CAAC;gBAClB,aAAa,EAAE;oBACd,EAAE,EAAE,CAAC,QAAQ,EAAE,YAAY,CAAC;iBAC5B;gBACD,SAAS,EAAE;oBACV,oBAAoB,EAAE;wBACrB;4BACC,GAAG,EAAE,8FAA8F;yBACnG;qBACD;iBACD;aACD;YACD,cAAc,EAAE,GAAG;SACnB,CAAC;QAEF,MAAM,YAAY,GAAuC;YACxD,CAAC,EAAE,IAAI,sBAAO,CAAC,eAAe,CAAC;YAC/B,GAAG,EAAE,IAAI,sBAAO,CAAC,eAAe,CAAC;YACjC,GAAG,EAAE,IAAI,sBAAO,CAAC,eAAe,CAAC;YACjC,GAAG,EAAE,IAAI,sBAAO,CAAC,eAAe,CAAC;YACjC,GAAG,EAAE,IAAI,sBAAO,CAAC,eAAe,CAAC;YACjC,GAAG,EAAE,IAAI,sBAAO,CAAC,eAAe,CAAC;YACjC,GAAG,EAAE,IAAI,sBAAO,CAAC,eAAe,CAAC;YACjC,GAAG,EAAE,IAAI,sBAAO,CAAC,eAAe,CAAC;YACjC,GAAG,EAAE,IAAI,sBAAO,CAAC,eAAe,CAAC;YACjC,GAAG,EAAE,IAAI,sBAAO,CAAC,eAAe,CAAC;YACjC,CAAC,EAAE,IAAI,sBAAO,CAAC,eAAe,CAAC;YAC/B,GAAG,EAAE,IAAI,sBAAO,CAAC,eAAe,CAAC;YACjC,GAAG,EAAE,IAAI,sBAAO,CAAC,eAAe,CAAC;YACjC,GAAG,EAAE,IAAI,sBAAO,CAAC,eAAe,CAAC;YACjC,CAAC,EAAE,IAAI,sBAAO,CAAC,eAAe,CAAC;YAC/B,GAAG,EAAE,IAAI,sBAAO,CAAC,eAAe,CAAC;SACjC,CAAC;QAEF,KAAK,CAAC,YAAY,EAAE,eAAe,CAAC,CAAC;IACtC,CAAC;CACD;AA/CD,sBA+CC"}
@@ -0,0 +1,5 @@
1
+ import { VersionedNodeType } from 'n8n-workflow';
2
+ export declare class AgentTool extends VersionedNodeType {
3
+ constructor();
4
+ }
5
+ //# sourceMappingURL=AgentTool.node.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AgentTool.node.d.ts","sourceRoot":"","sources":["../../../../src/nodes/agents/Agent/AgentTool.node.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAKjD,qBAAa,SAAU,SAAQ,iBAAiB;;CA2B/C"}
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AgentTool = void 0;
4
+ const n8n_workflow_1 = require("n8n-workflow");
5
+ const AgentToolV2_node_1 = require("./V2/AgentToolV2.node");
6
+ const AgentToolV3_node_1 = require("./V3/AgentToolV3.node");
7
+ class AgentTool extends n8n_workflow_1.VersionedNodeType {
8
+ constructor() {
9
+ const baseDescription = {
10
+ displayName: 'AI Agent Tool',
11
+ name: 'agentTool',
12
+ icon: 'fa:robot',
13
+ iconColor: 'black',
14
+ group: ['transform'],
15
+ description: 'Generates an action plan and executes it. Can use external tools.',
16
+ codex: {
17
+ alias: ['LangChain', 'Chat', 'Conversational', 'Plan and Execute', 'ReAct', 'Tools'],
18
+ categories: ['AI'],
19
+ subcategories: {
20
+ AI: ['Tools'],
21
+ Tools: ['Recommended Tools'],
22
+ },
23
+ },
24
+ defaultVersion: 3,
25
+ };
26
+ const nodeVersions = {
27
+ 2.2: new AgentToolV2_node_1.AgentToolV2(baseDescription),
28
+ 3: new AgentToolV3_node_1.AgentToolV3(baseDescription),
29
+ };
30
+ super(nodeVersions, baseDescription);
31
+ }
32
+ }
33
+ exports.AgentTool = AgentTool;
34
+ //# sourceMappingURL=AgentTool.node.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AgentTool.node.js","sourceRoot":"","sources":["../../../../src/nodes/agents/Agent/AgentTool.node.ts"],"names":[],"mappings":";;;AACA,+CAAiD;AAEjD,4DAAoD;AACpD,4DAAoD;AAEpD,MAAa,SAAU,SAAQ,gCAAiB;IAC/C;QACC,MAAM,eAAe,GAA6B;YACjD,WAAW,EAAE,eAAe;YAC5B,IAAI,EAAE,WAAW;YACjB,IAAI,EAAE,UAAU;YAChB,SAAS,EAAE,OAAO;YAClB,KAAK,EAAE,CAAC,WAAW,CAAC;YACpB,WAAW,EAAE,mEAAmE;YAChF,KAAK,EAAE;gBACN,KAAK,EAAE,CAAC,WAAW,EAAE,MAAM,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,OAAO,EAAE,OAAO,CAAC;gBACpF,UAAU,EAAE,CAAC,IAAI,CAAC;gBAClB,aAAa,EAAE;oBACd,EAAE,EAAE,CAAC,OAAO,CAAC;oBACb,KAAK,EAAE,CAAC,mBAAmB,CAAC;iBAC5B;aACD;YACD,cAAc,EAAE,CAAC;SACjB,CAAC;QAEF,MAAM,YAAY,GAAuC;YACxD,GAAG,EAAE,IAAI,8BAAW,CAAC,eAAe,CAAC;YACrC,CAAC,EAAE,IAAI,8BAAW,CAAC,eAAe,CAAC;SACnC,CAAC;QAEF,KAAK,CAAC,YAAY,EAAE,eAAe,CAAC,CAAC;IACtC,CAAC;CACD;AA3BD,8BA2BC"}
@@ -0,0 +1,7 @@
1
+ import type { IExecuteFunctions, INodeExecutionData, INodeType, INodeTypeDescription, INodeTypeBaseDescription } from 'n8n-workflow';
2
+ export declare class AgentV1 implements INodeType {
3
+ description: INodeTypeDescription;
4
+ constructor(baseDescription: INodeTypeBaseDescription);
5
+ execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
6
+ }
7
+ //# sourceMappingURL=AgentV1.node.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AgentV1.node.d.ts","sourceRoot":"","sources":["../../../../../src/nodes/agents/Agent/V1/AgentV1.node.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAGX,iBAAiB,EACjB,kBAAkB,EAClB,SAAS,EACT,oBAAoB,EAGpB,wBAAwB,EACxB,MAAM,cAAc,CAAC;AA6NtB,qBAAa,OAAQ,YAAW,SAAS;IACxC,WAAW,EAAE,oBAAoB,CAAC;gBAEtB,eAAe,EAAE,wBAAwB;IAiL/C,OAAO,CAAC,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC,kBAAkB,EAAE,EAAE,CAAC;CAoBvE"}
@@ -0,0 +1,385 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AgentV1 = void 0;
4
+ const n8n_workflow_1 = require("n8n-workflow");
5
+ const descriptions_1 = require("../../../../utils/descriptions");
6
+ const description_1 = require("../agents/ConversationalAgent/description");
7
+ const execute_1 = require("../agents/ConversationalAgent/execute");
8
+ const description_2 = require("../agents/OpenAiFunctionsAgent/description");
9
+ const execute_2 = require("../agents/OpenAiFunctionsAgent/execute");
10
+ const description_3 = require("../agents/PlanAndExecuteAgent/description");
11
+ const execute_3 = require("../agents/PlanAndExecuteAgent/execute");
12
+ const description_4 = require("../agents/ReActAgent/description");
13
+ const execute_4 = require("../agents/ReActAgent/execute");
14
+ const description_5 = require("../agents/SqlAgent/description");
15
+ const execute_5 = require("../agents/SqlAgent/execute");
16
+ const description_6 = require("../agents/ToolsAgent/V1/description");
17
+ const execute_6 = require("../agents/ToolsAgent/V1/execute");
18
+ function getInputs(agent, hasOutputParser) {
19
+ const getInputData = (inputs) => {
20
+ const displayNames = {
21
+ ai_languageModel: 'Model',
22
+ ai_memory: 'Memory',
23
+ ai_tool: 'Tool',
24
+ ai_outputParser: 'Output Parser',
25
+ };
26
+ return inputs.map(({ type, filter }) => {
27
+ const isModelType = type === 'ai_languageModel';
28
+ let displayName = type in displayNames ? displayNames[type] : undefined;
29
+ if (isModelType &&
30
+ ['openAiFunctionsAgent', 'toolsAgent', 'conversationalAgent'].includes(agent)) {
31
+ displayName = 'Chat Model';
32
+ }
33
+ const input = {
34
+ type,
35
+ displayName,
36
+ required: isModelType,
37
+ maxConnections: ['ai_languageModel', 'ai_memory', 'ai_outputParser'].includes(type)
38
+ ? 1
39
+ : undefined,
40
+ };
41
+ if (filter) {
42
+ input.filter = filter;
43
+ }
44
+ return input;
45
+ });
46
+ };
47
+ let specialInputs = [];
48
+ if (agent === 'conversationalAgent') {
49
+ specialInputs = [
50
+ {
51
+ type: 'ai_languageModel',
52
+ filter: {
53
+ nodes: [
54
+ '@n8n/n8n-nodes-langchain.lmChatAnthropic',
55
+ '@n8n/n8n-nodes-langchain.lmChatAwsBedrock',
56
+ '@n8n/n8n-nodes-langchain.lmChatGroq',
57
+ '@n8n/n8n-nodes-langchain.lmChatLemonade',
58
+ '@n8n/n8n-nodes-langchain.lmChatOllama',
59
+ '@n8n/n8n-nodes-langchain.lmChatOpenAi',
60
+ '@n8n/n8n-nodes-langchain.lmChatGoogleGemini',
61
+ '@n8n/n8n-nodes-langchain.lmChatGoogleVertex',
62
+ '@n8n/n8n-nodes-langchain.lmChatMistralCloud',
63
+ '@n8n/n8n-nodes-langchain.lmChatMinimax',
64
+ '@n8n/n8n-nodes-langchain.lmChatMoonshot',
65
+ '@n8n/n8n-nodes-langchain.lmChatAzureOpenAi',
66
+ '@n8n/n8n-nodes-langchain.lmChatDeepSeek',
67
+ '@n8n/n8n-nodes-langchain.lmChatOpenRouter',
68
+ '@n8n/n8n-nodes-langchain.lmChatVercelAiGateway',
69
+ '@n8n/n8n-nodes-langchain.lmChatXAiGrok',
70
+ '@n8n/n8n-nodes-langchain.modelSelector',
71
+ ],
72
+ },
73
+ },
74
+ { type: 'ai_memory' },
75
+ { type: 'ai_tool' },
76
+ { type: 'ai_outputParser' },
77
+ ];
78
+ }
79
+ else if (agent === 'toolsAgent') {
80
+ specialInputs = [
81
+ {
82
+ type: 'ai_languageModel',
83
+ filter: {
84
+ nodes: [
85
+ '@n8n/n8n-nodes-langchain.lmChatAnthropic',
86
+ '@n8n/n8n-nodes-langchain.lmChatAzureOpenAi',
87
+ '@n8n/n8n-nodes-langchain.lmChatAwsBedrock',
88
+ '@n8n/n8n-nodes-langchain.lmChatLemonade',
89
+ '@n8n/n8n-nodes-langchain.lmChatMistralCloud',
90
+ '@n8n/n8n-nodes-langchain.lmChatMinimax',
91
+ '@n8n/n8n-nodes-langchain.lmChatMoonshot',
92
+ '@n8n/n8n-nodes-langchain.lmChatOllama',
93
+ '@n8n/n8n-nodes-langchain.lmChatOpenAi',
94
+ '@n8n/n8n-nodes-langchain.lmChatGroq',
95
+ '@n8n/n8n-nodes-langchain.lmChatGoogleVertex',
96
+ '@n8n/n8n-nodes-langchain.lmChatGoogleGemini',
97
+ '@n8n/n8n-nodes-langchain.lmChatDeepSeek',
98
+ '@n8n/n8n-nodes-langchain.lmChatOpenRouter',
99
+ '@n8n/n8n-nodes-langchain.lmChatVercelAiGateway',
100
+ '@n8n/n8n-nodes-langchain.lmChatXAiGrok',
101
+ ],
102
+ },
103
+ },
104
+ { type: 'ai_memory' },
105
+ { type: 'ai_tool', required: true },
106
+ { type: 'ai_outputParser' },
107
+ ];
108
+ }
109
+ else if (agent === 'openAiFunctionsAgent') {
110
+ specialInputs = [
111
+ {
112
+ type: 'ai_languageModel',
113
+ filter: {
114
+ nodes: [
115
+ '@n8n/n8n-nodes-langchain.lmChatOpenAi',
116
+ '@n8n/n8n-nodes-langchain.lmChatAzureOpenAi',
117
+ ],
118
+ },
119
+ },
120
+ { type: 'ai_memory' },
121
+ { type: 'ai_tool', required: true },
122
+ { type: 'ai_outputParser' },
123
+ ];
124
+ }
125
+ else if (agent === 'reActAgent') {
126
+ specialInputs = [
127
+ { type: 'ai_languageModel' },
128
+ { type: 'ai_tool' },
129
+ { type: 'ai_outputParser' },
130
+ ];
131
+ }
132
+ else if (agent === 'sqlAgent') {
133
+ specialInputs = [
134
+ { type: 'ai_languageModel' },
135
+ { type: 'ai_memory' },
136
+ ];
137
+ }
138
+ else if (agent === 'planAndExecuteAgent') {
139
+ specialInputs = [
140
+ { type: 'ai_languageModel' },
141
+ { type: 'ai_tool' },
142
+ { type: 'ai_outputParser' },
143
+ ];
144
+ }
145
+ if (hasOutputParser === false) {
146
+ specialInputs = specialInputs.filter((input) => input.type !== 'ai_outputParser');
147
+ }
148
+ return ['main', ...getInputData(specialInputs)];
149
+ }
150
+ const agentTypeProperty = {
151
+ displayName: 'Agent',
152
+ name: 'agent',
153
+ type: 'options',
154
+ noDataExpression: true,
155
+ options: [
156
+ {
157
+ name: 'Tools Agent',
158
+ value: 'toolsAgent',
159
+ description: 'Utilizes structured tool schemas for precise and reliable tool selection and execution. Recommended for complex tasks requiring accurate and consistent tool usage, but only usable with models that support tool calling.',
160
+ },
161
+ {
162
+ name: 'Conversational Agent',
163
+ value: 'conversationalAgent',
164
+ description: 'Describes tools in the system prompt and parses JSON responses for tool calls. More flexible but potentially less reliable than the Tools Agent. Suitable for simpler interactions or with models not supporting structured schemas.',
165
+ },
166
+ {
167
+ name: 'OpenAI Functions Agent',
168
+ value: 'openAiFunctionsAgent',
169
+ description: "Leverages OpenAI's function calling capabilities to precisely select and execute tools. Excellent for tasks requiring structured outputs when working with OpenAI models.",
170
+ },
171
+ {
172
+ name: 'Plan and Execute Agent',
173
+ value: 'planAndExecuteAgent',
174
+ description: 'Creates a high-level plan for complex tasks and then executes each step. Suitable for multi-stage problems or when a strategic approach is needed.',
175
+ },
176
+ {
177
+ name: 'ReAct Agent',
178
+ value: 'reActAgent',
179
+ description: 'Combines reasoning and action in an iterative process. Effective for tasks that require careful analysis and step-by-step problem-solving.',
180
+ },
181
+ {
182
+ name: 'SQL Agent',
183
+ value: 'sqlAgent',
184
+ description: 'Specializes in interacting with SQL databases. Ideal for data analysis tasks, generating queries, or extracting insights from structured data.',
185
+ },
186
+ ],
187
+ default: '',
188
+ };
189
+ class AgentV1 {
190
+ constructor(baseDescription) {
191
+ this.description = {
192
+ version: [1, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9],
193
+ ...baseDescription,
194
+ defaults: {
195
+ name: 'AI Agent',
196
+ color: '#404040',
197
+ },
198
+ inputs: `={{
199
+ ((agent, hasOutputParser) => {
200
+ ${getInputs.toString()};
201
+ return getInputs(agent, hasOutputParser)
202
+ })($parameter.agent, $parameter.hasOutputParser === undefined || $parameter.hasOutputParser === true)
203
+ }}`,
204
+ outputs: [n8n_workflow_1.NodeConnectionTypes.Main],
205
+ credentials: [
206
+ {
207
+ name: 'mySql',
208
+ required: true,
209
+ testedBy: 'mysqlConnectionTest',
210
+ displayOptions: {
211
+ show: {
212
+ agent: ['sqlAgent'],
213
+ '/dataSource': ['mysql'],
214
+ },
215
+ },
216
+ },
217
+ {
218
+ name: 'postgres',
219
+ required: true,
220
+ displayOptions: {
221
+ show: {
222
+ agent: ['sqlAgent'],
223
+ '/dataSource': ['postgres'],
224
+ },
225
+ },
226
+ },
227
+ ],
228
+ properties: [
229
+ {
230
+ displayName: 'Tip: Get a feel for agents with our quick <a href="https://docs.n8n.io/advanced-ai/intro-tutorial/" target="_blank">tutorial</a> or see an <a href="/templates/1954" target="_blank">example</a> of how this node works',
231
+ name: 'aiAgentStarterCallout',
232
+ type: 'callout',
233
+ default: '',
234
+ displayOptions: {
235
+ show: {
236
+ agent: ['conversationalAgent', 'toolsAgent'],
237
+ },
238
+ },
239
+ },
240
+ {
241
+ displayName: "This node is using Agent that has been deprecated. Please switch to using 'Tools Agent' instead.",
242
+ name: 'deprecated',
243
+ type: 'notice',
244
+ default: '',
245
+ displayOptions: {
246
+ show: {
247
+ agent: [
248
+ 'conversationalAgent',
249
+ 'openAiFunctionsAgent',
250
+ 'planAndExecuteAgent',
251
+ 'reActAgent',
252
+ 'sqlAgent',
253
+ ],
254
+ },
255
+ },
256
+ },
257
+ {
258
+ ...agentTypeProperty,
259
+ options: agentTypeProperty?.options?.filter((o) => 'value' in o && o.value !== 'toolsAgent'),
260
+ displayOptions: { show: { '@version': [{ _cnd: { lte: 1.5 } }] } },
261
+ default: 'conversationalAgent',
262
+ },
263
+ {
264
+ ...agentTypeProperty,
265
+ displayOptions: { show: { '@version': [{ _cnd: { between: { from: 1.6, to: 1.7 } } }] } },
266
+ default: 'toolsAgent',
267
+ },
268
+ {
269
+ ...agentTypeProperty,
270
+ type: 'hidden',
271
+ displayOptions: { show: { '@version': [{ _cnd: { gte: 1.8 } }] } },
272
+ default: 'toolsAgent',
273
+ },
274
+ {
275
+ ...descriptions_1.promptTypeOptionsDeprecated,
276
+ displayOptions: {
277
+ hide: {
278
+ '@version': [{ _cnd: { lte: 1.2 } }],
279
+ agent: ['sqlAgent'],
280
+ },
281
+ },
282
+ },
283
+ {
284
+ ...descriptions_1.textFromGuardrailsNode,
285
+ displayOptions: {
286
+ show: { promptType: ['guardrails'], '@version': [{ _cnd: { gte: 1.7 } }] },
287
+ },
288
+ },
289
+ {
290
+ ...descriptions_1.textFromPreviousNode,
291
+ displayOptions: {
292
+ show: { promptType: ['auto'], '@version': [{ _cnd: { gte: 1.7 } }] },
293
+ hide: {
294
+ agent: ['sqlAgent'],
295
+ },
296
+ },
297
+ },
298
+ {
299
+ ...descriptions_1.textInput,
300
+ displayOptions: {
301
+ show: {
302
+ promptType: ['define'],
303
+ },
304
+ hide: {
305
+ agent: ['sqlAgent'],
306
+ },
307
+ },
308
+ },
309
+ {
310
+ displayName: 'For more reliable structured output parsing, consider using the Tools agent',
311
+ name: 'notice',
312
+ type: 'notice',
313
+ default: '',
314
+ displayOptions: {
315
+ show: {
316
+ hasOutputParser: [true],
317
+ agent: [
318
+ 'conversationalAgent',
319
+ 'reActAgent',
320
+ 'planAndExecuteAgent',
321
+ 'openAiFunctionsAgent',
322
+ ],
323
+ },
324
+ },
325
+ },
326
+ {
327
+ displayName: 'Require Specific Output Format',
328
+ name: 'hasOutputParser',
329
+ type: 'boolean',
330
+ default: false,
331
+ noDataExpression: true,
332
+ displayOptions: {
333
+ hide: {
334
+ '@version': [{ _cnd: { lte: 1.2 } }],
335
+ agent: ['sqlAgent'],
336
+ },
337
+ },
338
+ },
339
+ {
340
+ displayName: `Connect an <a data-action='openSelectiveNodeCreator' data-action-parameter-connectiontype='${n8n_workflow_1.NodeConnectionTypes.AiOutputParser}'>output parser</a> on the canvas to specify the output format you require`,
341
+ name: 'notice',
342
+ type: 'notice',
343
+ default: '',
344
+ displayOptions: {
345
+ show: {
346
+ hasOutputParser: [true],
347
+ agent: ['toolsAgent'],
348
+ },
349
+ },
350
+ },
351
+ ...description_6.toolsAgentProperties,
352
+ ...description_1.conversationalAgentProperties,
353
+ ...description_2.openAiFunctionsAgentProperties,
354
+ ...description_4.reActAgentAgentProperties,
355
+ ...description_5.sqlAgentAgentProperties,
356
+ ...description_3.planAndExecuteAgentProperties,
357
+ ],
358
+ };
359
+ }
360
+ async execute() {
361
+ const agentType = this.getNodeParameter('agent', 0, '');
362
+ const nodeVersion = this.getNode().typeVersion;
363
+ if (agentType === 'conversationalAgent') {
364
+ return await execute_1.conversationalAgentExecute.call(this, nodeVersion);
365
+ }
366
+ else if (agentType === 'toolsAgent') {
367
+ return await execute_6.toolsAgentExecute.call(this);
368
+ }
369
+ else if (agentType === 'openAiFunctionsAgent') {
370
+ return await execute_2.openAiFunctionsAgentExecute.call(this, nodeVersion);
371
+ }
372
+ else if (agentType === 'reActAgent') {
373
+ return await execute_4.reActAgentAgentExecute.call(this, nodeVersion);
374
+ }
375
+ else if (agentType === 'sqlAgent') {
376
+ return await execute_5.sqlAgentAgentExecute.call(this);
377
+ }
378
+ else if (agentType === 'planAndExecuteAgent') {
379
+ return await execute_3.planAndExecuteAgentExecute.call(this, nodeVersion);
380
+ }
381
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), `The agent type "${agentType}" is not supported`);
382
+ }
383
+ }
384
+ exports.AgentV1 = AgentV1;
385
+ //# sourceMappingURL=AgentV1.node.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AgentV1.node.js","sourceRoot":"","sources":["../../../../../src/nodes/agents/Agent/V1/AgentV1.node.ts"],"names":[],"mappings":";;;AAAA,+CAAuE;AAavE,iEAKwC;AAExC,2EAA0F;AAC1F,mEAAmF;AACnF,4EAA4F;AAC5F,oEAAqF;AACrF,2EAA0F;AAC1F,mEAAmF;AACnF,kEAA6E;AAC7E,0DAAsE;AACtE,gEAAyE;AACzE,wDAAkE;AAClE,qEAA2E;AAC3E,6DAAoE;AAEpE,SAAS,SAAS,CACjB,KAMa,EACb,eAAyB;IAQzB,MAAM,YAAY,GAAG,CACpB,MAAsB,EACgC,EAAE;QACxD,MAAM,YAAY,GAA8B;YAC/C,gBAAgB,EAAE,OAAO;YACzB,SAAS,EAAE,QAAQ;YACnB,OAAO,EAAE,MAAM;YACf,eAAe,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,IAAI,CAAC,CAAC;QAC9C,CAAC;aAAM,IAAI,SAAS,KAAK,qBAAqB,EAAE,CAAC;YAChD,OAAO,MAAM,oCAA0B,CAAC,IAAI,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;QACjE,CAAC;QAED,MAAM,IAAI,iCAAkB,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,mBAAmB,SAAS,oBAAoB,CAAC,CAAC;IAChG,CAAC;CACD;AAxMD,0BAwMC"}
@@ -0,0 +1,7 @@
1
+ import type { IExecuteFunctions, INodeExecutionData, INodeType, INodeTypeDescription, INodeTypeBaseDescription, ISupplyDataFunctions } from 'n8n-workflow';
2
+ export declare class AgentToolV2 implements INodeType {
3
+ description: INodeTypeDescription;
4
+ constructor(baseDescription: INodeTypeBaseDescription);
5
+ execute(this: IExecuteFunctions | ISupplyDataFunctions): Promise<INodeExecutionData[][]>;
6
+ }
7
+ //# sourceMappingURL=AgentToolV2.node.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AgentToolV2.node.d.ts","sourceRoot":"","sources":["../../../../../src/nodes/agents/Agent/V2/AgentToolV2.node.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACX,iBAAiB,EACjB,kBAAkB,EAClB,SAAS,EACT,oBAAoB,EACpB,wBAAwB,EACxB,oBAAoB,EACpB,MAAM,cAAc,CAAC;AAQtB,qBAAa,WAAY,YAAW,SAAS;IAC5C,WAAW,EAAE,oBAAoB,CAAC;gBACtB,eAAe,EAAE,wBAAwB;IAiE/C,OAAO,CAAC,IAAI,EAAE,iBAAiB,GAAG,oBAAoB,GAAG,OAAO,CAAC,kBAAkB,EAAE,EAAE,CAAC;CAG9F"}
@@ -0,0 +1,78 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AgentToolV2 = void 0;
4
+ const n8n_workflow_1 = require("n8n-workflow");
5
+ const descriptions_1 = require("../../../../utils/descriptions");
6
+ const utils_1 = require("./utils");
7
+ const description_1 = require("../agents/ToolsAgent/V2/description");
8
+ const execute_1 = require("../agents/ToolsAgent/V2/execute");
9
+ class AgentToolV2 {
10
+ constructor(baseDescription) {
11
+ this.description = {
12
+ ...baseDescription,
13
+ version: [2.2],
14
+ defaults: {
15
+ name: 'AI Agent Tool',
16
+ color: '#404040',
17
+ },
18
+ inputs: `={{
19
+ ((hasOutputParser, needsFallback) => {
20
+ ${utils_1.getInputs.toString()};
21
+ return getInputs(false, hasOutputParser, needsFallback)
22
+ })($parameter.hasOutputParser === undefined || $parameter.hasOutputParser === true, $parameter.needsFallback !== undefined && $parameter.needsFallback === true)
23
+ }}`,
24
+ outputs: [n8n_workflow_1.NodeConnectionTypes.AiTool],
25
+ properties: [
26
+ descriptions_1.toolDescription,
27
+ { ...descriptions_1.textInput },
28
+ {
29
+ displayName: 'Require Specific Output Format',
30
+ name: 'hasOutputParser',
31
+ type: 'boolean',
32
+ default: false,
33
+ noDataExpression: true,
34
+ },
35
+ {
36
+ displayName: `Connect an <a data-action='openSelectiveNodeCreator' data-action-parameter-connectiontype='${n8n_workflow_1.NodeConnectionTypes.AiOutputParser}'>output parser</a> on the canvas to specify the output format you require`,
37
+ name: 'notice',
38
+ type: 'notice',
39
+ default: '',
40
+ displayOptions: {
41
+ show: {
42
+ hasOutputParser: [true],
43
+ },
44
+ },
45
+ },
46
+ {
47
+ displayName: 'Enable Fallback Model',
48
+ name: 'needsFallback',
49
+ type: 'boolean',
50
+ default: false,
51
+ noDataExpression: true,
52
+ displayOptions: {
53
+ show: {
54
+ '@version': [{ _cnd: { gte: 2.1 } }],
55
+ },
56
+ },
57
+ },
58
+ {
59
+ displayName: 'Connect an additional language model on the canvas to use it as a fallback if the main model fails',
60
+ name: 'fallbackNotice',
61
+ type: 'notice',
62
+ default: '',
63
+ displayOptions: {
64
+ show: {
65
+ needsFallback: [true],
66
+ },
67
+ },
68
+ },
69
+ ...(0, description_1.getToolsAgentProperties)({ withStreaming: false }),
70
+ ],
71
+ };
72
+ }
73
+ async execute() {
74
+ return await execute_1.toolsAgentExecute.call(this);
75
+ }
76
+ }
77
+ exports.AgentToolV2 = AgentToolV2;
78
+ //# sourceMappingURL=AgentToolV2.node.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AgentToolV2.node.js","sourceRoot":"","sources":["../../../../../src/nodes/agents/Agent/V2/AgentToolV2.node.ts"],"names":[],"mappings":";;;AAAA,+CAAmD;AAUnD,iEAA4E;AAE5E,mCAAoC;AACpC,qEAA8E;AAC9E,6DAAoE;AAEpE,MAAa,WAAW;IAEvB,YAAY,eAAyC;QACpD,IAAI,CAAC,WAAW,GAAG;YAClB,GAAG,eAAe;YAClB,OAAO,EAAE,CAAC,GAAG,CAAC;YACd,QAAQ,EAAE;gBACT,IAAI,EAAE,eAAe;gBACrB,KAAK,EAAE,SAAS;aAChB;YACD,MAAM,EAAE;;OAEJ,iBAAS,CAAC,QAAQ,EAAE;;;MAGrB;YACH,OAAO,EAAE,CAAC,kCAAmB,CAAC,MAAM,CAAC;YACrC,UAAU,EAAE;gBACX,8BAAe;gBACf,EAAE,GAAG,wBAAS,EAAE;gBAChB;oBACC,WAAW,EAAE,gCAAgC;oBAC7C,IAAI,EAAE,iBAAiB;oBACvB,IAAI,EAAE,SAAS;oBACf,OAAO,EAAE,KAAK;oBACd,gBAAgB,EAAE,IAAI;iBACtB;gBACD;oBACC,WAAW,EAAE,8FAA8F,kCAAmB,CAAC,cAAc,4EAA4E;oBACzN,IAAI,EAAE,QAAQ;oBACd,IAAI,EAAE,QAAQ;oBACd,OAAO,EAAE,EAAE;oBACX,cAAc,EAAE;wBACf,IAAI,EAAE;4BACL,eAAe,EAAE,CAAC,IAAI,CAAC;yBACvB;qBACD;iBACD;gBACD;oBACC,WAAW,EAAE,uBAAuB;oBACpC,IAAI,EAAE,eAAe;oBACrB,IAAI,EAAE,SAAS;oBACf,OAAO,EAAE,KAAK;oBACd,gBAAgB,EAAE,IAAI;oBACtB,cAAc,EAAE;wBACf,IAAI,EAAE;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