This project demonstrates an agentic workflow for research and fact-checking using Strands agents, combining both web research and local file retrieval. It leverages multiple specialized agents that collaborate sequentially to gather, verify, and summarize information. This implementation is built on top of the multi-agent workflow example used in the Strand SDK Documentation.
- Multi-agent workflow: Separate agents for web research, local file research, analysis, and report writing.
- Web research: Gathers information using the
http_requesttool. - Local file research: Uses Retrieval-Augmented Generation (RAG) to summarize and reference local sources.
- Fact-checking and synthesis: Analyst Agent evaluates findings and rates accuracy.
- Automated report generation: Writer Agent produces concise, structured reports.
- Bibliography tracking: URLs and local source files are logged automatically.
- Ensure Python 3.9+ is installed.
- Install required packages (example, adjust for your environment):
pip install strands strands-tools- Clone the repository and navigate to the project directory:
git clone <repo-url>
cd <project-directory>.
├── research_assistant.py # Main workflow script
├── workflow.py # Invokes agentic workflows
├── agents.py # Intialized agents with system prompt
├── local_tools.py # Local file search functionality
├── bibliography.py # Bibliography functionality
├── sources/ # Local text sources for RAG
├── bibliography.log # Generated bibliography of URLs and files
└── README.md
sources/: Place any.txtfiles you want the agent to use for local research here.bibliography.log: Automatically updated with all sources accessed during research.
Run the research assistant script:
python research_assistant.pyYou will be prompted to enter a query or claim. Example queries:
"Thomas Edison invented the light bulb""Tuesday comes before Monday in the week""What are quantum computers?"
Type exit to quit the program.
-
Web Researcher Agent
- Gathers web information using
http_request. - Limits requests to 1–2 sources and extracts key content.
- Gathers web information using
-
Local Researcher Agent
- Optionally summarizes local
.txtfiles using RAG. - Produces concise summaries with file references.
- Optionally summarizes local
-
Analyst Agent
- Verifies factual claims (rating accuracy 1–5).
- Synthesizes findings for research queries (3–5 key insights).
- Evaluates reliability of sources.
-
Writer Agent
- Produces the final report under 500 words.
- Presents fact-check results or research insights clearly.
- Includes brief source mentions from web and local files.
- Interactive Consent for Local Sources: You can choose whether to include local files for each query.
- Chunking for Large Files: Large local files are automatically broken into chunks for summarization.
- Bibliography Tracking: All URLs accessed via web requests and local files mentioned are appended to
bibliography.log.
- User inputs:
"Lemon cures cancer" - Web Researcher finds recent articles and relevant studies.
- Local Researcher checks local sources for supporting evidence.
- Analyst Agent rates claim as false based on evidence.
- Writer Agent generates a concise report explaining findings and sources.
- Integration of Bedrock Knowledge Base: Allows for shared and use-case specific knowledge access
- Source Restriction: Restrict HTTP access to sources for specific use cases (ie. JSTOR for academic research)
- User Interaction: Allow user to engage further and iterate on research questions
- Multimodal Retrieval: Retrieve images, graphs, videos, and audio in response to research questions