From 529d9aa82fb0fa97fdb00d388fdd01b42db391ba 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=A0=D0=BE=D0=BC?= =?UTF-8?q?=D0=B0=D0=BD=D0=BE=D0=B2?= Date: Thu, 4 Jun 2026 19:19:15 +0000 Subject: [PATCH] Update README.md --- README.md | 56 ++++++++++++++++++++----------------------------------- 1 file changed, 20 insertions(+), 36 deletions(-) diff --git a/README.md b/README.md index d496ddf..737edbe 100644 --- a/README.md +++ b/README.md @@ -1,45 +1,29 @@ -# Deep Agent +# Deep Agent from Scratch -This repository contains a minimal implementation of a **Deep Agent** inspired by the *Deep Agents from Scratch* course. The agent can: +This repository contains a minimal implementation of a deep agent that can: -1. Search the web (DuckDuckGo). -2. Create, read and combine virtual files. -3. Export the virtual files to the real filesystem. -4. Use LangChain + Ollama for LLM inference. +1. Search the web using DuckDuckGo. +2. Create virtual files in memory. +3. Export the virtual files to the real file system. -## Setup +The agent is built using the new LangChain 1.x and LangGraph 1.x APIs. + +## Prerequisites + +- Python 3.11 or newer +- Ollama running locally with a model such as `llama3.1` +- `pip install -r requirements.txt` + +## Running the Agent ```bash -# Install dependencies -pip install -r requirements.txt +python agent.py ``` -## Usage +The script will run the agent with a sample prompt, create a virtual file `report.txt`, and export it to the `exported_files` directory. -```bash -python deep_agent.py "Write a summary of the latest Python release and store it in summary.txt" -``` +## File Structure -The agent will perform the task, create virtual files, and export them to `output_files/`. - -## Architecture - -- `DeepAgent` class implements the agent logic. -- `search` uses DuckDuckGo HTML API. -- `write_file`, `read_file`, `combine` manage a simple in‑memory virtual filesystem. -- `export_files` writes the virtual files to disk. -- The agent loop uses a JSON‑based action protocol. - -## Requirements - -- Python 3.10+ -- LangChain >= 1.0.0 -- LangGraph >= 1.0.0 -- langchain_ollama -- langchain_text_splitters -- langchain_chroma -- requests - ---- - -Feel free to extend the agent with more actions or integrate other LLM providers. \ No newline at end of file +- `agent.py` – Main implementation. +- `requirements.txt` – Python dependencies. +- `README.md` – This file. \ No newline at end of file