Add README.md
This commit is contained in:
@@ -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`.
|
||||||
Reference in New Issue
Block a user