Introduction
fn is a runtime for building AI features as functions. Your prompt, agent, or multi-agent workflow becomes a function you can define, test, version, and deploy like any other code: typed inputs, typed outputs, and a number on the door. We host it, keep it running, and you just call it.
The mental model
You write an fn.yml: a single declarative file that describes a function's
inputs, outputs, model, and how it should be evaluated. fn compiles that into an
immutable, versioned function, and every promoted version is a stable HTTP
endpoint.
| Concept | What it is |
|---|---|
| Definition | A declarative fn.yml defining I/O, model, and evals |
| Version | An immutable, content-addressed snapshot of a definition |
| Function | A compiled, callable version — classify@v3 |
| Eval | A dataset + threshold that turns a change into pass/fail |
| Alias | A moving pointer like stable or canary routed at a version |
Why a function
- Versioned by default. Every change produces a new immutable version you can diff and roll back.
- Tested before shipping. Evaluation is a command and a CI gate, not a vibe check.
- Callable over HTTP. Promote a version, get an endpoint that returns typed structured output plus metadata.
- Boring on purpose. The same workflow works for every function you build.
Ready to build one? Head to the Quickstart.