add README.md

This commit is contained in:
2026-06-04 16:08:56 +00:00
parent 92197f12d1
commit 148cb44d1c
+45 -2
View File
@@ -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 45 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 GPTOSS 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.
""