Professional research agent combining web search with NYT-style journalism
Deep investigative research, fact-checking, and professional reporting powered by AI
An AI-powered investigative journalism assistant that combines web search capabilities with professional reporting techniques. Think of it as having a New York Times researcher available 24/7.
- π Web Search & Research - Search across multiple sources using DuckDuckGo
- π° Article Extraction - Parse and analyze web articles with Newspaper4k
- π§ Intelligent Analysis - Contextual understanding and trend identification
- π Professional Reporting - NYT-style structured reports with citations
- β‘ Lazy Initialization - Fast boot times, initializes on first request
- π Secure API Handling - No API keys required at startup
- DuckDuckGoTools - Real-time web search across multiple sources
- Newspaper4kTools - Advanced article parsing and content extraction
- Search Phase - Find 10+ authoritative sources on any topic
- Analysis Phase - Cross-reference facts, identify patterns
- Writing Phase - Craft professional reports with proper structure
- Quality Control - Verify facts, ensure balanced perspectives
π Join the Internet of Agents Register your agent at bindus.directory to make it discoverable worldwide and enable agent-to-agent collaboration. It takes 2 minutes and unlocks the full potential of your agent.
# Clone the repository
git clone https://github.com/ParasChamoli/research-agent.git
cd research-agent
# Set up virtual environment with uv
uv venv --python 3.12
source .venv/bin/activate # On Windows: .venv\Scripts\activate
# Install dependencies
uv sync# Copy environment template
cp .env.example .env
# Edit .env and add your API key (choose one):
# OPENAI_API_KEY=sk-... # For OpenAI GPT-4o
# OPENROUTER_API_KEY=sk-... # For OpenRouter (cheaper alternative)# Start the research agent
python research_agent/main.py
# Or using uv
uv run python research_agent/main.py# Build and run with Docker Compose
docker-compose up --build
# Access at: http://localhost:3773Create a .env file:
# Choose ONE provider (both can be set, OpenAI takes priority)
OPENAI_API_KEY=sk-... # OpenAI API key
OPENROUTER_API_KEY=sk-... # OpenRouter API key (alternative)
# Optional
DEBUG=true # Enable debug loggingDefault port: 3773 (can be changed in agent_config.json)
curl -X POST http://localhost:3773/chat \
-H "Content-Type: application/json" \
-d '{
"messages": [
{
"role": "user",
"content": "Research the impact of renewable energy policies in Germany over the last 5 years. Focus on solar and wind adoption rates, government incentives, and economic impact."
}
]
}'"Investigate the latest developments in CRISPR gene editing technology.
Include recent FDA approvals, ethical considerations, and future applications
in medicine. Focus on peer-reviewed studies from the last 2 years."
# [Compelling Headline] π°
## Executive Summary
Brief overview of key findings...
## Background & Context
Historical context and current landscape...
## Key Findings
- Main discoveries with supporting evidence
- Statistical data and expert quotes
- Comparative analysis
## Impact Analysis
Current implications and stakeholder perspectives...
## Future Outlook
Emerging trends and expert predictions...
## Sources & Methodology
List of sources analyzed and research approach...# Build the image
docker build -t research-agent .
# Run container
docker run -d \
-p 3773:3773 \
-e OPENAI_API_KEY=your_key_here \
--name research-agent \
research-agent
# Check logs
docker logs -f research-agentdocker-compose.yml
version: '3.8'
services:
research-agent:
build: .
ports:
- "3773:3773"
environment:
- OPENAI_API_KEY=${OPENAI_API_KEY}
restart: unless-stoppedRun with Compose:
# Start with compose
docker-compose up -d
# View logs
docker-compose logs -fresearch-agent/
βββ research_agent/
β βββ __init__.py # Package initialization
β βββ main.py # Main agent implementation
βββ agent_config.json # Bindu agent configuration
βββ pyproject.toml # Python dependencies
βββ Dockerfile # Multi-stage Docker build
βββ docker-compose.yml # Docker Compose setup
βββ README.md # This documentation
βββ .env.example # Environment template
βββ uv.lock # Dependency lock file
GET http://localhost:3773/healthResponse:
{"status": "healthy", "agent": "Research Agent"}POST http://localhost:3773/chat
Content-Type: application/json
{
"messages": [
{"role": "user", "content": "Your research query here"}
]
}# Install test dependencies
uv sync --group dev
# Run tests
pytest tests/
# Test with specific API key
OPENAI_API_KEY=test_key python -m pytest# Start agent
python research_agent/main.py &
# Test API endpoint
curl -X POST http://localhost:3773/chat \
-H "Content-Type: application/json" \
-d '{"messages": [{"role": "user", "content": "Test research query"}]}'-
"ModuleNotFoundError"
uv sync --force
-
"Port 3773 already in use" Change port in
agent_config.jsonor kill the process:lsof -ti:3773 | xargs kill -9
-
"No API key provided" Check if
.envexists and variable names match. Or set directly:export OPENAI_API_KEY=your_key -
Docker build fails
docker system prune -a docker-compose build --no-cache
bindu- Agent deployment frameworkagno- AI agent frameworkopenai- OpenAI clientrequests- HTTP requestsrich- Console outputduckduckgo-search- Web searchnewspaper4k- Article parsingpython-dotenv- Environment management
pytest- Testing frameworkruff- Code formatting/lintingpre-commit- Git hooks
We welcome contributions! Please follow these steps:
- Fork the repository
- Create a feature branch:
git checkout -b feature/improvement - Make your changes following the code style
- Add tests for new functionality
- Commit with descriptive messages
- Push to your fork
- Open a Pull Request
Code Style:
- Follow PEP 8 conventions
- Use type hints where possible
- Add docstrings for public functions
- Keep functions focused and small
MIT License - see LICENSE file for details.
- Developer: Paras Chamoli
- Framework: Bindu - Agent deployment platform
- Agent Framework: Agno - AI agent toolkit
- Search Tools: DuckDuckGo Search API
- Content Parsing: Newspaper4k library
- π Bindu Directory: bindus.directory
- π Bindu Docs: docs.getbindu.com
- π GitHub: github.com/ParasChamoli/research-agent
- π¬ Discord: Bindu Community
Built with β€οΈ by Paras Chamoli
Transforming research with AI-powered investigative journalism
β Star on GitHub β’ π Register on Bindu β’ π Report Issues
Note: This agent follows the Bindu pattern with lazy initialization and secure API key handling. It boots without API keys and only fails at runtime if keys are needed but not provided.