Open source · Apache 2.0 · Self-hosted

Legal AI your team actually owns.

LQAI is a self-hosted AI platform for legal teams. Bring your own keys, run it where you want, own your data — conversational chat, verified citations, playbooks and tabular review, with every skill open and readable.

LQAI chat — self-hosted, bring-your-own-key, with skills and matter-scoped projects
LQAI chat · self-hosted · bring-your-own-key
Get started · ~15 minutes

Run it in three commands

You need Docker and one model key, or Ollama for fully offline. The stack comes up at localhost:3000 with a first-run admin account.

$ git clone https://github.com/LegalQuants/lq-ai.git
$ cd lq-ai && cp .env.example .env # add one provider key
$ docker compose up -d # → http://localhost:3000

Prefer the long version? Read the 20-minute quickstart — clone to first cited NDA review.

AnthropicOpenAIAzure OpenAIOllama — local

Bring your own model — plus Ollama for fully local inference. Run privileged matters air-gapped on Tier 1.

Pre-release · v0.4.x · M1–M4 shipped — deployable today; some edges are deferred and listed in HONEST-STATE.md.

What it does

Built for the work lawyers actually do

Citation engine
Every citation verified
A four-stage cascade checks each citation against the source at character precision. Rendered green, yellow or red — never confident-looking wrong text.
Shipped · M2
Skills
Open, forkable work product
Skills are readable files in the Claude Skills format. One click shows the actual SKILL.md behind any answer — read it, debug it, fork it.
Shipped · M1
Playbooks
Automated contract review
Codify your positions and let the executor retrieve → classify → redline → compile. Five built in: NDA (mutual/unilateral), MSA, DPA.
Shipped · M3
Tabular review
Many documents at once
A row per document, a column per question — term length, survival and governing law across thirty NDAs at once. Source-linked cells, XLSX export.
Shipped · M3
Anonymization
Redact before it leaves
Names, parties, case and matter numbers are pseudonymized before requests reach a cloud model, then rehydrated on the way back. Never persisted.
Shipped · M2
Inference tiers
Know where data goes
A badge shows which tier each chat runs on, from local-only to managed. Skills and matters can enforce a privacy floor the gateway refuses to cross.
Shipped · M1
Matters
Scoped to the work
Projects bind chats, files, skills and context to a single matter. Flag one privileged to force a minimum inference tier — down to fully local — and mark every entry in the log.
Shipped · M1
Audit log
Compliance is one query
An append-only record of every action with privilege, provider and routing-tier columns. Privileged-matter evidence is a single filtered query.
Shipped · M1
Why open source

Every artifact that shapes an answer is visible work product.

Most legal-AI tools are closed SaaS: you pay per seat for a hidden system prompt and send privileged files to someone else’s cloud. LQAI inverts that. The skills, the playbooks, the citation logic — all open. Click view this skill on any answer and read the exact file that produced it.

You do not take our word for a single claim on this page. The verification path runs through code you can read — including the parts not wired yet, which we list honestly in HONEST-STATE.md.

A look inside

See it before you install

Playbooks — codified legal positions for automated contract review
Playbooks · automated contract review against your positions
Audit log — append-only record with privilege and routing-tier columns
Audit log · privilege and routing on every action
Project status

Shipped, with an honest roadmap

M1 through M4 are shipped. Forward-looking work — in-Word surfaces, the contract relationship graph, the MCP client — is community-driven and listed with verification paths.

MilestoneStatusWhat landed
M1 — Foundation✓ ShippedSelf-hostable release, 10 starter skills, Projects, Org Profile, tier awareness, hybrid retrieval.
M2 — Citations + privacy✓ ShippedFour-stage Citation Engine and the anonymization layer with custom legal recognizers.
M3 — Playbooks + review✓ ShippedPlaybooks and tabular review end-to-end; Word add-in scaffold; Slack/Teams intake plumbing.
M4 — Autonomous layer✓ ShippedOpt-in background agents under hard cost, halt and phase-gate brakes. Off by default.
Open contributions

Help build it

LQAI is built in the open. Open jobs are read live from the repo — filter by what you are and open the one-page spec. You do not need to be a coder; many tasks are made for lawyers and compliance people.

EASIEST-CONTRIBUTIONS.md · live · 8 open

  1. 01Pick a task.Browse the live board above — each shows who it is for, how big it is, and how ready it is. Many need no code at all.
  2. 02Claim it.Open the spec, file a GitHub issue named after the job, and comment “I’d like to take this.” A maintainer replies in about a week.
  3. 03Build and hand it in.Each task links to a one-page mini-PRD with a clear “done”. Open a pull request; once it passes the checklist it ships — with your name on it.

Stuck? Ask on GitHub. People will help — there are no dumb questions.

Run legal AI you control.

Free, open source, self-hosted. Bring your own keys and have it running in about fifteen minutes.