Skip to content

Learn KAOS

Open agentic infrastructure for legal and financial work — learn it by running it. Every example on this site is a single command, and every snippet is tested.

Just show me it works

Run a deterministic sample in ~10 seconds — no API key, no setup. Start with your first example, then browse the gallery.

Teach me, step by step

Follow the guided tutorial spine from What is KAOS? onward — each tutorial builds on the last, all runnable offline.

I have a task to do

Jump to a how-to recipe — SQL over billing data, extract contract definitions, rank a graph, verify a citation.

I want the facts

Reference for every package — the package map, CLI, glossary, citation kinds, graph algorithms, compatibility.

Here’s the kind of task KAOS is built for: turn a signed contract into a reusable template. One command reads the PDF, finds the parties, amounts, and dates with an on-device model (no API key), swaps them for template fields, and redlines the changes:

Terminal window
uv run examples/contract-to-template.py
Found 4 field(s) with on-device NER (no LLM, no key):
{{date_1}} <- 'March 1, 2026'
{{party_1}} <- 'Acme Corporation'
{{party_2}} <- 'Globex Industries'
{{amount_1}} <- '$50,000'
Redline (contract → template): 4 fields parameterized, 8 tracked change(s) → redline.docx

That’s the pattern: 56 tested examples, each one uv run away, most fully offline. See how it works → · browse them all →

  • One command per example. Every sample is a self-contained PEP 723 script — uv run examples/<name>.py, no clone, no virtualenv juggling.
  • Tested, not aspirational. The code you see is imported byte-for-byte from a file that runs in CI. If a snippet would break, the build fails.
  • Offline by default. LLM examples use a deterministic in-process fake model, so they run for free with no API keys — and switch to a real provider with one environment variable.