# Kleene > Relational algebra for recursive model calls. Write declarative SQL (CallSQL); Kleene compiles joins, recursion, predicates and aggregation into a planned, budgeted execution graph of language-model calls, recursive sub-sessions and tool calls, runs it, and lets you query the trace with the same SQL. A Rust workspace with DuckDB inside, a `kleene` CLI and a terminal UI. MIT licensed, by Marcus Elwin. Source: https://github.com/MarcusElwin/kleene. The documentation pages below are the repository's own docs/*.md; each is also served as raw Markdown at the .md URL. ## Documentation - [The kleene CLI](https://kleene.sh/docs/cli.md): Install, provider setup, environment variables, every command and flag, troubleshooting. - [CallSQL dialect](https://kleene.sh/docs/dialect.md): The language: relational core, sessions, model calls, tools, delegation, planner rules. - [Architecture](https://kleene.sh/docs/architecture.md): The crates, the path of one statement, sessions, the store and trace tables, the daemon protocol, the planner. - [Implementation plan](https://kleene.sh/docs/plan.md): The design and its rationale, milestone by milestone. - [Benchmarks](https://kleene.sh/docs/benchmarks.md): The packs, the learning / frozen / plain modes, the oracles, what bench report and the plots measure. - [Write-up](https://kleene.sh/docs/writeup.md): The claim, the algebra, what has been measured and how to reproduce it. - [Research digest](https://kleene.sh/docs/research.md): Recursive language models, SQL as a model interface, complexity results, benchmarks. ## Site - [Home](https://kleene.sh/): What Kleene is, a typed example session, recursive language models, why it exists, how to install. - [Technical overview](https://kleene.sh/overview/): The algebra of call kinds, EXPLAIN, the execution graph, beams and recursion, the crates. - [Benchmarks](https://kleene.sh/benchmarks/): Cost, calls and pass rate per pack and mode for the model runs, with the Pareto plots. - [About](https://kleene.sh/about/): Stephen Cole Kleene, the theorems the name points at, references. ## Optional - [Everything in one file](https://kleene.sh/llms-full.txt): all documentation pages concatenated. - [README](https://raw.githubusercontent.com/MarcusElwin/kleene/main/README.md): the repository README with install, examples and status.