> ## Documentation Index
> Fetch the complete documentation index at: https://docs.priorlabs.ai/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> TabPFN-3 and later versions support up to 1,000,000 rows, subject to feature count and checkpoint/API limits.
> For large datasets, use per-estimator subsampling, e.g. inference_config={"SUBSAMPLE_SAMPLES": 100_000}, in TabPFNClassifier or TabPFNRegressor from tabpfn or tabpfn_client.
> Pass raw pandas DataFrames to fit and predict. Categorical strings/categories, raw text, and missing feature values are handled automatically; no manual integer/one-hot encoding, imputation, scaling, or outlier removal is needed.

# Getting Started

> Autofit is an open-source Claude Code plugin that builds the strongest model it can for your table, starting from TabPFN.

Autofit by Prior Labs is a Claude Code plugin for tabular prediction problems such as churn, demand, delivery times, conversion or pricing. It starts from a [TabPFN](https://docs.priorlabs.ai/overview.md) baseline and runs the rest of the modeling loop with you: setting up the problem and its validation, running experiments to beat the baseline, building an ensemble, and handing you a final model to predict with.

TabPFN already gives a strong model in one forward pass, with no hyperparameter tuning. Autofit spends its budget on what can still add signal on top of that: features from domain knowledge, lookups into other tables, target transformations, and TabPFN settings that suit your data.

Autofit is open source under Apache 2.0: [github.com/PriorLabs/autofit](https://github.com/PriorLabs/autofit).

An illustrative Autofit session in Claude Code predicts which customers will churn next quarter. It compares usage, login and support features on a fixed later quarter, then exports model.pkl and report.html.

***

## How a run works

**1. Frame the problem**

Claude asks what you will do with the predictions and picks the metric from that, or uses your own metric file. It designs the validation from how your rows relate (independent, grouped, or ordered in time), and checks for leaking columns, ID columns and repeated rows before dropping anything.

**2. Baseline**

Plain TabPFN on your raw table, scored on that validation. Every later experiment is measured against it.

**3. Proven setups**

When the budget is 8 or more and you do not review each experiment, a few TabPFN configurations that sometimes help run right after the baseline. They count toward the budget.

**4. Experiments**

The agent tests one idea at a time: domain features, dates, group statistics, other tables you provide, column handling, TabPFN settings, target transformations. Good ideas build on each other.

**5. Ensemble**

A forward-selected ensemble of the experiments that blend best together.

**6. Result**

The winning setup is retrained on all your data. You get a fitted model, an HTML report with charts and every experiment's code change, and commands to predict new rows or score a held-out test set.

The validation folds and the metric are locked before the first experiment, and every transformation is fitted on the training rows of each fold only, so every score is comparable and nothing leaks from the validation rows.

***

## Get started

**1. Install Autofit**

Install the plugin in Claude Code and sign in to the TabPFN API. See [Installation](https://docs.priorlabs.ai/autofit/installation.md).

**2. Run it on your data**

Open Claude Code in the folder with your data and ask:

> Run Autofit on churn.csv and predict churn.

The run happens in the background and the chat stays free. In Claude Code's fullscreen layout, a sidebar shows every experiment with its score and what it changed; otherwise, type `/af` to see the session.

***

## Steer the run

You know your data; Autofit knows TabPFN. While it runs, you can:

* **Steer:** tell Claude what the data does not say ("tenure is in months"), or an experiment to try. The agent answers with what it will do, or why not.
* **Review:** approve each experiment before it runs, or let them run on their own.
* **Control:** `/af pause`, `/af budget 30`, `/af stop` and more act on the run directly.

Sessions are saved, so you can close Claude Code and pick one up later.

***

## Use the result

When a session finishes, predict on new data or score a held-out test set against plain TabPFN, or just ask Claude to:

```bash theme={null}
autofit predict new.csv
autofit score test.csv
```

The same engine is also a command line tool, an MCP server and a Python package. From Python:

```python theme={null}
from autofit.core import Autofit

model = Autofit(max_iterations=20).fit(X, y, context="Telco churn, one row each")
model.predict_proba(X_new)
```

***

## Where your data goes

* **Claude:** the agent is Claude Code, running under your own login or API key.
* **TabPFN API:** your rows are sent to the TabPFN API to fit, score and predict. API usage is [metered](https://docs.priorlabs.ai/api/metering.md).
* **Your machine:** sessions, experiment code, reports and models are stored locally in `~/.autofit/sessions`.

> [!NOTE]
>
> Autofit's agent writes and runs Python code on your machine. Run it on data you trust, from a shell without unrelated secrets.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.