commit 168229b3f13e87e06fcc22b3ec837d08aa5c8d0b Author: balabanovan530 <175+balabanovan530@noreply.localhost> Date: Thu Jun 4 16:06:57 2026 +0000 Add README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..8ef3ba0 --- /dev/null +++ b/README.md @@ -0,0 +1,55 @@ +# Research Brief Agent + +## Description +A standalone **LangGraph** based agent that generates a concise research brief for a given topic. The workflow: + +1. Generates a 4–5 point outline for the topic. +2. For each outline point performs a single web search using **Tavily** and records a 5–8 sentence note. +3. Synthesizes all notes into a coherent brief with headings. +4. Outputs the outline, step notes, and final brief to the console. + +The agent is fully configurable via environment variables. + +## Environment Variables +Create a `.env` file in the project root: + +``` +TAVILY_API_KEY=your_tavily_api_key +OPENAI_API_KEY=your_openai_api_key +``` + +For local LLMs (e.g., Ollama) replace `ChatOpenAI` with the appropriate client and provide `base_url` and `api_key`. + +## Installation + +```bash +# Create virtual environment +python -m venv .venv +source .venv/bin/activate # On Windows use .venv\Scripts\activate + +# Install dependencies +pip install -r requirements.txt +``` + +## Usage + +```bash +python agent.py "Your topic here" +``` + +If no topic is provided, the default `Artificial Intelligence` will be used. + +The script prints: + +- Outline +- Step notes +- Final brief + +## Dependencies +- `langgraph` +- `langchain-openai` +- `langchain-tavily` +- `tavily-python` +- `python-dotenv` + +All are pinned to the latest stable ranges in `requirements.txt`. \ No newline at end of file