Metadata-Version: 2.4
Name: zori
Version: 0.4.0
Summary: An open-source multi-agent research assistant for your Zotero library
Project-URL: Homepage, https://github.com/nazbn/zori
Project-URL: Repository, https://github.com/nazbn/zori
Project-URL: Issues, https://github.com/nazbn/zori/issues
Author-email: Nazanin Bagherinejad <nazanin.bagherinejad@rwth-aachen.de>
License: MIT License
        
        Copyright (c) 2026 Nazanin Bagherinejad
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Keywords: academic,ai,llm,papers,rag,research,zotero
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Text Processing :: Indexing
Requires-Python: >=3.10
Requires-Dist: anthropic>=0.30
Requires-Dist: chromadb>=0.5
Requires-Dist: fastapi>=0.110
Requires-Dist: langchain-anthropic>=0.2
Requires-Dist: langchain-chroma>=1.1.0
Requires-Dist: langchain-classic>=1.0
Requires-Dist: langchain-community>=0.3
Requires-Dist: langchain-ollama>=0.2
Requires-Dist: langchain-openai>=0.2
Requires-Dist: langchain>=1.0
Requires-Dist: langgraph>=0.2
Requires-Dist: openai>=1.0
Requires-Dist: pdfplumber>=0.11
Requires-Dist: python-dotenv>=1.0
Requires-Dist: pyyaml>=6.0
Requires-Dist: pyzotero>=1.6
Requires-Dist: rich>=13.0
Requires-Dist: structlog>=24.0
Requires-Dist: typer>=0.12
Requires-Dist: uvicorn[standard]>=0.29
Provides-Extra: dev
Requires-Dist: pytest-asyncio>=0.23; extra == 'dev'
Requires-Dist: pytest>=9.0; extra == 'dev'
Requires-Dist: ruff>=0.4; extra == 'dev'
Provides-Extra: eval
Requires-Dist: deepeval>=2.0; extra == 'eval'
Provides-Extra: huggingface
Requires-Dist: langchain-huggingface>=0.1; extra == 'huggingface'
Requires-Dist: sentence-transformers>=3.0; extra == 'huggingface'
Provides-Extra: qdrant
Requires-Dist: qdrant-client>=1.9; extra == 'qdrant'
Description-Content-Type: text/markdown

<picture>
  <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/nazbn/zori/master/assets/logo-dark.svg">
  <img src="https://raw.githubusercontent.com/nazbn/zori/master/assets/logo-light.svg" alt="Zori" height="48">
</picture>

An open-source multi-agent research assistant that connects to your Zotero library.
Search, summarize, and explore your research papers through a conversational interface.

![Python](https://img.shields.io/badge/Python-3.10+-blue?logo=python&logoColor=white)
![LangChain](https://img.shields.io/badge/LangChain-1.0+-yellow)
![LangGraph](https://img.shields.io/badge/LangGraph-0.2+-orange)
![ChromaDB](https://img.shields.io/badge/ChromaDB-0.5+-purple)
![FastAPI](https://img.shields.io/badge/FastAPI-0.110+-teal?logo=fastapi&logoColor=white)
![License](https://img.shields.io/badge/License-MIT-green)
![PyPI](https://img.shields.io/pypi/v/zori)

## Features

- **Hybrid search** — combines semantic vector search and BM25 keyword search over your entire library
- **Summarization** — generates structured summaries and saves them as notes directly in Zotero
- **Web UI** — clean chat interface built on FastAPI; no browser issues, works on any platform
- **Conversational context** — references like "the first one" or "that paper" are resolved across turns
- **Flexible LLM support** — OpenAI, Anthropic, or Ollama (free, runs locally)

## Web UI

```bash
zori ui
```

Open `http://localhost:7860` in your browser. The web UI is the recommended interface on Windows, where terminal hyperlinks may not render correctly.

![Zori search results](https://raw.githubusercontent.com/nazbn/zori/master/assets/search-1.png)

![Zori structured paper summary](https://raw.githubusercontent.com/nazbn/zori/master/assets/summary-cdem.png)

![Zori paper summary saved as a Zotero note](https://raw.githubusercontent.com/nazbn/zori/master/assets/summary-cdem-2.png)

## Requirements

- A Zotero account with API access
- An LLM provider: OpenAI, Anthropic, or [Ollama](https://ollama.com) (free, runs locally)

## Setup

**1. Install**

```bash
pip install zori
```

<details>
<summary>Install from source</summary>

```bash
git clone https://github.com/nazbn/zori.git
cd zori
uv sync
```

When installed from source, prefix all commands with `uv run` (e.g. `uv run zori init`, `uv run zori ingest`, `uv run zori`).
</details>

**2. Initialize**

```bash
mkdir my-zori && cd my-zori
zori init
```

`zori init` creates `config.yaml` and `.env` in the current directory. Always run `zori` from this directory.

**3. Configure**

Edit `.env` with your Zotero API key and library ID, and `config.yaml` to choose your LLM and embeddings provider (see [LLM options](#llm-options) and [Embeddings options](#embeddings-options)).

**4. Ingest your library**
```bash
zori ingest
```
Downloads your Zotero PDFs, extracts text, and builds the search index in `.zori/`.
Run time depends on library size and embedding provider. You only need to do a full ingest once.
To index new or modified items added to Zotero since the last ingest, run `zori ingest --sync`.

**5. Start the assistant**

Web UI (recommended):
```bash
zori ui
```

Or use the terminal REPL:
```bash
zori
```

## Usage

Zori supports natural language queries for searching and summarizing papers:

```
> papers on diffusion models
> papers by Vaswani
> papers from 2023 on neural radiance fields
> summarize the first one
> find attention is all you need
> summarize it
```

Queries use hybrid search (keyword + semantic). References to previous results are resolved in context (e.g. "the first one", "that paper").

In the terminal REPL: type `exit` to quit, `--new-session` to reset conversation history.

## LLM options

| Provider | `config.yaml` | Requires |
|---|---|---|
| OpenAI | `provider: openai` | `OPENAI_API_KEY` in `.env` |
| Anthropic | `provider: anthropic` | `ANTHROPIC_API_KEY` in `.env` |
| Ollama (free, local) | `provider: ollama` | [Ollama](https://ollama.com) running locally |

## Embeddings options

LLM and embeddings are configured independently — any combination works.

| Provider | `config.yaml` | Setup |
|---|---|---|
| OpenAI | `provider: openai`, `model: text-embedding-3-small` | `OPENAI_API_KEY` in `.env` |
| Ollama (free, local) | `provider: ollama`, `model: nomic-embed-text` | Ollama running + `ollama pull nomic-embed-text` |
| HuggingFace (free, local) | `provider: huggingface`, `model: <model>` (e.g. `all-MiniLM-L6-v2`) | `pip install "zori[huggingface]"` |

## Observability (optional)

Zori supports [LangSmith](https://smith.langchain.com) tracing. To enable it, add your API key to `.env`. Traces are sent to your LangSmith account.

Retrieval quality can be measured with the optional [DeepEval](https://github.com/confident-ai/deepeval) eval suite — see `scripts/eval_dataset.yaml.example`.

## License

MIT — see [LICENSE](LICENSE).

## Contact

For questions, bug reports, or feature requests, open an issue on the [GitHub issue tracker](https://github.com/nazbn/zori/issues)
or reach out at nazanin.bagherinejad@rwth-aachen.de.

---

*This repository was developed with the assistance of [Claude](https://claude.ai) (Anthropic).*
