Files
task-69de7223f309a98be0007e09/main.py
T
2026-06-04 19:19:09 +00:00

29 lines
888 B
Python
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
"""
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()}")