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

1.2 KiB
Raw Blame History

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

pip install -r requirements.txt
python main.py

The program will print search results and create a results.txt file in the current directory.