Welcome to FunctionFly, the serverless platform designed for the AI era. We are building the infrastructure that enables developers to create, deploy, and monetize AI-powered applications with unprecedented ease and security. This post explains what FunctionFly is, how it works, and why we built it.
The cloud infrastructure landscape was designed for request-response web applications. AI workloads are fundamentally different: they are long-running, stateful, unpredictable in duration, and require access to sensitive credentials and external APIs. Traditional serverless platforms force developers to work around timeout limits, cold starts, and stateless execution models that were never designed for autonomous agents or multi-step AI pipelines.
FunctionFly exists to solve these problems at the platform level.
What Makes FunctionFly Different?
FunctionFly is purpose-built for the AI-native world. We did not retrofit an existing platform. Every layer of the stack, from the runtime to the billing model, was designed around how AI applications actually behave in production.
Compute Capsules
A Compute Capsule is FunctionFly's execution primitive. Unlike a traditional serverless function that terminates after a single request, a Capsule can run for seconds, minutes, or hours. It maintains state between invocations, supports durable execution with automatic checkpointing, and can fork into child Capsules for parallel workloads.
Think of a Capsule as a lightweight, sandboxed virtual machine that scales to zero when idle and scales out horizontally under load. You pay only for the compute time you actually use, measured in 100ms increments.
import { defineCapsule } from "@functionfly/sdk";
export default defineCapsule({
name: "data-pipeline",
async handler(ctx) {
const data = await ctx.fetch("https://api.example.com/data");
const processed = await ctx.run("transform", data);
await ctx.run("load", processed);
return { status: "complete", rows: processed.length };
},
});
Each step in the handler is automatically checkpointed. If the process crashes after transform but before load, FunctionFly resumes from the checkpoint instead of restarting from scratch.
State Fabric
State Fabric is a durable key-value and document store built into every Capsule. It provides strongly consistent reads and writes without requiring an external database connection. State Fabric handles session storage, conversation memory, caching, and any other data your agent needs to persist across invocations.
// Store conversation history
await ctx.state.set(`conversation:${userId}`, messages);
// Retrieve it later, even after a cold start
const history = await ctx.state.get(`conversation:${userId}`);
State Fabric is replicated across availability zones and supports point-in-time recovery. You never have to worry about losing agent state during a deployment or infrastructure incident.
For a deep dive into consistency models, fault tolerance, and the full API, read the State Fabric deep dive.
Zero-Knowledge Secrets Vault
AI agents frequently need access to API keys, database credentials, and third-party tokens. Storing these secrets securely is critical, but most platforms give the infrastructure operator full access to plaintext secrets.
FunctionFly's Secrets Vault uses zero-knowledge encryption. Secrets are encrypted client-side in the browser before they ever reach our servers. We store only AES-256-GCM ciphertext. We cannot decrypt your secrets even if compelled to, because the decryption key never leaves your browser.
This architecture is essential for regulated industries, enterprise customers, and any developer who takes credential security seriously.
Trust Layer
The Trust Layer provides attestation and verification for every action an AI agent takes. When a function executes on FunctionFly, the runtime generates a cryptographic attestation that proves the code ran in a sandboxed environment with specific inputs and produced specific outputs. These attestations are tamper-proof and independently verifiable.
This is critical for production AI systems. When an agent makes a decision that affects real users or real money, you need to prove exactly what happened, what data was used, and what reasoning was applied. The Trust Layer gives you an immutable audit trail for every agent action, which is essential for compliance, debugging, and building user trust.
The Developer Experience
We believe infrastructure should be invisible until you need it. FunctionFly provides:
- One-command deploys:
ff deploybuilds, tests, and deploys your function in under 90 seconds - Instant rollbacks: Every deployment is versioned. Roll back to any previous version with
ff rollback - Local development: The FunctionFly CLI runs a full local sandbox that mirrors production behavior
- Observability built in: Distributed tracing, structured logging, and cost breakdowns are available in the dashboard without any configuration
- SDK-first APIs: The TypeScript SDK provides type-safe APIs for every platform feature
There is no YAML to write, no infrastructure to provision, and no Kubernetes manifests to maintain. You write a function, and FunctionFly handles everything else.
Billing That Makes Sense
Traditional serverless billing penalizes you for long-running workloads. A function that runs for 5 minutes costs 300 times more per invocation than one that runs for 1 second, even if the total compute is modest.
FunctionFly bills based on three dimensions:
- Compute time: Measured in 100ms increments, only while your Capsule is actively executing
- Memory allocation: The amount of RAM reserved for your Capsule
- State storage: The amount of data stored in State Fabric
Idle Capsules cost nothing. If your agent spends 30 seconds waiting for an external API response, you are not billed for that wait time. This pricing model aligns with how AI workloads actually behave: bursts of computation separated by I/O waits.
What People Are Building
FunctionFly is used to build:
- RAG agents that search codebases, documentation, and knowledge bases to answer questions with cited sources
- Autonomous data pipelines that ingest, transform, and load data across multiple systems with durable execution
- AI-powered SaaS applications that embed intelligent features like summarization, classification, and generation
- Multi-agent orchestration systems where specialized agents collaborate on complex tasks
- Secure credential rotation bots that manage API keys and tokens using the zero-knowledge vault
The common thread is that these workloads require more than a simple function invocation. They need state, durability, security, and the ability to run for as long as the task requires.
Getting Started
The fastest way to experience FunctionFly is to deploy your first function:
npm install -g @functionfly/cli
ff auth login
ff init my-first-agent
cd my-first-agent
ff deploy
This creates a starter project and deploys it to your account. The dashboard at app.functionfly.com shows logs, traces, and billing in real time.
For a guided walkthrough, read our tutorial on Building Your First AI Agent. For architecture deep dives, visit the documentation.
What Comes Next
We are actively building:
- MCP Server support: Deploy Model Context Protocol servers that expose your functions as tools for any LLM
- Function Registry: A marketplace where developers can publish and monetize reusable AI functions
- Edge execution: Run Capsules at the edge, close to your users and data sources
- GPU compute: Support for inference workloads that require GPU acceleration
We ship weekly. Follow the changelog for updates, or join the Discord to connect with the community.
FunctionFly is the infrastructure layer for the AI era. We are building it in the open, and we want you to be part of it.