Output of agent.print_response is Printed to Terminal but Not Returned

I am using the agent.print_response method in my Streamlit application to analyze financial filings. However, the method prints the response directly to the terminal instead of returning it as a value. As a result, when I attempt to store the result in a variable (e.g., raw_result), it becomes None.

This behavior is causing issues in further processing, as I cannot access or manipulate the response programmatically.

Hi @naitik
Thank you for reaching out and using Phidata! I’ve tagged the relevant engineers to assist you with your query. We aim to respond within 24 hours.
If this is urgent, please feel free to let us know, and we’ll do our best to prioritize it.
Thanks for your patience!

Hi @naitik
You can rather do agent.run() like here