# TOKENFOLD
Select what matters. Fit more context.
Tokenfold Select brings query-aware relevance ranking to your LLM context. Fit complete context groups to a token budget, backed by Core's structural compression and inspectable receipts.
Python-first SDK. TypeScript alongside it. Rust at the core.
One fit() workflow for text, JSON, grouped context, and provider requests.
Select for relevance. Core for structural efficiency. One integrated workflow.
[](https://github.com/snchimata/tokenfold/actions/workflows/ci.yml) [](https://pypi.org/project/tokenfold/) [](https://www.npmjs.com/package/tokenfold) [](https://docs.rs/crate/tokenfold-core/latest) [](https://github.com/snchimata/tokenfold/blob/main/LICENSE)

## Table of contents
[Python quickstart](#quick-start) | [Python fit workflow](#native-sdk-fitting) | [Select](#tokenfold-select) | [Benchmark highlights](#benchmark-highlights) | [Other integrations](#other-integrations) | [How it works](#how-it-works) | [Core](#tokenfold-core) | [Full results](#measured-results) | [Extended tooling](#extended-tooling) | [Safety and auditability](#safety-and-auditability) | [Reproduce the results](#reproduce-the-results) | [Contributing](#contributing) | [License](#license)
> **Built for:** Python, TypeScript, and Rust developers and AI teams fitting
> JSON, tool definitions, and grouped context into LLM requests. Coding-agent,
> CLI, and proxy integrations use the same underlying Core engine.
## Quick start
### Python SDK
Python >=3.12. Install the current SDK release; the base workflow needs no
repository checkout, model, GPU, or ML framework:
```bash
python -m pip install "tokenfold==0.6.0"
```