Sized for assembly
Eighteen Python packages with a strict dependency order. kaos-core sits underneath kaos-content; extraction modules sit on top. Siblings never import siblings, so installing one package never drags the rest in.
For developers
A typed document AST with span-level provenance, an MCP-native runtime, and a clean dependency graph across the Python and Rust modules. If you came from DSPy, LangChain, Pydantic-AI, Mirascope, or Instructor, the next few sections show what overlaps, where KAOS diverges, and what the platform makes easy when the work in front of you is a deal room or a brief, not a chatbot demo.
pip install 'kaos-agents[mcp,llm]'From install to a callable MCP tool
The same KaosTool subclass that an associate uses from Claude Code is the one your CI tests against. No wrapper layer, no rewrite to "expose for agents."
What the platform makes easy
Answer a question about a corpus with checkable citations, expose a firm-internal lookup as an MCP tool, and run a long agent across a real deal room with a hard spend cap. Every team building legal AI on top of LLMs writes some version of these three. KAOS gives you the typed, observable, auditable version on day one.
Index a deal room, a discovery production, or a regulatory file. Ask a question; get an answer back as Cited[T], with the page and passage each sentence rests on. Substring + NLI verification through kaos-citations flags any sentence whose source does not actually support it. The Rust BM25 path runs in ~600 µs median over 69K USC docs — fast enough that the bottleneck is the LLM, not the retriever.
Subclass KaosTool. Add metadata and a parameter schema. Register it on a runtime. The DMS lookup, the conflicts check, the matter-budget guard your firm already runs as scripts now show up as a tool an associate can call from Claude Code. kaos-mcp emits stdio, streamable HTTP, SSE, JSONL, WebSocket, and REST with no glue code on your side.
kaos-agents wires a typed memory model and named recipes — merger-agreement, spa-deal-points, lease, lpa, court-opinion, privilege-classification, corpus-qa, edgar-research, federal-register-research — behind a Runner. Walk a thousand-document deal room, with a per-matter spend cap, partial output preserved at the cap, and a hash-chained audit log a partner or insurer can read end to end.
Pick your entry
Each leaf is a clickable surface page. The full package list is at /packages. Prefer a guided route? Pick your path on learn-kaos, or start the tutorial spine at first-tool.
Familiar terrain
Signature and Program work the way you remember. The optimizers (BootstrapOptimizer, InstructionOptimizer, MIPROv2) are ported. What is new: programs serialize as schema-validated JSON instead of pickles, batch jobs survive a crash via a SQLite workspace, every program can be served as an MCP tool, and every step keeps Cited[T] provenance. Full head-to-head in the kaos-llm-core repository.
Closer to LangGraph in spirit (typed, plan-execute) than to LangChain's strings-in, strings-out chains. Recipes are JSON. Agent state is typed memory sections. Tools subclass KaosTool. There is no **kwargs shrug at the edges.
Same typed-output instinct. KAOS fills in what those libraries leave out: a transport layer (kaos-llm-client), a document AST (kaos-content), retrieval (kaos-nlp-core), and an agent runtime with memory and recipes (kaos-agents). Install one package or install the whole set.
kaos-llm-client keeps the provider-native escape hatch when you need it, and takes the per-provider retry, streaming, structured-output, and tool-calling boilerplate off your plate. create_client("anthropic:claude-haiku-4-5") and you are done.
Open-source proof
The numbers on this site come from the same code you would run. kaos status --json | jq '.tools | length' on a fresh install prints the canonical tool count.
The supply chain is checkable too: every package ships a PEP 740 build attestation and a CycloneDX SBOM, tracked on a public dashboard that signs its own snapshot. Verify a wheel with cosign, or ingest the schema'd JSON directly — see security & supply chain.
Eighteen Python packages with a strict dependency order. kaos-core sits underneath kaos-content; extraction modules sit on top. Siblings never import siblings, so installing one package never drags the rest in.
Every installed module exposes its tools as MCP servers. Run kaos serve once and Claude Code, Codex, Cursor, Gemini CLI, and VS Code see the whole tool surface — not a wrapper bolted on top.
Python 3.13 minimum, validated on 3.13 and 3.14. Pydantic v2 throughout. The Rust hot paths cross the boundary through PyO3 and maturin, with no C-extension build dance.
pypdfium2 instead of PyMuPDF. The embedding registry refuses to load model families with non-commercial or ambiguous licenses. A vendor or law firm can ship a KAOS-built product to clients without an AGPL audit blowing up the deal.
Built at 273 Ventures.