57 lines
1.4 KiB
Markdown
57 lines
1.4 KiB
Markdown
# Deep Agent – Search, Virtual Files, Export
|
||
|
||
This project implements a **Deep Agent** following the *Deep Agents from Scratch* template.
|
||
The agent can:
|
||
|
||
1. Search the web for information (using DuckDuckGo).
|
||
2. Create virtual files in memory.
|
||
3. Export those virtual files to the real filesystem.
|
||
|
||
## Prerequisites
|
||
|
||
- Python 3.10+
|
||
- An OpenAI API key (set as `OPENAI_API_KEY` environment variable).
|
||
|
||
## Installation
|
||
|
||
```bash
|
||
# 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
|
||
|
||
```bash
|
||
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 |