🐍 Deep Research Assistant PY
An AI-powered research tool in Python that helps you explore topics in depth using AI and web search.
Save 200 dollars a month and use this tool
⭐ A python port with a little more cli pizzazz of https://github.com/dzhng/deep-research
Contribute all you want to this. It was fun tweaking it.
Project Structure
deep_research_py/
├── run.py # Main CLI interface
├── deep_research.py # Core research logic
├── feedback.py # Follow-up question generation
├── prompt.py # System prompts for AI
└── ai/
├── providers.py # AI service configuration
└── text_splitter.py # Text processing utilities
Features
- Interactive Research: Asks follow-up questions to better understand your needs
- Depth Control: Customize research breadth and depth
- Web Integration: Uses Firecrawl for reliable web content extraction
- Smart Synthesis: Combines multiple sources into coherent findings
- Beautiful CLI: Rich text interface with progress tracking
- Markdown Reports: Generates well-formatted research reports
Installation
uv tool install deep-research-py
Configuration
Set your API keys as environment variables:
# Required: OpenAI API key
export OPENAI_API_KEY=your-openai-key-here
# If you want to use a third-party OpenAI compliant API (e.g., OpenRouter or Gemini), add the following below:
# export OPENAI_API_ENDPOINT="http://localhost:1234/v1"
# If you want to use another model or your third-party OpenAI compliant API doesn't support o3-mini, add following below:
# export OPENAI_MODEL="<your_model_name>"
# Required: Firecrawl API key
export FIRECRAWL_API_KEY=your-firecrawl-key-here
# If you want to use your self-hosted Firecrawl, add the following below:
# FIRECRAWL_BASE_URL="http://localhost:3002"
Usage
Run the research assistant:
deep-research
You'll be prompted to:
- Enter your research topic
- Set research breadth (2-10, default 4)
- Set research depth (1-5, default 2)
- Answer follow-up questions
- Wait while it researches and generates a report
You can change the concurrency level by setting the --concurrency flag (useful if you have a high API rate limit):
deep-research --concurrency 10
You can get a list of available commands:
deep-research --help
Development Setup
Clone the repository and set up your environment:
# Clone the repository
git clone https://github.com/epuerta9/deep-research-py.git
cd deep-research-py
# Create and activate virtual environment
uv venv
source .venv/bin/activate
# Install in development mode
uv pip install -e .
# Set your API keys
export OPENAI_API_KEY=your-openai-key-here
export FIRECRAWL_KEY=your-firecrawl-key-here
# Run the tool
deep-research
Requirements
- Python 3.9 or higher
- OpenAI API key (GPT-4 access recommended)
- Firecrawl API key for web search
- Dependencies:
- openai
- firecrawl-py
- typer
- rich
- prompt-toolkit
- aiohttp
- aiofiles
- tiktoken
Output
The tool generates:
- A markdown report saved as
output.md - List of sources used
- Summary of key findings
- Detailed analysis of the topic
License
MIT
Contributing
Contributing
Contributions are welcome! Please follow these steps:
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Install development dependencies:
pip install pre-commit
pre-commit install
- Make your changes
- Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Metadata
Release files for deep-research-py 0.1.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| deep_research_py-0.1.5.tar.gz | 1.8 MB | Without provenance | Details for deep_research_py-0.1.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| deep_research_py-0.1.5-py3-none-any.whl | Python 3 | none | any | Details for deep_research_py-0.1.5-py3-none-any.whl |
Total release size: 1.9 MB
Release files / deep_research_py-0.1.5.tar.gz
| Download URL | deep_research_py-0.1.5.tar.gz |
|---|---|
| Size | 1.8 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
66137a0248ce89f93d37b718c42d924aaa44b3707a9c5bba48bc84044626b428
|
|
BLAKE2b-256 checksum How to use checksums |
bd2fb698e0d71f79b6a766a570df026bf8f884478eae761136baba5b83187ceb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-httpx/0.27.2
|
Release files / deep_research_py-0.1.5-py3-none-any.whl
| Download URL | deep_research_py-0.1.5-py3-none-any.whl |
|---|---|
| Size | 13.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
44545264ab3a86d4bbdeb45b9f5a8bf7a023e1901bbaf32dc210800ca9cae101
|
|
BLAKE2b-256 checksum How to use checksums |
624559c8067660f8d8ed8d8888cf8b9098c8c1b3e03233693ed13d5e40491494
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-httpx/0.27.2
|
Security for deep-research-py 0.1.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.