Skip to main content

A tool for conducting deep research on a given topic, using a combination of LLMs, search engines, and other tools.

Project description

khojkar

khojkar (pa: ਖੋਜਕਾਰ, ipa: /kʰoːd͡ʒ.kɑːɾ/) is a deep research agent.

Installation

Prerequisites

  • Python 3.12
  • uv - Fast Python package installer and resolver

Quick Start (PyPI)

The easiest way to run khojkar is directly using uvx, which will fetch it from PyPI:

# Run directly from PyPI using uvx
uvx khojkar research --topic "Your research topic" --output report.md

To set up credentials when using this method, create a .env file in your current working directory with your API keys. uvx will automatically load environment variables from a .env file.

Setup Credentials

khojkar uses LLMs via the LiteLLM library, which requires API keys for the models you want to use.

  1. Create a .env file in your current working directory:

    touch .env
    
  2. Add your API keys to the .env file. You only need the key for the model you intend to use. The default is gemini/gemini-2.0-flash, which requires the GEMINI_API_KEY. For other providers like OpenAI or Anthropic, you would use OPENAI_API_KEY or ANTHROPIC_API_KEY respectively. You also need to add credentials for the Google Programmable Search Engine: SEARCH_ENGINE_ID and SEARCH_ENGINE_API_KEY.

    # Required for the default model (gemini/gemini-2.0-flash)
    GEMINI_API_KEY=your_gemini_api_key
    
    # Required for Google Programmable Search Engine
    SEARCH_ENGINE_ID=your_search_engine_id
    SEARCH_ENGINE_API_KEY=your_search_engine_api_key
    
    # Optional: add other LLM API keys as needed
    # OPENAI_API_KEY=your_openai_api_key
    # ANTHROPIC_API_KEY=your_anthropic_api_key
    

    Note: Refer to the LiteLLM documentation for the specific environment variable names required for different LLM providers.

Usage

Basic Usage:

khojkar research --topic "Your research topic" --output report.md

Advanced Options:

# Use a different model
khojkar research --topic "Your research topic" --model "openai/gpt-4o" --output report.md

# Limit research steps
khojkar research --topic "Your research topic" --max-steps 5 --output report.md

# Use multi-agent research mode
khojkar research --topic "Your research topic" --multi-agent --output report.md

License

See LICENSE file for details.

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

khojkar-0.4.0.tar.gz (29.9 kB view details)

Uploaded Source

Built Distribution

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

khojkar-0.4.0-py3-none-any.whl (38.2 kB view details)

Uploaded Python 3

File details

Details for the file khojkar-0.4.0.tar.gz.

File metadata

  • Download URL: khojkar-0.4.0.tar.gz
  • Upload date:
  • Size: 29.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.10

File hashes

Hashes for khojkar-0.4.0.tar.gz
Algorithm Hash digest
SHA256 e68e81fb434d7d479c05820024ba4fa1fc0b3330e4a4fda22695320f9a577eea
MD5 46cb9066de6dcac6c111ebc52485cf93
BLAKE2b-256 9485ebe3e0983fc9ac21ad41388aed999910f9806caa5d87bc134d662a2b9827

See more details on using hashes here.

File details

Details for the file khojkar-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: khojkar-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 38.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.10

File hashes

Hashes for khojkar-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0d2c65abb0782fb2198411aebcf7d5683a94e410dc917fdaf9a7ca6db972f6a4
MD5 f672222ddcc98a9982e43ba4b6ee3b7d
BLAKE2b-256 b6a4aaa8e7a1fb9062ab213fd8e3bee4a15d917084d9eff5c3f733356dc23b0c

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