how to avoid spending tokens on reading the database every time? I want to read the database once and not access it again until it is updated if possible
in your workflow you have attached database as memory. So it will access it every time ai agent runs for inserting and accessing these input and outputs of ai agent.
For:
you can decrease Context Window Length. More the context window more input to llm which will cause higher consumption of tokens.