Files
task-69de7223f309a98be0007e09/README.md
T
2026-05-26 11:55:03 +00:00

22 lines
1.2 KiB
Markdown
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.
# DeepAgent Implementation
This repository contains a minimal **DeepAgent** that can search the web and create virtual files. The agent uses OpenRouter for LLM calls, DuckDuckGo for web searches, and `deepagents` to manage a hybrid filesystem + shell backend.
## Features
- **Web search**: Uses DuckDuckGo API to fetch up to 5 results per query.
- **Virtual file creation**: The agent writes files into a temporary workspace (`./workspace`).
- **Realworld file export**: After completing the task, the virtual files are copied to the real filesystem under `./workspace`.
## How it works
1. The agent is instantiated with an OpenRouter LLM and a single web search tool.
2. A backend combines a local shell environment (for executing commands) and a simple inmemory filesystem.
3. When the user asks for information, the agent calls `web_search`, receives the results, and stores them in `results.txt` inside the virtual workspace.
4. The script then copies that file to the real working directory so it can be committed to Git later.
## Running locally
```bash
pip install -r requirements.txt
python main.py
```
The program will print search results and create a `results.txt` file in the current directory.