1.4 KiB
1.4 KiB
Deep Agent – Search, Virtual Files, Export
This project implements a Deep Agent following the Deep Agents from Scratch template.
The agent can:
- Search the web for information (using DuckDuckGo).
- Create virtual files in memory.
- Export those virtual files to the real filesystem.
Prerequisites
- Python 3.10+
- An OpenAI API key (set as
OPENAI_API_KEYenvironment variable).
Installation
# Clone the repository
git clone https://github.com/yourusername/deep-agent-demo.git
cd deep-agent-demo
# Create a virtual environment (optional but recommended)
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
Usage
python src/main.py \
--prompt "Write a short report on the history of the Eiffel Tower" \
--output-dir ./exported_files \
--verbose
--prompt– The user query for the agent.--output-dir– Directory where virtual files will be exported.--verbose– Show detailed logs of tool calls.
After running, the agent will print the final answer and export any created virtual files to the specified directory.
Project Structure
deep-agent-demo/
├── src/
│ └── main.py # Main script with Deep Agent implementation
├── requirements.txt # Python dependencies
└── README.md # This file
License
MIT License