43 lines
1.2 KiB
Markdown
43 lines
1.2 KiB
Markdown
# Deep Agent – Search + Virtual Files
|
||
|
||
This repository contains a minimal **deep agent** implementation based on the
|
||
"Deep Agents from Scratch" course. The agent can:
|
||
|
||
1. Search the web (simple Bing wrapper).
|
||
2. Create and modify files in an **in‑memory virtual file system**.
|
||
3. Read those virtual files.
|
||
4. Dump the virtual file system to the real disk at the end of the run.
|
||
|
||
## Setup
|
||
|
||
```bash
|
||
# Create a virtual environment (optional but recommended)
|
||
python -m venv venv
|
||
source venv/bin/activate # Windows: venv\Scripts\activate
|
||
|
||
# Install dependencies
|
||
pip install -r requirements.txt
|
||
```
|
||
|
||
> **Prerequisite** – An Ollama server must be running locally with a model
|
||
> such as `llama3.1` available.
|
||
|
||
## Usage
|
||
|
||
```bash
|
||
python agent.py
|
||
```
|
||
|
||
You will be prompted to type questions. The agent will decide which tool to
|
||
use. When you are finished, type `exit`.
|
||
|
||
The virtual files are stored in memory. To persist them, use the `DumpVirtualFS`
|
||
tool or call `dump_virtual_fs_tool("output")` from within the agent.
|
||
|
||
## Files
|
||
|
||
- `agent.py` – Main agent implementation.
|
||
- `virtual_fs.py` – Simple in‑memory file system.
|
||
- `requirements.txt` – Python dependencies.
|
||
- `README.md` – This documentation.
|