Open-source legal AI · Apache-2.0

Legal AI that cites — or declines.

ThesisLogic is an open-source legal AI workbench built around one uncompromising rule: no unverified citation ever reaches an attorney. Every authority in every answer is checked against your jurisdiction's validated corpus. What can't be proven is withheld — visibly, auditably, every time.

⚖ Any US jurisdiction 🖥 Fully local AI or cloud API 📜 Complete audit trail
 thesislogic · research — live model, proof-gated
❯ when may support be paid directly to a child enrolled in college?
Brief Answer. The court may order payments directly
to the child, conditioned on enrollment and attendance.
RSMo § 452.340  Mason v. Mason, 873 S.W.2d 631
A strict Form 14 application may be rebutted where the child
works and holds substantial savings. Rich v. Rich, 871 S.W.2d 618
Deviation also finds support in Larson v. Meridian, 999 S.W.4th 12
✕ PROOF GATE — 1 citation not found in the authority corpus. Fabricated authority blocked. Corrective regeneration requested…
✓ PROOF GATE PASSED — 3 of 3 citations verified against 47,141 Missouri authorities. Answer released with full provenance.
§ 01 · The problem

Fluent is not the same as true.

Courts across the United States have sanctioned attorneys for filings that cited cases which do not exist — invented by AI tools that were rewarded for sounding confident, not for being right. Bar associations now treat generative-AI competence as a professional responsibility issue.

In a regulated profession, an AI that is occasionally confidently wrong is worse than no AI at all.

The standard industry answer is a disclaimer. ThesisLogic's answer is architecture: verification isn't a review step someone might skip — it's a gate the output physically cannot bypass.

Typical AI tool

Generates from model memory. Citations sound plausible. A footnote asks you to "verify important information." The failure is discovered in court.

ThesisLogic

Generates only from a validated evidence package. Every citation is parsed and checked against the corpus. Unverified → the answer is downgraded, visibly, and logged.

Typical AI tool

Answers every question, including ones its sources can't support — the harder the question, the smoother the hallucination.

ThesisLogic

Measures whether retrieved evidence is actually responsive. Weak evidence → it declines, in plain language, and tells you why.

§ 02 · The architecture

Five stages. One guarantee.

Research and drafting run a pipeline where the model is the least trusted component. Document workflows — summaries, chronologies, comparisons, privilege review — are fully deterministic and never call a model at all.

Typed retrieval

Exact-citation, case-name, weighted full-text, and semantic search over your jurisdiction pack return authority records and holding-level spans — never anonymous text chunks.

Evidence package

Ranked authorities, their support-eligible language, and the exact set of citations any generation is allowed to use. Case captions can never count as support.

Deterministic answer

A complete memorandum is built from the evidence alone — before any model runs. If the model fails, this is what you get. It's always safe.

Constrained generation

Your model — local or cloud — writes under a citation contract: allowed authorities only, exact strings only, approved decline language for unsupported points.

The proof gate

Every citation-shaped string in the draft is verified against the corpus. One unverified citation → the draft is rejected, corrected once, or downgraded. Everything is audited.

§ 03 · Built for regulated practice

Trust features, not trust promises.

🔒

Local AI or cloud AI — your call

Run llama.cpp, Ollama, or vLLM entirely on your own hardware so client material never leaves the building; or use the Anthropic API under your firm's data terms; or run with no model at all — every workflow still works.

🗺

Any jurisdiction, by design

All jurisdiction knowledge lives in a data pack: authorities, citation formats, practice-area taxonomy, disclaimers. Scaffold a pack for any state in minutes; a step-by-step adoption guide walks your firm through migration.

📜

Forensic audit trail

Every answer records the model, the retrieval mix, the evidence package, the proof-gate verdict, and any downgrade — reconstructable per matter, displayed beside every answer.

🧱

Matter isolation

Documents and results are scoped to user + matter, enforced server-side from the session. Case knowledge never bleeds across matters that merely share a practice area.

⚙️

Deterministic-first workflows

Chronologies, comparisons, privilege flags, and summaries are computed, not generated — reproducible outputs with no model in the loop.

🧭

Shadow mode for rollout

Evaluate any model safely: attorneys see only deterministic answers while live output accumulates in the audit trail for review before you ever promote it.

§ 04 · Open source

Audit the tool that audits your AI.

Trust infrastructure for the legal profession shouldn't be a black box. ThesisLogic is Apache-2.0 licensed — every rule the proof gate enforces is readable, testable code.

  • Single Python service + SQLite — a firm's IT generalist can run and back it up
  • No telemetry; network calls go only to the model endpoints you configure
  • Validation prompt suite included — 22 automated checks across every workflow
  • There is deliberately no flag that lets unverified citations through
# Quickstart — any US jurisdiction
git clone https://github.com/alentra-dev/thesislogic
pip install -e thesislogic

# 1 · scaffold your jurisdiction pack
thesislogic pack scaffold my-state \
  --jurisdiction "My State"
thesislogic pack build my-state

# 2 · pick your AI posture (or none at all)
export THESISLOGIC_GENERATION_PROVIDER=openai_compatible
export THESISLOGIC_GENERATION_BASE_URL=http://127.0.0.1:8080

# 3 · verify, then serve
thesislogic doctor
thesislogic serve   # → workspace at :8600
§ 05 · Responsible AI, operationalized

Professional duties, mapped to running code.

Responsible AI in a regulated industry isn't a policy document — it's a set of engineering constraints. ThesisLogic is a working demonstration of that thesis, and a template for applying it anywhere the cost of a confident error is unacceptable: law, healthcare, finance, compliance.

Professional dutyEnforcing mechanism
Candor — no false authority Proof gate: unverified citations are structurally blocked; downgrades are visible and logged
Competence with technology Provenance rail: every answer shows its mode, model, evidence, and verification result
Confidentiality Fully local operation supported; zero telemetry; cloud AI is an explicit, revocable choice
Supervision of AI assistance Shadow mode, professional-review notices, review-only privilege flags
Recordkeeping & accountability Append-only audit trail keyed by request — every output is reconstructable
Honesty about limits Retrieval-confidence floor: weak evidence triggers a plain-language decline, not a fluent guess
§ 06 · The person behind it

Built by a practitioner, not a press release.

Udonna Eke-Okoro

AI practitioner Responsible-AI advocate Open-source builder

I design and ship AI systems for environments where being wrong has consequences — legal, and other highly regulated domains. My working thesis: the path to trustworthy AI is verifiable architecture, not vibes. ThesisLogic is that thesis in production form: retrieval you can inspect, generation you can constrain, and verification you can't turn off.

I take on a small number of consulting engagements — AI strategy and architecture for regulated industries, responsible-AI reviews of existing systems, and bespoke builds on the patterns you see here. If your organization needs AI it can defend in front of a regulator, a court, or a board:

$ contynu claude
Also by the same author — Contynu. Memory that persists: a model-agnostic continuity runtime that gives Claude, Codex, and Gemini shared, persistent memory across sessions and models. The same engineering philosophy — durable, inspectable AI infrastructure.
contynu.com · github.com/alentra-dev/contynu
§ 07 · Contact

Let's talk about AI your organization can defend.

Consulting engagements, speaking on responsible AI in regulated industries, ThesisLogic deployment help, or press — I read everything sent through this form.

Prefer email? Reach me at reveal address. This site sets no cookies and uses privacy-respecting, aggregate-only analytics.