A multi-agent fact-checking system that verifies user claims using Wikipedia as a data source. Built with Google's Agents Development Kit (ADK) and LangChain.
This project implements an automated fact-checking workflow with two specialized agents:
- Fact Researcher: Searches Wikipedia to gather evidence relevant to a claim
- Fact Checker: Evaluates the claim against research data and provides a verdict
The system uses a sequential workflow where the researcher gathers evidence first, and then the fact-checker evaluates the claim based on that evidence.
- Multi-agent architecture using Google ADK
- Wikipedia integration for evidence gathering
- Automatic claim verification with detailed reasoning
- Structured verdicts: TRUE, FALSE, PARTIALLY TRUE, or UNVERIFIED
- Google Cloud logging integration
- Environment variable configuration
- Python 3.x
- Google Cloud credentials (for authentication)
.envfile withMODELenvironment variable set
- Clone the repository:
git clone <repository-url>
cd fact-check-agent- Install dependencies:
pip install -r requirements.txt- Set up environment variables:
Create a
.envfile in the project root:
MODEL=<your-model-name>
- Configure Google Cloud authentication: Set up your Google Cloud credentials for authentication.
Import and use the fact-checking workflow:
from agent import root_agent, fact_check_workflow
# Use the root agent to interact with users
# or directly call the fact_check_workflow for automated fact-checkingThe workflow will:
- Accept a claim from the user
- Research the claim using Wikipedia
- Evaluate the claim against the gathered evidence
- Return a verdict with detailed reasoning
fact-check-agent/
├── __init__.py # Package initialization
├── agent.py # Main agent definitions and workflow
├── requirements.txt # Python dependencies
└── README.md # This file
google-adk==1.14.0- Google's Agents Development Kitlangchain-community==0.3.27- LangChain community toolswikipedia==1.4.0- Wikipedia API client
- The Greeter Agent provides an entry point and collects the user's claim
- The Fact Researcher Agent uses Wikipedia tools to search for relevant information
- The Fact Checker Agent analyzes the research data and provides a final verdict with supporting evidence