add README.md
This commit is contained in:
@@ -1,3 +1,46 @@
|
|||||||
# task-6a219d2dfd30e81cf3146baf
|
# LangGraph Research Brief Agent
|
||||||
|
|
||||||
Solution for BroJS task 6a219d2dfd30e81cf3146baf
|
## Overview
|
||||||
|
This repository implements a **LangGraph** agent that generates a short research brief for any given topic. The agent follows the assignment specification:
|
||||||
|
|
||||||
|
1. Create an outline of 4‑5 bullet points.
|
||||||
|
2. For each point perform one web search via Tavily and collect a concise note.
|
||||||
|
3. Synthesize all notes into a coherent brief (≈½–1 page).
|
||||||
|
|
||||||
|
The implementation uses:
|
||||||
|
- `langgraph` – graph orchestration
|
||||||
|
- `langchain-openai` – LLM calls to the BroJS GPT‑OSS model
|
||||||
|
- `langchain-tavily` – web search via Tavily API
|
||||||
|
- `python-dotenv` – environment variable loading (TAVILY_API_KEY, JOURNAL_MCP_PAT)
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
```bash
|
||||||
|
pip install -r requirements.txt
|
||||||
|
```
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
```bash
|
||||||
|
# Run the agent for a specific topic
|
||||||
|
python main.py "How to integrate LangGraph with Tavily"
|
||||||
|
```
|
||||||
|
The script prints:
|
||||||
|
- The generated outline
|
||||||
|
- Notes collected from web searches
|
||||||
|
- Final research brief
|
||||||
|
|
||||||
|
You can also import `run_brief` in your own code.
|
||||||
|
|
||||||
|
## Project structure
|
||||||
|
```
|
||||||
|
├── main.py # Entry point and LangGraph implementation
|
||||||
|
├── requirements.txt # Dependencies
|
||||||
|
└── README.md # Documentation
|
||||||
|
```
|
||||||
|
|
||||||
|
## Example outputs
|
||||||
|
1. **Topic:** *How to integrate LangGraph with Tavily*
|
||||||
|
2. **Topic:** *Best practices for building research briefs in AI*
|
||||||
|
3. **Topic:** *Using LangChain and LangGraph for educational projects*
|
||||||
|
|
||||||
|
Feel free to experiment with different topics.
|
||||||
|
""
|
||||||
Reference in New Issue
Block a user