537010e61bceea1a429d7431f525b033bb159ea0
Deep Agent
This repository contains a minimal implementation of a Deep Agent inspired by the Deep Agents from Scratch course. The agent can:
- Search the web (DuckDuckGo).
- Create, read and combine virtual files.
- Export the virtual files to the real filesystem.
- Use LangChain + Ollama for LLM inference.
Setup
# Install dependencies
pip install -r requirements.txt
Usage
python deep_agent.py "Write a summary of the latest Python release and store it in summary.txt"
The agent will perform the task, create virtual files, and export them to output_files/.
Architecture
DeepAgentclass implements the agent logic.searchuses DuckDuckGo HTML API.write_file,read_file,combinemanage a simple in‑memory virtual filesystem.export_fileswrites 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.
Languages
Python
100%