Suppose i have a agent that deals with files.
File upload happens only if the user says start a process. So before starting it user has to upload file.
I have built an api to interact with my agent. So, when user says start, agent responds ‘please upload file to continue’. Currently Im looking for a keyword 'upload ’ in the agent response, if its present i will set a flag value true and send it to front end so that it can show file upload button.
Is there any neat way of doing it without relaying on upload keyword?
Hi @akhilmstcs
thanks for reaching out and supporting Agno!We’ve shared this with the team and are working through requests one by one—we’ll get back to you as soon as we can.We’ve just kicked off the Global Agent Hackathon , so things are a bit busier than usual. If you’re up for it, we’d love for you to join—it’s a great chance to build, win some exciting prizes and connect with the agent community!If it’s urgent, just let us know. Thanks for your patience!
Hey @akhilmstcs that sounds great and thanks for reaching out.
How I would approach this:
I’d define clear instructions for the model that specify when a file needs to be uploaded and use a function tool for the upload itself—probably a Python function exposed via an API. Instead of relying on keyword matching (like checking for “upload”), you can leverage tools.
One clean option is to use tools (function calling) where the agent explicitly triggers a file upload tool when it’s required.
Additionally, you could use a “human-in-the-loop” mechanism to confirm the file before proceeding, which is especially helpful in workflows requiring validation or review. We have an example for this (unrelated to your usecase but can be helpful in getting the rhythm) Human in the Loop - Agno