Extract legal citations
uv run examples/citations-extract.py
Packages: kaos-citations
Every example below is a self-contained PEP 723 script. Run any of them with one command — no clone, no virtualenv:
uv run https://raw.githubusercontent.com/273v/learn-kaos/main/examples/<id>.pyCards marked offline need no API key and run deterministically in this site’s CI. needs key marks examples that call a live LLM provider.
Extract legal citations
uv run examples/citations-extract.py
Packages: kaos-citations
Author your first tool
uv run examples/first-tool.py
Packages: kaos-core
Build a document
uv run examples/build-a-document.py
Packages: kaos-content
Offline LLM with FunctionClient
uv run examples/functionclient-chat.py
Packages: kaos-llm-client
A typed LLM call
uv run examples/typed-call-offline.py
Packages: kaos-llm-core, kaos-llm-client
Your first agent
uv run examples/first-agent.py
Packages: kaos-agents, kaos-llm-client, kaos-llm-core
Scaffold a full app
uv run examples/scaffold-app.py
Packages: kaos-ui
Verify a citation
uv run examples/grounded-citations.py
Packages: kaos-llm-core
Serve tools over MCP
uv run examples/serve-over-mcp.py
Packages: kaos-mcp, kaos-core
Research agent with citations
uv run examples/research-agent.py
Packages: kaos-agents, kaos-llm-client, kaos-llm-core
Rank text with BM25
uv run examples/bm25-search.py
Packages: kaos-nlp-core
Friendly session handles
uv run examples/names-seeded.py
Packages: kaos-names
Fail over across providers
uv run examples/provider-failover.py
Packages: kaos-llm-client
SQL over billing data
uv run examples/sql-analytics.py
Packages: kaos-tabular
Extract contract definitions
uv run examples/contract-definitions.py
Packages: kaos-content
Read & write Office docs
uv run examples/office-roundtrip.py
Packages: kaos-office, kaos-content
Mini research pipeline
uv run examples/research-over-corpus.py
Packages: kaos-nlp-core, kaos-llm-core
Extract a PDF
uv run examples/pdf-extract.py
Packages: kaos-pdf, kaos-content
Extract a web page
uv run examples/web-extract.py
Packages: kaos-web, kaos-content
Semantic embeddings
uv run examples/embeddings.py
Packages: kaos-nlp-transformers
Find near-duplicates
uv run examples/near-duplicates.py
Packages: kaos-nlp-core
Agent permissions
uv run examples/agent-permissions.py
Packages: kaos-agents
Typed module settings
uv run examples/typed-settings.py
Packages: kaos-core
Parse an email
uv run examples/email-forensics.py
Packages: kaos-source
Query a knowledge graph
uv run examples/knowledge-graph.py
Packages: kaos-graph
Cluster a corpus
uv run examples/cluster-documents.py
Packages: kaos-ml-core, kaos-nlp-transformers
Delegate to a sub-agent
uv run examples/agent-delegation.py
Packages: kaos-agents
Optimize a program
uv run examples/optimize-program.py
Packages: kaos-llm-core
Pause for approval
uv run examples/pause-resume.py
Packages: kaos-agents
Trace with OpenTelemetry
uv run examples/export-otel.py
Packages: kaos-agents
Cap LLM cost
uv run examples/cap-cost.py
Packages: kaos-llm-core
Add an app template
uv run examples/add-template-kind.py
Packages: kaos-ui
Review a contract
uv run examples/findings-review.py
Packages: kaos-agents, kaos-content, kaos-nlp-core
Parse legal citations
uv run examples/parse-citations.py
Packages: kaos-citations
Chunk a document
uv run examples/chunk-a-document.py
Packages: kaos-nlp-core
Triage a file before ingest
uv run examples/triage-before-ingest.py
Packages: kaos-nlp-core, kaos-pdf
Selective OCR for hybrid PDFs
uv run examples/selective-ocr.py
Packages: kaos-pdf
Redline a contract
uv run examples/redline-contract.py
Packages: kaos-office, kaos-content
Extract entities (local NER)
uv run examples/extract-entities.py
Packages: kaos-nlp-transformers
Detect & redact PII
uv run examples/detect-pii.py
Packages: kaos-nlp-transformers
Conflict checking
uv run examples/conflict-check.py
Packages: kaos-nlp-core
Find money/dates (no model)
uv run examples/find-financial-terms.py
Packages: kaos-content, kaos-nlp-core
Generate synthetic data
uv run examples/generate-billing-data.py
Packages: kaos-names
Analyze billing data
uv run examples/analyze-billing.py
Packages: kaos-tabular, kaos-names
Contract → reusable template
uv run examples/contract-to-template.py
Packages: kaos-pdf, kaos-office, kaos-nlp-transformers
Litigation triage
uv run examples/uc-litigation-triage.py
Packages: kaos-llm-core
UTBMS billing codes
uv run examples/uc-billing-utbms.py
Packages: kaos-llm-core
Matter tagging
uv run examples/uc-matter-tagging.py
Packages: kaos-llm-core
Complaint database
uv run examples/uc-complaint-extract.py
Packages: kaos-llm-core
Contract abstraction
uv run examples/uc-contract-abstract.py
Packages: kaos-llm-core
Credit covenants
uv run examples/uc-credit-covenants.py
Packages: kaos-llm-core
IPO deal terms
uv run examples/uc-s1-deal-terms.py
Packages: kaos-llm-core
Expertise database
uv run examples/uc-expertise-extract.py
Packages: kaos-llm-core
Regulatory monitoring
uv run examples/uc-regulatory-monitoring.py
Packages: kaos-llm-core
Matter pricing
uv run examples/uc-matter-pricing.py
Packages: kaos-llm-core
Rank a graph with PageRank
uv run examples/graph-pagerank.py
Packages: kaos-graph