Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AI Agent Nodes + Puppeteer Node #59

Open
vishaldwdi opened this issue Jan 19, 2025 · 11 comments
Open

AI Agent Nodes + Puppeteer Node #59

vishaldwdi opened this issue Jan 19, 2025 · 11 comments
Assignees
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@vishaldwdi
Copy link

All AI Agents Nodes in n8n generally have tool and model branches. Problem is that, AI Agents can't be linked with Puppeteer Node through tool branch to interact with the browser. Please find a way to resolve this.

@drudge
Copy link
Owner

drudge commented Jan 24, 2025

Hi @vishaldwdi, thanks for your interest in my node. This is a great idea, let me look into how I can expose this functionality as a tool that can be used with aI agents.

@drudge drudge self-assigned this Jan 24, 2025
@drudge drudge added enhancement New feature or request help wanted Extra attention is needed labels Jan 24, 2025
@fehmi
Copy link

fehmi commented Jan 26, 2025

That can be a game changer. We can do stuff like operator by open ai did.

https://openai.com/index/introducing-operator/

@fehmi
Copy link

fehmi commented Jan 26, 2025

Also I just wonder if it's the same thing if we connect another workflow that contains puppeteer actions as a "call n8n workflow tool" like below:

Image Image

@vishaldwdi
Copy link
Author

@fehmi I have tried using Puppeteer through the "call n8n workflow tool", and the results are not as expected. It would be much better if the AI Agent node interacted directly with the Puppeteer node through the Tools branch. @drudge AI Agent node must be able to do back-and-forth with the Tools branch Puppeteer node.

@drudge if you or anyone can integrate the Puppeteer node into the AI Agent Node Tools branch then the n8n workflow will gain multifold capacity in comparison to OpenAI Operator or a newly launched open-source version of it ( https://github.com/browserbase/open-operator ) , @drudge you really have the opportunity to practically surpass both.

I have been experimenting with your node for last 3 weeks continuously, Just so you know I know what I am talking about.

@drudge
Copy link
Owner

drudge commented Jan 27, 2025

@fehmi absolutely, seems like a great fit for the functionality of my node. I'm not seeing a lot on building external AI tools for the n8n AI Agent. I'll reach out to some n8n folks to see if they can let me know how possible this is. I do think it would level up their AI agents capability big time.

@vishaldwdi
Copy link
Author

@drudge I can offer you a lead. Please take a look into "HTTP Request Node" which is built into n8n. We can use this node individually within a workflow, or connect it as tool with the Tools Branch of AI Agent.

So, the code of both HTTP request tool node and HTTP request workflow node could be read comparatively to analyze and reverse-engineer the findings to implement within Puppeteer node to allow it to be connected with AI Agent in similar fashion.

https://docs.n8n.io/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.toolhttprequest/?utm_source=n8n_app&utm_medium=node_settings_modal-credential_link&utm_campaign=%40n8n%2Fn8n-nodes-langchain.toolHttpRequest

https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.httprequest/

@vishaldwdi
Copy link
Author

@drudge following link explains updates about Nodes-as-Tools

https://community.n8n.io/t/review-node-as-tools-is-finally-here/57539

@drudge
Copy link
Owner

drudge commented Feb 6, 2025

I did look into this and integrate the useAsTool option. I can get the tool connected but n8n doesn't recognize it. I'm told this behavior is changing in the next release. I'll test and see if I have something releasable.

@ihor-sokoliuk
Copy link
Contributor

@drudge I remove this limitation by adding this into my Dockerfile for n8n image build:

USER root
RUN sed -i "s/nodeType.startsWith('n8n-nodes-base') && //g" /usr/local/lib/node_modules/n8n/dist/node-types.js
USER node

With this code change, I managed to add a custom tool to the AI Agent node

@fehmi
Copy link

fehmi commented Feb 7, 2025

It’s nice but what about community node veraion?

@ihor-sokoliuk
Copy link
Contributor

ihor-sokoliuk commented Feb 7, 2025

@fehmi I added the community searxng node as a custom tool to the ai agent
It works as expected

For example, I added this community node:
https://www.npmjs.com/package/n8n-nodes-searxng

When you add it as a tool at the default n8n setup, it can be added but it will fail with an error.

In my case, after this in my Dockerfile:

USER root
RUN sed -i "s/nodeType.startsWith('n8n-nodes-base') && //g" /usr/local/lib/node_modules/n8n/dist/node-types.js
USER node

I can add and run the node:
Image

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants