Hello callin.io Support,
I'm currently utilizing the AI Agent node within callin.io to interact with OpenAI's GPT-4o model. The agent is configured with a very large prompt (encompassing extensive context and 37 dynamic instructions from external tools), which leads to a substantial spike in token usage with each request.
Consequently, I'm frequently encountering the OpenAI rate limit:OpenAI: Rate limit reached for gpt-4o in organization [...] on tokens per min (TPM): Limit 30000, Used 20191, Requested 22443
.
Unfortunately, I'm unable to implement a delay between the Agent and the language model directly within the AI Agent setup. Although I've attempted to add a custom wait_Tool
, the agent only invokes it inconsistently, not on every execution, even when instructed to do so.
I also looked into the “Wait Between Tries (ms)” option in the Agent settings, but it's capped at 5000ms, and the UI doesn't permit increasing it further.
My question is:
How can I reliably introduce a longer delay (e.g., 10–30 seconds) between Agent executions or before each call to the OpenAI model (within the AI Agent) to stay within the rate limits, particularly when dealing with large prompts and multiple tool calls?
Any suggestions or workarounds would be highly appreciated.
Best regards,
Information on your callin.io setup
- callin.io version:Version 1.88.0
- Database (default: SQLite): PostgreSQL
- Running callin.io via (Docker, npm, callin.io cloud, desktop app): Docker
- Operating system: cloud server Render
You can manually insert a Wait node prior to the AI Agent invocation:
- Link the Wait node directly before the AI Agent node.
- Configure the delay to “Static” and select a duration ranging from 10 to 30 seconds.
Yeah, but it doesn’t seem logical. The issue is that the AI Agent makes numerous requests to various tools and then analyzes the responses within the Chat Model. There are no settings or options to introduce a pause between these requests directly within the AI Agent. We're specifically referring to a wait/pause mechanism inside the AI Agent itself, not within the flow before or after it.
You could invoke another workflow as a tool and have it wait for that workflow to complete?
Actually, I did. I added a code node as a tool. It functions similarly to a wait tool. In the prompt, I included an instruction to call this tool every time other tool calls are made. However, it's not working well because the AI model ignores my rule and doesn't use this tool consistently. I've noticed that I need to make each of my tools a workflow with a wait node, rather than using tools directly. While not a perfect solution, I haven't found a better one.