d44ecc349fef0dabf30dc987b5f11100b872482e
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). - Real‑world file export: After completing the task, the virtual files are copied to the real filesystem under
./workspace.
How it works
- The agent is instantiated with an OpenRouter LLM and a single web search tool.
- A backend combines a local shell environment (for executing commands) and a simple in‑memory filesystem.
- When the user asks for information, the agent calls
web_search, receives the results, and stores them inresults.txtinside the virtual workspace. - The script then copies that file to the real working directory so it can be committed to Git later.
Running locally
pip install -r requirements.txt
python main.py
The program will print search results and create a results.txt file in the current directory.
Description
Languages
Python
100%