An intelligent agent that autonomously searches academic databases, analyzes research papers, and generates comprehensive structured reports in response to research questions.
The Autonomous Research Agent is designed to streamline the academic research process by automating the discovery, analysis, and synthesis of scholarly literature. It accepts natural language research questions as input and produces detailed, structured reports that compare methodologies, synthesize findings, and identify research gaps.
- Intelligent Query Processing: Transforms natural language questions into optimized search queries
- Multi-Source Data Acquisition: Retrieves papers from arXiv, Semantic Scholar, PubMed, and CrossRef
- Advanced Content Analysis: Extracts methodologies, findings, and relationships between papers
- Comprehensive Report Generation: Creates structured reports with visualizations and proper citations
- Robust Changelog System: Tracks all code changes with semantic versioning
- Production-Ready Architecture: Containerized, scalable, and secure implementation
autonomous_research_agent/
├── config/ # Configuration settings
├── core/ # Core functionality
├── data_acquisition/ # API clients for academic databases
├── content_processing/ # Document parsing and text extraction
├── analysis/ # NLP and comparative analysis
├── report_generation/ # Report creation and formatting
├── changelog/ # Version control and change tracking
├── ui/ # User interfaces (CLI and API)
├── utils/ # Helper utilities
├── tests/ # Test suite
└── docs/ # Documentation
- Architecture Design: System components, data flow, and integration points
- Technical Implementation: Code structure, API integrations, and model selection
- Research Pipeline: Step-by-step process from query to final report
- Output Specifications: Detailed structure for the research report
- Changelog System: Implementation of version control and change tracking
- Deployment Strategy: Making the agent production-ready
- Python 3.9+
- Docker and Docker Compose
- Git
-
Clone the repository:
git clone https://github.com/Asfandyar1213/Autonomous-research-agent.git cd Autonomous-research-agent
-
Create a virtual environment:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies:
pip install -r requirements.txt
-
Set up API keys:
cp config/api_keys.example.py config/api_keys.py # Edit config/api_keys.py with your API keys
# Basic usage with a research question
python main.py --query "What are the recent advances in transformer architectures for natural language processing?"
# Specify output format
python main.py --query "..." --format pdf
# Set search parameters
python main.py --query "..." --max-papers 50 --date-range "2020-2023"
# Start the API server
python -m ui.api
# In another terminal, make a request
curl -X POST http://localhost:8000/research \
-H "Content-Type: application/json" \
-d '{"query": "What are the recent advances in transformer architectures for natural language processing?", "max_papers": 50}'
# Build and start services
docker-compose up -d
# Make a request to the API
curl -X POST http://localhost:8000/research \
-H "Content-Type: application/json" \
-d '{"query": "What are the recent advances in transformer architectures for natural language processing?"}'
# Run all tests
pytest
# Run tests with coverage
pytest --cov=./ --cov-report=xml
# Run specific test module
pytest tests/test_query_processor.py
# Check code style
flake8 .
# Format code
black .
# Sort imports
isort .
-
Create a feature branch:
git checkout -b feature/your-feature-name
-
Implement your changes
-
Add tests for your feature
-
Record changes in the changelog:
python -m changelog.cli add --component "component_name" --type "feat" --description "Added new feature X"
-
Submit a pull request
Contributions are welcome! We appreciate all contributions, from reporting bugs and improving documentation to implementing new features. Here's how you can contribute:
- Fork the repository
- Create a feature branch:
git checkout -b feature/your-feature-name
- Commit your changes:
git commit -m "Add some feature"
- Push to your branch:
git push origin feature/your-feature-name
- Open a pull request
Please make sure your code follows our coding standards and includes appropriate tests.
We expect all contributors to adhere to our Code of Conduct. Please read it before participating.
This project is licensed under the MIT License - see the LICENSE file for details.
- Academic API providers: arXiv, Semantic Scholar, PubMed, CrossRef
- Open-source NLP libraries: Hugging Face Transformers, spaCy, NLTK
- The research community for making knowledge accessible
Built by Asfandyar