The following agent will generate an answer and save it in a file.
cookbook/tools/file_tools.py
from phi.agent import Agentfrom phi.tools.file import FileToolsagent = Agent(tools=[FileTools()], show_tool_calls=True)agent.print_response("What is the most advanced LLM currently? Save the answer to a file.", markdown=True)