feat: solution for '8. Самописный поисковый агент на основе deep agents from scratch'

This commit is contained in:
2026-06-28 12:40:40 +03:00
parent b00f37f770
commit 380e236ecf
3 changed files with 335 additions and 96 deletions
+50 -24
View File
@@ -1,31 +1,57 @@
# 8. Самописный поисковый агент на основе deep agents from scratch
# Deep Agent Search, Virtual Files, Export
Главная
Мои задания
8. Самописный поисковый агент на основе deep agents from scratch
EN
8. Самописный поисковый агент на основе deep agents from scratch
Зачёт
Версия 1
Дедлайн сдачи: 31.08.2026
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
Необходимо написать deepagent на основе курса deep agents from scratch пример такого аг
# 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