Treelang¶
Treelang turns natural-language requests into validated abstract syntax tree programs that execute against your tools. It keeps model generation separate from deterministic program execution and supports OpenAI and Anthropic model transports.
Install¶
Install the optional Anthropic adapter with:
Python 3.12 or newer is required.
Start here¶
- Use the supported API reference to see the stable root exports.
- Use the command-line interface to validate, inspect, execute, replay, and generate programs.
- Test integrations with deterministic fakes and provider contracts.
- Configure editors with the canonical JSON Schema artifacts.
- Follow the end-to-end cookbook learning path.
- Build integrations with the extension and provider guide.
- Simplify programs with conservative tree transformations.
- Learn the execution and replay semantics.
- Compare model integrations in the provider compatibility matrix.
- Follow the 1.0 migration guide when upgrading.
- Read the architecture decisions for the rationale behind schema and runtime contracts.
Versioned documentation¶
Each tagged release publishes an immutable documentation version. The latest
alias points to the most recently published release; use the version selector in
the header when working with an older package version.
For source development, install the locked environment and preview the site: