Tokken used by AI agent

Hi, I’m providing a Google Sheet as a tool for an AI agent to read rows and return answers. However, it keeps sending the entire sheet to the model, resulting in token usage of over 200k. Is there a way to reduce the token usage?

Hey @Abdullah4 hope all is well, welcome to the community.

If you don’t need to send the entire sheet to the LLM, maybe don’t send it to the LLM, that should definitely help with reducing the token usage.

How can I do that ? Problem is lets say I am asking for a specific value like tracking link for R12345 it is searching and giving all the rows instead of matching rows to llm

what you could do is instead of calling sheets tool, you could call the subflow, where a sheets node would return all the rows and then you filter them in that subflow and then return to the main flow - to the ai agent.