Files
2026-06-04 15:54:13 +00:00

35 lines
1.2 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Research Brief LangGraph Agent
## What it does
This repository contains a **LangGraph** agent that builds a short research brief for any given topic. The brief is produced in three stages:
1. **Outline** the LLM generates 45 concise bullet points.
2. **Research step** each outline item triggers one web search via Tavily and produces a short note (58 sentences).
3. **Synthesize** all notes are combined into a coherent brief with headings.
The agent is fully automated; running the script will print the outline, individual notes and the final brief.
## File structure
- `agent.py` main implementation of the LangGraph graph.
- `requirements.txt` Python dependencies.
- `README.md` this documentation.
## Installation
```bash
pip install -r requirements.txt
```
Create a `.env` file in the project root with your Tavily API key:
```
TAVILY_API_KEY=your_key_here
JOURNAL_MCP_PAT=your_brojs_pat # required for LLM access
```
## Usage
```bash
python agent.py
```
The script will run a demo with the default topic *"Как студенту безопасно подключать MCP к LangChain"*.
You can also import `BriefGraph` from `agent` and use it in your own code.