A Python package for creating a research brief agent
Project description
Research Brief Agent
A Python library for an AI agent that generates concise research briefs from web searches using LangChain, Anthropic's Claude, and Tavily search.
Overview
The ResearchBriefAgent automates the process of researching a topic and producing a structured brief, including key points and sources. Built with LangChain's ecosystem, it leverages Anthropic's Claude model for reasoning and Tavily for web search, with SQLite-backed memory for context persistence.
Features
- Topic-Based Research: Generate briefs on any topic with a single function call.
- Structured Output: Receive formatted briefs with key points and cited sources.
- Memory Persistence: Retain conversation context across queries using SQLite checkpointing.
- Extensible: Built on LangChain, allowing integration with additional tools and models.
Installation
Install the library via PyPI:
pip install research_brief_agent
Usage
from research_brief_agent import ResearchBriefAgent
agent = ResearchBriefAgent(anthropic_api_key="your_anthropic_api_key", tavily_api_key="your_tavily_api_key")
brief = agent.generate_brief("Impact of renewable energy on climate change")
print(brief)
Example Output:
Research Brief: Impact of renewable energy on climate change
Key Points
- Reduces greenhouse gas emissions by replacing fossil fuels.
- Solar and wind power adoption has surged globally.
- Critical for limiting warming to 1.5°C.
Sources
Requirements
Python: 3.8 or higher Dependencies: langchain-community, langgraph, langchain-anthropic, tavily-python, langgraph-checkpoint-sqlite API Keys: Obtain from Anthropic and Tavily Setup Clone the repo:
git clone https://github.com/yourusername/research_brief_agent.git
cd research_brief_agent
Install dependencies:
pip install -r requirements.txt
Or install from PyPI:
pip install research_brief_agent
Contributing
Contributions are welcome! Fork the repo, create a feature branch, commit changes, and open a pull request. See CONTRIBUTING.md for details (to be added).
License
MIT License - see LICENSE for details.
Contact
Email: your.email@example.com
Issues: GitHub
Acknowledgments
Built with LangChain and Anthropic. Search powered by Tavily.
Verification
This is the exact content from my previous response, presented as a single Markdown file. You can save it directly as README.md in your project directory. The "Usage" section remains a single, copy-paste-friendly block, and all badges, sections, and details are preserved.
Next Steps
- Replace placeholders (
yourusername,your.email@example.com) with your actual details. - Save this text as
README.mdin your project root. - Push to GitHub and publish to PyPI to activate the badges.
Let me know if you need help with any part of the implementation!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file researchbriefagent-0.1.1.tar.gz.
File metadata
- Download URL: researchbriefagent-0.1.1.tar.gz
- Upload date:
- Size: 3.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
120a8aa918d7a6d0832cd7303c7bb8620dff07ab48dcd850c76f3afc7f9099dd
|
|
| MD5 |
038ccfdea93261c4a4b571aea2c9656a
|
|
| BLAKE2b-256 |
673ad39aadb98b9c40bd799ef1d20b9aac2f2c802572c10c63b365fcd26984df
|
File details
Details for the file researchbriefagent-0.1.1-py3-none-any.whl.
File metadata
- Download URL: researchbriefagent-0.1.1-py3-none-any.whl
- Upload date:
- Size: 3.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1b3925151db9607013ba1194b547450bc290a2dce840ef94fc20e0cf8af9c4b5
|
|
| MD5 |
6865f1b63a3a420e6ea5b9d0d5a1c977
|
|
| BLAKE2b-256 |
405eb154fad3cedef576a86ad1d0ebe095729c34f25db8a42210b15a8fb86973
|