Langchain Human as a Tool

In a Langchain agent with tools workflow I want to provide some additional data manually. Right now this tool is not implemented in n8n.

What would be the optimal way/replacement for the Human as a Tool Langchain feature in n8n?

Information on your n8n setup

  • n8n version: cloud

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

Hi @jkk

  1. I would first recommend solving this this with some prompt engineering, telling it to ask for missing information. This would be the simplest solution.

  2. If that doesn’t work, you can use a workflow that checks first if the information is present, if not goes down one branch which asks for information and if it is or answer got provided goes down the other branch.

  3. If it really has to be a tool would be a little bit more work:

  • tool would have to send a response to the webhook (should be simple)
  • the response message via webhook has then to end up with the tool again (more complicated, but we could respond with overwriting URL with another one)

I also checked with one of our engineers @oleg who suggested an alternative:

  1. It could also be multiple agents each responsible for a certain area but using the same memory. Then on the webhook, we’d check if chat memory for incoming memoryKey and have a chain to moderate & control which agent to call. Something like this:

I have also passed these suggestions to @svenjanssen who you’re in contact with already.

Which method do you think is most effective?


Btw. important to mention here, that this requires changes in n8n core. So the comments regarding how simple it it is to do, is for the development work required.