AI agent limitation with sub-nodes expression resolution

The idea is:

My use case:

When you use fromAI() as part of the MySQL connected as tools to the AIAGent node, there are significant issues related to expression resolution etc because of the limitation cited in the attachment (taken from n8n docs).

I think it would be beneficial to add this because:

It becomes absolutely painful to build inteligent sophisticated analysis tools which can take an excel/csv file (with mulitple tabs) as input and then feed them to the AI agent which has MySQL, PyhtonVisualization and claudeAI connected as tools/model in the subnodes because the fromAI() function would not resovle the expressiosn properly as per the n8n limitation in subnodes

Any resources to support this?

See attached - also the example flow i was trying to replciate in n8n was when you connect a claude Desktop to MCP SQLite server and then ask open ended questions on a SQLIte DB connected to claude desktop…The way claude could respond with inteligent insights/recommendations/visualizations is very powerful and it could have been easily built with n8n , but for this limitation of AIAgent fromAI() function in subnodes

Are you willing to work on this?

  • I can work but my coding skills are limited

Hi there! I assume you need multiple items because your Excel has multiple rows? Could you not squash them all into a single item before passing them to the agent?

my excel has multiple rows across multiple tabs with column headers. I have already converted my excel to a single DB file. Look at the situation I am trying to replicate via the n8n flow . I recently connected a claude Desktop to MCP SQLite server and then ask open ended questions on a SQLIte DB file connected to claude desktop…the claude Desktop would generate the required SQL queries related to my question and would also generate insights/recommendations/visualizations basis that. This should ideally be possible in an AI agent framework where the agent has Claude model on its subnode and also the mySQL and Python visualization tools on the its tools subnodes. But there is a limitation of AI agents in n8n that " The AI Agent tool usage is “reactive” — it doesn’t remember context across intermediate steps unless manually persisted. * The model generates the plan to use mySQL queries , then doesn’t always follow through with actual tool execution…its related to the screenshot I attached in my original requirement… I faced a similar problem receently when trying to build an intelligent “Search strategy generator, parser, scraper” all in one via the AI agent framework in n8n by connecting the open AI model in the model subnode and the serper search , and apify/firecrawl scraper in the tools subnodes…Despite making the prompts of the AI agent very detailed, the The AI Agent tool usage is “reactive” — it doesn’t remember context across intermediate steps unless manually persisted. * The model generates the plan to use serper_search , then doesn’t always follow through with actual tool execution… Eventually I had to remove the AI agent framework and switch to a regular flow with nodes in the sequence which is obviously a lot more work and doesn’t give the hands-off output you get when you connect some of the claude/gpt models to appropriate tools/clients via MCP and wait for them to show their magic…