KAOS — the Kelvin Agentic Operating System

Open-source legal AI.

The alternative to Harvey and Legora. Self-hosted. Auditable. Every answer traceable to a page.

find_change_of_control.py
from kaos_pdf import parse_pdf
from kaos_content import search_document
# Pull every change-of-control clause from a signed deal.
doc = parse_pdf("merger_agreement.pdf")
hits = search_document(doc, "change of control", top_k=10).results
for hit in hits:
print(f"page {hit.page}, score {hit.score:.2f}")
print(f" {hit.text[:120]}…")
# page 14, score 8.21
# Upon a Change of Control, each Holder may require the Company to
# repurchase its Notes at 101% of the principal amount, plus accrued…
pip install kaos-pdf kaos-content  ·  Python ≥3.13  ·  github.com/273v
Runs on your hardware, not a vendor cloud Citations on every answer Works inside Claude Code, Codex, Cursor, and VS Code Open source — Apache-2.0, no lock-in

How it compares

What KAOS does. What everyone else doesn't.

Six capabilities a partner or CIO actually asks about, the day they evaluate a legal-AI vendor.

Capability
KAOS open-source
Harvey proprietary
CoCounsel proprietary
Legora proprietary
Open-source code
read it, audit it, extend it
Self-host inside your firm
a laptop, your servers, or your cloud account
Documents never leave your environment
no vendor cloud on the prompt path
Bring your own corpus
your DMS, your S3, your matter rooms
partial
partial
partial
Cite the page it answered from
page + paragraph + bbox on every claim
Your engineers can extend it
write a tool, ship an MCP server, fork the agent
no-code only
custom workflows
no-code only
full partial not available See the full comparison table →

What firms do with it

Where legal teams put it to work today.

Each example below runs on documents you control, with a citation trail you can hand to a partner, a regulator, or a court.

Research with verifiable citations

Ask a legal question, get an answer with the cases, statutes, and pages it relies on — each linked to the exact source so you can check it in one click. When a cite doesn't support the claim, the system flags it instead of hiding it. The final judgment stays with you; this is built for review, not autopilot.

Draft with a full audit trail

Generate a memo, summary, or first-pass draft from your own documents. Each sentence in the output points back to the page and paragraph it came from, so a partner or compliance reviewer can confirm every line.

Review a deal room with cost limits

Run extraction, Q&A, and summary across thousands of contracts. Set a per-matter spending cap before the work starts. Watch the meter as it runs. Stop the job when the cap is hit, with the partial output preserved.

Why KAOS

What a hosted vendor cannot give you.

The architecture choices behind these answers are written up for engineers and CIOs on /why-kaos.

Stays inside your network

The system runs wherever you put it — a laptop, your own servers, or your own cloud account. Documents and prompts never leave your environment. Privileged work product stays under your DMS, your retention rules, and your audit logs.

Cites the page it answered from

Every answer carries a pointer back to the page and paragraph that produced it. When the system doesn't have the evidence to answer, it refuses and says so. No silent guessing, no invented cases, no fabricated quotes.

Open source, Apache-2.0

The code is public — one repository per package. Your security team can read it, your IT can fork it, and the license is Apache-2.0, so you are not locked into a vendor's release schedule or a vendor's pricing. Every dependency is license-audited: zero GPL/AGPL in the tree.

Open source is only a promise if you can check it. Every package is tracked on a public compliance dashboard — signed builds, SBOMs, and a zero-GPL/AGPL dependency tree, each claim linked to evidence. Security & supply chain →

Where the data lives

Documents, model, and audit log all sit inside your firm.

A hosted product sends your privileged work product across a vendor boundary on every prompt. KAOS does not have a vendor boundary. The diagram below is the architecture, not a marketing claim.

Documents your DMS, your S3 Model self-hosted or your key Audit log your retention rules Citations page · paragraph · bbox Outputs memos · reviews · answers Your firm's network no vendor boundary on the prompt path

From a document to a checkable answer

Every answer keeps a pointer back to the page it came from.

A reviewer can follow the chain in either direction. From the cited paragraph back to the AI’s claim, or from the AI’s claim back to the page and bounding box on the source document.

Source PDF 01 Extract 02 Typed model 03 Search hit 04 AI call 05 Cited answer 06 brief contract filing exhibit text + tables page + bbox paragraph IDs paragraphs sections footnotes tables relevant span ranked with offsets grounded prompt cost-capped cited inputs page · paragraph cite you can verify refusal if no support OUTCOME