2026-06-04 16:06:57 +00:00
2026-06-04 16:06:57 +00:00

Research Brief Agent

Description

A standalone LangGraph based agent that generates a concise research brief for a given topic. The workflow:

  1. Generates a 45 point outline for the topic.
  2. For each outline point performs a single web search using Tavily and records a 58 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

# 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

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.

S
Description
No description provided
Readme 27 KiB
Languages
Python 100%