DutyBot: Your on-duty companion

Free, locally run AI for UK criminal legal definitions. Clear answers to natural-language questions — no long documents, just instant results.

Free and open-source. Non-commercial use only.

DutyBot demo — asking a UK criminal law question and receiving a source-checked answer

Features

Instant Legal Definitions

DutyBot explains UK criminal legal definitions in plain English. Ask a question, get a clear, structured answer — no trawling through documents.

Natural Language Queries

Ask questions in plain English, just as you would to a colleague.

Structured Breakdowns

Offence elements, key terminology, and practical notes — all clearly laid out.

Save Time

Turn legal language into digestible summaries in seconds.

title

Source-Checked Answers

DutyBot generates an answer, then searches legislation.gov.uk in the background to check it. When sources are found, they are displayed with direct links to the matching legislation.

Automatic Source-Checking

Every response is checked against legislation.gov.uk — no extra steps needed.

Transparent Sources

See how many sources were found and expand to view matching legislation titles, URLs, and snippets.

Trust But Verify

The sources panel tells you when a response has been checked, not just generated.

title

Free and Local

DutyBot runs entirely on your own machine. No cloud, no subscriptions, no data leaving your computer. Download from GitHub and run with Docker.

Zero Cloud Dependencies

Everything runs locally — your questions never leave your machine.

Free Forever

Open-source and non-commercial. No subscriptions, no paywalls, no hidden costs.

Works on Your Hardware

Runs on NVIDIA GPUs for speed, or CPU-only on any machine.

title

How It Works

DutyBot generates answers using an LLM, then checks them against official legislation sources.

01

Ask a Question

Type your question in plain English. For example: "What are the points to prove for Section 18 GBH?"

02

AI Generates an Answer

DutyBot uses a domain-adapted language model trained on UK criminal law to produce a clear, structured response.

03

Automatic Verification

In the background, DutyBot searches legislation.gov.uk to find official sources that match the answer.

04

Sources Displayed

If sources are found, a "Sources" panel appears showing how many matches were found on legislation.gov.uk with direct links.

Install DutyBot

DutyBot is free to run on your own machine. Just three steps.

1. Clone the repository

Download the project files from GitHub.

git clone https://github.com/dwain-barnes/dutybot.git && cd dutybot

2. Start with Docker

Run on CPU (any machine) or with NVIDIA GPU acceleration.

# CPU mode (works on any machine)
docker compose up --build
# GPU mode (NVIDIA, faster)
docker compose --profile cuda up --build --scale llama-server=0

3. Open in your browser

The model downloads automatically on first launch (~15 GB). Then open:

http://localhost:5000
View on GitHub

Requires Docker Desktop v24+ with Compose v2. Minimum 16 GB RAM.

Frequently Asked Questions

Have a question?

contact@eryrilabs.com