Functional AI is coming soon. Join the waitlist for early access.

// the agentic function runtime

Trust your agents in production.

Your prompt, agent, or multi-agent workflow becomes an Agentic Function you call from your code.

No spam. One email when Functional AI launches.

prompt·agent·workflow→.run()→typed result
app.py
# your code
from fnai import Function
classify = Function("classify", api_key="fnk_…")
result = classify.run(ticket=text)
# typed result
{
"category": "billing",
"priority": "high",
"confidence": 0.94
}
v3 · 142ms · $0.003 · eval: 98% pass

You call it like any function. We host it, evaluate it, keep it running, and fail over if a model dies.

// the problem

Shipping AI is easy. Trusting it in production is not.

It breaks and nobody notices

A prompt tweak quietly regresses. You find out when a customer does, not when it shipped.

The bill creeps with no ceiling

A chattier model, a bigger prompt, and spend climbs. Nobody set a budget the AI has to live within.

One model has a bad day

Your provider rate-limits or goes down, and your feature goes down with it. Nothing catches the fall.

Your software is reliable. Your AI should be too.

// the runtime

You shouldn't have to babysit AI in production.

Functional AI is the runtime for agents — serverless for your prompts, agents, and workflows. You write the Agentic Function; we run everything behind it. No platform team required.

your code

await fn.run("classify@v3", { input })
Functional AI runs everything below

Hosting

No servers to run. Your Agentic Function lives on our infrastructure.

Any model

No lock-in. Use a model we host with usage billed at cost, or plug in any provider's own endpoint and credentials.

Context

No context-prep code. Point an Agentic Function at raw files and we parse, summarize, and budget tokens.

Evaluation

No eval harness to build. Quality is checked before it ships.

Model fallback

No failover code to write. We switch models the moment one fails.

Versioning

No redeploys. New versions go live behind the same function call.

Monitoring

No alerting to wire up. Every call is watched for latency and drift.

Cost control

No runaway bills. We keep you on the cheapest model that still passes.

All the agents, none of the infrastructure.

// how it works

Three steps to AI you can trust.

No platform team. No eval pipeline to build. No infrastructure to run. Write it, tune it, and call it.

  1. 01

    Write it

    Your prompt, agent, or multi-agent workflow as an Agentic Function. In the UI, the CLI, or from your coding agent over MCP.

  2. 02

    Evaluate & iterate

    Test versions until the output and the cost are exactly what you want. We help you find the cheapest model that still passes.

  3. 03

    Promote & call it

    We host it, monitor it, fall back if your model fails, and let you ship new versions anytime. No redeploy.

// write

Three ways in. One Agentic Function out.

Write your prompt, agent, or multi-agent workflow once. However you start, you end up with the same thing: a typed Agentic Function we host and you call.

UI

Author and test an Agentic Function in the browser. No setup.

$ app.fnai.dev/new

CLI

A thin client to the hosted runtime. Stays in your workflow.

$ fn new classify

MCP

Drive Functional AI straight from your coding agent over MCP.

$ fn.create_function(...)

// evaluate & iterate

Test it. Tune it. Until the output and the cost are right.

Define a dataset and a threshold, and Functional AI turns every version into a pass/fail signal. Iterate until the output is right, then let Functional AI find the cheapest model that still passes.

fn eval classify@v3
$ fn eval classify@v3 --dataset tickets.jsonl
✓ 47 / 48 cases passed
✗ case 23: expected "billing", got "support"
score: 97.9% (threshold 95%) ✓ pass
consistency: 5 / 5 runs identical
vs v2: +2.1% ▲
cost: claude-sonnet-4-6 $0.0008 ✓ still passes
suggestion: switch from opus-4-8 −74% cost

Quality

Grade against datasets of real inputs and expected outputs.

Consistency

Re-run N times and measure variance, not just a lucky pass.

Cost & model choice

Compare models and pick the cheapest one that still clears your bar.

Regression gate

Every version is compared to the last. A drop fails the build.

// promote to production

Promote a version. Then just call it.

Promote a version and you get a stable, authenticated HTTP endpoint, hosted on our infrastructure. Send inputs, get typed structured output, a status, and the trace ID and metadata you need to bill, trace, and monitor.

app.py
from fnai import Function
classify = Function("classify", api_key="fnk_…")
result = classify.run(ticket=text)
200 OK
{
  "status": "success",
  "output": {
    "category": "billing",
    "priority": "high",
    "confidence": 0.94
  },
  "meta": {
    "version": "v3",
    "latency_ms": 142,
    "cost_usd": 0.003,
    "tokens": 1840,
    "trace_id": "run_8f3c2a1d"
  }
}

// monitor & fall back

If your model fails, we've already switched to a backup.

You pick a model. We keep a backup ready and switch the moment it fails. Your Agentic Function keeps answering, and your users never notice.

fn monitor classify@v3 · live
$ fn tail classify@v3 --events
12:04:01 ✓ primary claude-opus-4-8 142ms ok
12:04:05 ✗ primary claude-opus-4-8 —— 503 unavailable
12:04:05 ↺ failover claude-sonnet-4-6 91ms ok ← auto
12:04:06 ✓ fallback claude-sonnet-4-6 96ms ok
incident: opus-4-8 unavailable 41s · 7 requests · 0 user errors
your Agentic Function never stopped answering.

Always watching

We monitor every call for latency, errors, and drift, so you never wire up alerting.

Automatic failover

If your model fails, we fall back to a backup instantly. The failure never reaches your users.

Cheapest model that passes

We keep running on the lowest-cost model that still clears your quality bar.

// reliability

When a tool fails, the agent degrades. It doesn't guess.

Real tools and networks fail. Functional AI wraps every call in timeouts, retries, and hard budgets, and when it genuinely can't finish, it says so instead of inventing an answer.

Retries with backoff

Every tool call is timeout-bound. Transient failures retry with backoff; bad input fails fast instead of hammering.

Safe to retry

Side-effecting tools — send, charge, write — carry idempotency keys, so a retry never fires the action twice.

Bounded loops

Hard caps on steps and tokens, plus loop detection: an agent calling the same tool in circles breaks and escalates.

Graceful degradation

Out of budget or missing a tool? You get the best partial answer with an explicit status — never a confident wrong one.

// security

Agents touch the outside world. We contain the blast radius.

The moment an Agentic Function fetches a web page or calls a tool, it has an attack surface. Functional AI treats external content as untrusted, scopes every credential tightly, and keeps destructive actions behind a gate.

Untrusted tool output

Content a tool fetches is data, never instructions. We won't claim injection is solved — it isn't. We make it harder and contain the blast radius.

Least-privilege tools

Read-only tools are separated from write and destructive ones. Each credential is scoped to only what the Agentic Function actually needs.

Secrets stay out

No credentials in prompts, logs, or traces. Keys are injected at the tool layer; PII and tokens are redacted by default.

Human in the loop

High-impact actions — delete, send, pay, publish — can require explicit confirmation or run in a sandbox before they touch anything real.

// ship new versions anytime

Ship a better version at 2pm. No redeploy.

The same function call picks up the new version behind it, so you ship improvements without redeploying your app. Versions are immutable and comparable: diff any two, route traffic with aliases like stable and canary, and roll back instantly when an eval or production tells you to.

fn diff classify@v2 classify@v3
$ fn diff classify@v2 classify@v3
model: claude-sonnet-4-6 → claude-opus-4-8
- output.priority: string
+ output.priority: enum[low, high]
+ eval.threshold: 0.95
aliases
  • stable→v3100% traffic
  • canary→v3-rc15% traffic

instant rollback

$ fn rollback classify --to v2

// with Functional AI

Two ways to run AI in production.

The difference between hoping your AI holds up and knowing it does.

Without Functional AI

  • Prompts scattered across Notion, env vars, and your codebase
  • You find out it broke from a customer
  • Costs creep up with no ceiling
  • A model outage takes your feature down
  • Locked into one model; a price hike or deprecation is your problem
  • Changing the AI means a full redeploy

With Functional AI

  • One Agentic Function you call from your code
  • Certified better than the last version before it ships
  • Always on the cheapest model that still passes
  • Automatic failover, your users never notice
  • Swap models without touching your code
  • Ship new versions anytime, no redeploy

Every other tool hands you a dashboard to operate. Functional AI hands you an outcome: AI that just works.

// faq

Common questions

What is the best way to host an agent as an Agentic Function?
Write your prompt, agent, or multi-agent workflow and define it in fn.yml. Functional AI hosts it as a versioned, callable Agentic Function behind a stable HTTP endpoint. Your app calls the same URL every time; the runtime handles the model, the eval gate, and automatic fallback — no infrastructure to manage, no redeploy when you update the logic.
How do I add automatic model fallback to my AI app?
Fallback is part of the runtime, not your code. Set a primary model and one or more backups in fn.yml. The runtime monitors every call and routes to the next model in the list when the primary returns an error or exceeds your latency threshold. Your Agentic Function's signature and endpoint stay the same — your app sees no change.
How do I choose the best model for my agent in production?
Run fn eval on your Agentic Function before promoting a new version — the eval gate scores quality and cost so you can pick a primary model with data, not guesswork. Declare your chosen model and one or more backups in fn.yml. In production, if the primary is unavailable or exceeds your latency threshold, Functional AI routes to the next model automatically. Change models by updating fn.yml and running a new eval pass — no app redeploy needed.
How do I ship a new prompt version without redeploying my app?
Your app always calls the same Agentic Function endpoint. When you're ready to ship an update, push a new version and promote it on the platform — the runtime serves the new logic immediately without touching your app. To roll back, re-pin the previous version; your app keeps calling the same endpoint throughout. Versioning and your app's deploy cycle are completely separate.
How do I version and roll back prompts in production?
Prompt versioning means every iteration of a prompt, agent, or workflow becomes a named, callable version with its own eval score and deployment history. In Functional AI, each version is pinnable: your app calls the same Agentic Function endpoint throughout, and the runtime serves whichever version you've promoted. To roll back, re-pin the previous version — it takes effect immediately, with no app redeploy required.
How do I stop my agent breaking when a model provider has an outage?
An outage at one model provider hits every app making direct API calls — unless those calls go through a runtime with automatic fallback. In Functional AI, your fn.yml declares a primary model and one or more backups in priority order. When the primary returns an error or exceeds your latency threshold, the runtime routes to the next model within the same request. Your app's endpoint never changes.

Build agents you can trust. Be first to ship them.

Functional AI is launching soon. Join the waitlist for early access and we'll email you the moment it's ready.

No spam. One email when Functional AI launches.

Shipping agents in production?