From 92dd2fa20b51b441533d93440d23f107fd467a3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9A=D0=B8=D1=80=D0=B8=D0=BB=D0=BB=20=D0=A0=D0=BE=D0=BC?= =?UTF-8?q?=D0=B0=D0=BD=D0=BE=D0=B2?= Date: Thu, 4 Jun 2026 19:19:09 +0000 Subject: [PATCH] Add main.py --- main.py | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 main.py diff --git a/main.py b/main.py new file mode 100644 index 0000000..d19fda9 --- /dev/null +++ b/main.py @@ -0,0 +1,29 @@ +""" +Entry point for running the deep agent. + +The script demonstrates how to use the agent to answer a question, create +virtual files, and finally export those files to the real file system. +""" + +import os +from pathlib import Path + +from .agent import run_prompt +from .vfs import vfs + +# Example prompt – you can replace this with any question +PROMPT = ( + "I want to learn about the history of the Silk Road. " + "Please search the web, summarize the key points, and write a short " + "report to a file named 'silk_road.txt'." +) + +if __name__ == "__main__": + print("Running deep agent…") + output = run_prompt(PROMPT) + print("\nAgent output:\n", output) + + # Export virtual files to a folder named 'output' in the current directory + output_dir = Path("output") + vfs.export_to_real_fs(str(output_dir)) + print(f"\nVirtual files exported to {output_dir.resolve()}") \ No newline at end of file