From 44dc23d0204b1056fdf6d5d99f490d699d98beaa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9A=D0=B8=D1=80=D0=B8=D0=BB=D0=BB=20=D0=9A=D1=83=D1=82?= =?UTF-8?q?=D0=BB=D0=B0=D1=85=D0=BC=D0=B5=D1=82=D0=BE=D0=B2?= Date: Tue, 26 May 2026 12:48:41 +0000 Subject: [PATCH] add README.md --- README.md | 44 +++++++++++++++++++++++++++++++++----------- 1 file changed, 33 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index f5d6d2b..91c63b4 100644 --- a/README.md +++ b/README.md @@ -1,17 +1,39 @@ -# DeepAgent Search +# DeepAgent from Scratch -This repository contains a simple deep agent that can search the web and create virtual files. The agent is built using the `deepagents` library and follows the "deep agents from scratch" pattern. +## Overview +This repository contains a minimal implementation of a **DeepAgent** inspired by the *Deep Agents from Scratch* course. The agent can: -## Features +1. Search the web using DuckDuckGo. +2. Create virtual files in an in‑memory file system. +3. Persist those virtual files to the real file system when the task is finished. -- Web search using DuckDuckGo. -- Virtual file creation in an in‑memory filesystem. -- Export virtual files to the real filesystem at the end of the run. +The implementation uses: +- **LangChain OpenAI** (`ChatOpenAI`) for LLM interactions. +- **DuckDuckGo Search** for web queries. +- A simple `VirtualFileSystem` class to hold files in memory. -## Usage - -```bash -python main.py "search query" +## Requirements +``` +langchain-openai>=0.3.0 +langchain>=1.2.10 +langgraph>=0.2.0 +duckduckgo-search ``` -The agent will perform the search, create virtual files, and write them to the current directory. +## Running the Agent +```bash +# Install dependencies +pip install -r requirements.txt + +# Run the agent +python main.py +``` + +The script will perform a sample search for *"LangChain deep agent"* and create a file named `summary.txt` with the first search result. All virtual files are written to the current directory. + +## Extending the Agent +- Add more tools by decorating functions with `@tool` and passing them to `DeepAgent`. +- Modify the `run` method to change the interaction loop or add more sophisticated prompting. + +## License +MIT