5f3f32613dd3dc30ea66f5a7d83e6b169a8f3e43
Deep Agent with Web Search and Virtual File Creation
Overview
This repository contains a minimal implementation of a Deep Agent built from scratch using the deepagents framework. The agent can:
- Search the web for information using DuckDuckGo.
- Create virtual files during its execution.
- Export those virtual files to the real filesystem after the agent finishes.
The implementation follows the guidelines from the Deep Agents from Scratch course and uses the BroJS LLM endpoint.
Prerequisites
- Python 3.10 or newer
- A valid BroJS API key set in the environment variable
JOURNAL_MCP_PAT. - (Optional) A virtual environment to isolate dependencies.
Installation
# Clone the repository
git clone https://git.brojs.ru/KirillKutlakhmetov/task-69de7223f309a98be0007e09.git
cd task-69de7223f309a98be0007e09
# Create and activate a virtual environment (recommended)
python -m venv .venv
source .venv/bin/activate # On Windows use .venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
Usage
# Ensure the environment variable is set
export JOURNAL_MCP_PAT=your_brojs_api_key
# Run the agent
python main.py
The agent will perform a sample query ("Python async programming"). After completion, the virtual files created during the run will be exported to the ./exported_files directory.
Project Structure
main.py– Entry point and agent definition.requirements.txt– Python dependencies.README.md– Project documentation.
Customization
- To change the query, modify the
user_queryvariable inmain.py. - To add more tools, define additional functions decorated with
@tooland include them in thetoolslist when creating the agent. - The agent can be extended to accept user input at runtime by replacing the hard‑coded query.
License
MIT License.
Description
Languages
Python
100%