Skip to main content

An AI-powered deep research assistant in python

Reason this release was yanked:

bug

Project description

🐍 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.

video demo

alt text

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_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:

  1. Enter your research topic
  2. Set research breadth (2-10, default 4)
  3. Set research depth (1-5, default 2)
  4. Answer follow-up questions
  5. 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:

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Install development dependencies:
pip install pre-commit
pre-commit install
  1. Make your changes
  2. Commit your changes (git commit -m 'Add amazing feature')
  3. Push to the branch (git push origin feature/amazing-feature)
  4. Open a Pull Request

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

deep_research_py-0.1.3.tar.gz (1.8 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

deep_research_py-0.1.3-py3-none-any.whl (13.6 kB view details)

Uploaded Python 3

File details

Details for the file deep_research_py-0.1.3.tar.gz.

File metadata

  • Download URL: deep_research_py-0.1.3.tar.gz
  • Upload date:
  • Size: 1.8 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.27.2

File hashes

Hashes for deep_research_py-0.1.3.tar.gz
Algorithm Hash digest
SHA256 8dc382e4c1f739cdd0d3af819db797e008211cae83a7a1fc7edb6545b17578bb
MD5 779cbb16dfcac13a90a46bf16d9247a2
BLAKE2b-256 f5d59b95743b50c67052db2609d140916b89668355cb5ecba0f10385c8b90569

See more details on using hashes here.

File details

Details for the file deep_research_py-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for deep_research_py-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 121037739aedfbb3a587ed627bda2813ff0e18c361b2144487f4410e5f5afcef
MD5 41e04a5e85ea049c7d77480c98034292
BLAKE2b-256 71bd07fa21f5e07e326a7ad8ab5ecdc930c17069b9d0d253b9ebfd9228e1c39c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page