Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Getting started

This page takes you from a blank computer to a running app. You will: install Python, create a private environment for ailr, install ailr into it, then start the app and create your first project.

1. Install Python

ailr runs on Python 3.11 or newer. To check whether you already have it, open a terminal (Windows: PowerShell or Git Bash; macOS: Terminal) and type:

python --version

If it prints Python 3.11 or higher, you’re set. If the command isn’t found or the version is older, download the latest Python from python.org/downloads. On Windows, tick “Add Python to PATH” on the first screen of the installer. Without it, the python command won’t be found later.

2. Get the ailr code

ailr is installed from its source folder, so first you need the code on your computer. There are two ways to get it. If you’re not sure, use the ZIP.

Option A: Download the ZIP (no extra tools needed)

  1. Open the ailr page on GitHub: AILR repository.

  2. Click the green Code button, then Download ZIP.

  3. Unzip the downloaded file somewhere you’ll remember (e.g. your Documents folder). You’ll get a folder named something like AILR-AI-assisted-literature-review-pipeline.

Download the code as a ZIP from the green Code button on GitHub

Option B: Clone with git (if you already have git)

git clone https://github.com/QiuyuYu3/AILR-AI-assisted-literature-review-pipeline.git

Then move into the folder

Open a terminal and change into that folder. Everything from here runs from inside it:

cd path/to/AILR-AI-assisted-literature-review-pipeline

3. Create a virtual environment

A virtual environment is a private box that holds the packages ailr needs, kept separate from the rest of your computer so nothing clashes. Create one (named .venv); you do this once:

python -m venv .venv

Then activate it. This is the step people most often forget, and you repeat it every time you open a new terminal to work on ailr:

Your terminalActivation command
Windows, PowerShell.venv\Scripts\Activate.ps1
Windows, Git Bashsource .venv/Scripts/activate
macOSsource .venv/bin/activate
Linuxsource .venv/bin/activate

When it’s active you’ll see (.venv) at the start of the prompt. (To leave it later, type deactivate.)

4. Install ailr

With the environment active, install ailr and its optional features:

pip install -e ".[llm,pdf]"

The web UI and PostgreSQL support are built in (core dependencies). The optional extras are:

ExtraWhat it adds
llmAI provider SDKs (Anthropic, OpenAI, Gemini)
pdfPDF → markdown conversion

[ui] and [postgres] still work as no-op aliases.

The llm extra is what makes the real AI callable. It installs the provider SDKs that talk to Anthropic / OpenAI / Gemini. Install without it and ailr still runs, but only in Mock mode (placeholder values, no real calls). Keep [llm] in the command above unless you only ever intend to use Mock.

5. Start the app and create a project

With the environment active, start the app with no folder to open the project manager:

ailr ui

This opens ailr in your browser at http://localhost:8050.

project manager

The project manager is your home base. It appears whenever you launch ailr ui without naming a folder, and from here you set up or reopen a review:

Once a project exists, you can also reopen it directly by pointing the app at its folder:

ailr ui <project-folder>

Prefer the command line? ailr init my-review creates the same project folder without opening the app.

What’s in the project folder

Creating a project drops a few starter files into the folder. They are yours to edit. ailr fills them with a template just so nothing is blank; the criteria, prompts, and fields are what you replace with your own review’s specifics (your own AI can help you draft them). Most are editable from inside the app, so you rarely open them by hand.

File / folderWhat it’s forWhere you edit it
lit_review.yamlthe project’s settings: workflow modes, which AI model to use, and where the other files liveSettings page, Protocol → Workflow
criteria.yamlyour inclusion / exclusion criteria (structured, shared by screening and extraction)Protocol → Criteria
schema.yamlthe variables to extract, the structure of your extraction (mirrored to extraction_variables.json)Protocol → Variables
prompts/screening.txtthe instruction the AI follows when screening titles & abstractsAbstract → Workflow → Prompt
prompts/extraction.txtthe instruction the AI follows when extracting data from full textFull text → Workflow → Prompt
prompts/*_additional.txtfree-form extra notes appended to each stage’s prompt (start out empty)Workflow → Prompt, Additional instructions
data/raw/holds the reference files you importn/a
data/pdfs/export your Zotero PDFs here; they’re auto-linked when you open the full-text pagesn/a
data/markdown/holds the full text converted from PDF to markdownn/a

For a local (SQLite) project, your data also lands here as data/review.sqlite. On a PostgreSQL project that data lives in the shared database instead, not in the folder. See Core concepts.

Set an API key

To run the real AI (not the built-in Mock), export the provider’s API key in the same terminal before launching, then start the app from that terminal so the child process inherits it:

export ANTHROPIC_API_KEY="sk-ant-..."   # OpenAI: OPENAI_API_KEY · Gemini: GEMINI_API_KEY
ailr ui <project-folder>
settings, API key status

You can always work without a key using Mock mode, which fabricates schema-shaped values so you can click through the whole UI with no API call and no token cost.

Enter your reviewer ID

Each person enters their own reviewer ID at the top of the app before they start reviewing. It is stamped onto every decision and extraction, which is what makes inter-rater reliability (Cohen’s κ) and the audit trail possible, so set it once per session and keep it consistent.

The abstract and full-text stages carry this setting separately, so a review can divide the abstract queue and still have both people read every full text. See Protocol → Workflow.

What a project is

A project is a folder plus a database:

Settings (sidebar) groups the project’s own config into Project / Models / Prompts / Danger zone sub-tabs. Prompts is a read-only view of what each stage actually sends to the AI, with the criteria, schema, and additional instructions already filled in, so you can check the finished prompt without opening each Workflow page. Danger zone can clear all of a project’s data, or delete the project entirely, each guarded by typing the project name to confirm.

settings, project folder and databasesettings, the prompts as actually sent to the AIsettings, danger zone

See Core concepts for the details. Then, before importing anything, set up your protocol: the criteria and extraction variables everything else depends on.