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
Option 1: Direct Usage with uv
You can run khojkar directly without cloning the repository using uvx:
uvx khojkar --from git+https://github.com/amandeepsp/khojkar.git research --topic "Your research topic" --output report.md
To set up credentials when using this method, create a .env file in your current directory with your API keys. uvx will automatically load environment variables from a .env file in the current working directory.
Option 2: Clone and Install
# Clone the repository
git clone https://github.com/yourusername/khojkar.git
cd khojkar
# Install using uv
uv venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
uv pip install -e .
Setup Credentials
khojkar uses LLMs via the LiteLLM library, which requires API keys for the models you want to use.
-
Create a
.envfile in the root directory (if running via Option 2: Clone and Install) or in your current working directory (if running via Option 1: Direct Usage withuv).touch .env -
Add your API keys to the
.envfile. You only need the key for the model you intend to use. The default isgemini/gemini-2.0-flash, which requires theGEMINI_API_KEY. For other providers like OpenAI or Anthropic, you would useOPENAI_API_KEYorANTHROPIC_API_KEYrespectively. You also need to add credentials for the Google Programmable Search Engine:SEARCH_ENGINE_IDandSEARCH_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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file khojkar-0.3.2.tar.gz.
File metadata
- Download URL: khojkar-0.3.2.tar.gz
- Upload date:
- Size: 27.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d6525a26e8dd5e596067c7f11bd57d674ba8c3e55416c0a3b1616109e201f98f
|
|
| MD5 |
851df80a04eb4f961fff3f32dbc7e374
|
|
| BLAKE2b-256 |
be6efedeb5e2de6c305047dcf4fa1f16b1e214fe34f3c8fdc04079b803756357
|
File details
Details for the file khojkar-0.3.2-py3-none-any.whl.
File metadata
- Download URL: khojkar-0.3.2-py3-none-any.whl
- Upload date:
- Size: 35.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e0ed511c42b9fa42f2f9042876746fecfaed6b53f329e7a2cf24f4fa541ce061
|
|
| MD5 |
30e63322926ee22c3a1417df3d718934
|
|
| BLAKE2b-256 |
0053aef4c379bac76265de03b071f6bae2c7af0528064ae2308c51f547024af3
|