# Developer docs

## Assistants & MCP

- [Build for agents](/docs/build-for-agents) — Expose your application to your users' assistants with the agent-ready package, under the same authorization rules as your web interface, and verify each served endpoint.
- [Agentic protocols and capabilities](/docs/agentic-protocols) — Complete technical index of the agentic protocols, discovery formats, MCP extensions, OAuth and Claude Enterprise integrations, App Hub Code Mode, connectors, and verification tools supported on Ferrite.
- [MCP Servers](/docs/mcp-servers) — Build stateless HTTP MCP servers on Ferrite and offer your application's operations to assistants as bounded tools, through the same handlers as your HTTP routes.
- [Agent-ready apps](/docs/agent-native-apps) — Expose discovery files, Markdown pages, OpenAPI, MCP tools, an A2A card, and machine-readable pricing from one Surface declaration through your existing handlers.
- [MCP Events](/docs/mcp-events) — Discover application events, follow changes with polling or push, and resume safely after a disconnect.
- [llms.txt and Markdown twins](/docs/llms-txt-markdown) — Serve llms.txt, llms-full.txt, .md page twins, Accept: text/markdown content negotiation, robots.txt Content-Signal, and sitemap.xml from one Surface declaration.
- [WebMCP](/docs/webmcp) — Expose browser-native tools via document.modelContext so assistants running inside a user's browser call your application's HTTP routes under the active session.
- [OpenAPI and structured errors](/docs/openapi) — Generate an OpenAPI 3.1 API catalogue and RFC 9457 application/problem+json errors directly from your Surface declaration so HTTP clients and agents call your endpoints reliably.
- [Agent Cards and A2A](/docs/a2a-agent-cards) — Publish an A2A v0.3.0 Agent Card at /.well-known/agent-card.json and serve JSON-RPC agent-to-agent tasks at POST /a2a from your Surface or Agent SDK application.
- [Agent Client Protocol (ACP)](/docs/acp) — Speak Agent Client Protocol v1 from a constrained Ferrite application so editors and local clients can run agent sessions while keeping filesystem and terminal ownership on the client.
- [Build Claude-enabled apps](/docs/claude-apps) — Build web and SaaS applications on Ferrite that work natively inside Claude across web, desktop, mobile, Cowork, and Claude Code, for both consumers and enterprise teams.
- [Internal company apps in Claude](/docs/claude-internal-apps) — Deploy private internal tools on Ferrite and connect your entire Claude Team or Enterprise organization once through Ferrite Apps with Auto-connect.
- [App Hub and Code Mode](/docs/app-hub-code-mode) — Connect one six-tool MCP endpoint (mcp.ferrite.cloud/apps) to discover, inspect, call, and compose tools across all of your private and shared Ferrite applications inside a sandboxed QuickJS worker.
- [x402 agent payments](/docs/x402-payments) — Price HTTP API operations for AI assistants using x402 v1 HTTP 402 challenges, X-PAYMENT verification, atomic replay ledgers, and machine-readable /pricing.md discovery.
- [Verify agent readiness](/docs/agent-readiness-verification) — Audit your live application's agent surface with /.well-known/agent-readiness, the open agent-score, agent-scan, and agent-conformance CLI tools, the MCP compatibility probe, and Web Bot Auth inspection.
- [MCP Tasks](/docs/mcp-tasks) — Start long-running tools, keep a task handle, reconnect, provide input, and retrieve the final result.
- [Personal Agent Protocol](/docs/personal-agent-protocol) — Publish Personal Agent Protocol (Poppy 1.0) discovery, per-operation exposure controls, exact-terms approvals, Browser Join, and structured conversations from your agent-ready Surface.
- [WebMCP & OpenAPI](/docs/webmcp-openapi) — Generate an OpenAPI catalogue from your Surface and expose the same operations as WebMCP tools to the assistant in a user's browser without duplicating domain logic.
- [MCP Skills](/docs/mcp-skills) — Load Ferrite's own skills over MCP, publish workflow skills from your application, and read skills from another server with verified files.
- [Ask before acting](/docs/mcp-elicitation) — Let a tool pause to ask the person through a form or a link: what Ferrite's own tools ask, and how to add confirmations to your application's tools.
- [MCP file transfers](/docs/mcp-files) — Pass files to and from MCP tools without putting their bytes in the conversation: file arguments, upload targets, downloads, and the hosted tools that use them.
- [MCP Apps](/docs/mcp-apps) — Show an interactive view beside the conversation: serve a ui:// resource from your Ferrite application, link it to a tool, and talk to the host from the page.
- [ChatGPT and Codex apps](/docs/chatgpt-codex-apps) — Build MCP servers and interactive MCP Apps widgets for ChatGPT and Codex on Ferrite with the gpt-plugins source package, including OAuth challenges, checkout specs, and submission linting.
- [Interactive MCP tools](/docs/mcp-interactive-tools) — Build MCP tools that confirm, receive files, return files, require sign-in, and finish later, with agent-ready 1.17's call state and file staging.
- [Dashboard WebMCP](/docs/dashboard-webmcp) — Let the assistant in your browser inspect visitor routes, deployed application versions, and attached resources from the Ferrite dashboard you are already using.
- [Consume MCP Events from an outside source](/docs/mcp-event-pair) — Deploy a Ferrite emitter and receiver, stream through an independent publisher, and verify replay and signed callbacks.
- [Per-app OAuth (Poppy)](/docs/poppy-oauth) — Configure isolated per-Company OAuth 2.1 sign-in for Personal Agent Protocol (Poppy 1.0) using an external issuer or the standalone poppy-oauth source package.

## Deploy

- [Dashboard](/docs/dashboard) — Inspect applications, deployment history, prepaid credit, usage, spending limits, and recovery from the Ferrite Dashboard.
- [Deployments](/docs/deployments) — Submit source, follow admission and the attested build until the new generation runs, and retrieve the application host.
- [Environments](/docs/environments) — Develop locally, validate in expiring previews, fork live state safely, and promote immutable releases across named environments.
- [Domains](/docs/domains) — Bind a domain you own to a Ferrite application. Publish the ownership TXT record, verify the claim, and check HTTPS.
- [Scaling & Releases](/docs/scaling-releases) — Scale app instances, set autoscale and compute limits, see how scaling changes the bill, inspect immutable application releases, promote deliberately, and recover through rollback.
- [MCP-only Operations](/docs/mcp-only-operations) — Deploy and operate a Ferrite application over the hosted MCP endpoint alone: read every verdict from the payload, submit source once, reconcile lost replies from rcs_log, and manage builds, trials, and recovery.

## Security

- [Accounts](/docs/accounts) — Make an app private, give a shop customer accounts, or let people play as guests, with one command and no OAuth client.
- [Authentication](/docs/authentication) — How the auth package verifies sign-in and keeps sessions, and how to use your own GitHub and Google OAuth clients.
- [Sign-in for Alloy applications](/docs/authentication-alloy) — Gate Ferrite Alloy pages and writer actions with the auth package: propagate auth redirects through AlloyError::reply and submit CSRF-protected HTML forms without client scripts.
- [Authorization](/docs/authorization) — Separate what your application can reach (enforced by Ferrite from ferrite.json) from what each signed-in user or assistant may do inside it (enforced in your code).
- [Enterprise-managed authorization](/docs/enterprise-managed-authorization) — Let a company's Claude organization or identity provider grant its members access to Ferrite Apps or your own application's MCP endpoint, without a browser sign-in for each person.
- [Secrets & Egress](/docs/secrets-egress) — Store write-only secrets, read them from AppContext at runtime, and constrain outbound HTTP traffic to declared HTTPS URL prefixes.
- [Rate limits](/docs/rate-limits) — Enforce shared route budgets with the http-route-budget package, track per-caller quotas in your store, and check gateway rate-limit status on Ferrite Cloud.
- [Headers & Cookies](/docs/headers-cookies) — Set response security headers and host-only cookies through IngressReply, forward required request headers, and enforce CSRF and referrer rules within gateway bounds.

## Data

- [Choose a data primitive](/docs/data) — Decide where your application's state lives: Key-value Store, Transactions, Queues, Streams, or Object Storage, with each primitive's primary limit and durability model.
- [Key-value Store](/docs/store) — Keep application records as keys and byte values with linearizable reads and writes, compare-and-swap, atomic counters, expiry, and ordered prefix scans.
- [Transactions](/docs/transactions) — Commit one atomic decision across up to 64 keys with the APE service.
- [Queues](/docs/queues) — Hand work to competing consumers with leases, delayed delivery, attempt budgets, dead-letter queues, and ordered keys.
- [Streams](/docs/streams) — Append ordered events to a stored log, read them back by offset, and let consumers resume from saved checkpoints.
- [Object Storage](/docs/object-storage) — Store files under keys you choose, verify integrity on every read, chunk objects larger than 16 MiB, and serve public assets through content routes.
- [Large uploads](/docs/large-uploads) — Take files of up to 64 MiB straight into your application's Object Storage with an upload route that your own code authorizes before a byte is read.
- [Search](/docs/search) — How to handle exact-term lookup and relevance-ranked search on Ferrite today.

## Get started

- [Agent brief](/docs/agent-brief) — The ten operational rules an agent needs before building on Ferrite: cost disclosure, the build loop, dependencies, tests, secrets, sign-in, deploys, docs, limits, and trials.
- [Ferrite](/docs/overview) — An application platform for backend software written by coding agents, where each app reaches only the stores, queues, routes, secrets, and outbound destinations declared in ferrite.json.
- [Quickstart](/docs/quickstart) — Create a Ferrite web app, run it locally with live reload, verify it against platform rules, and deploy it.
- [Build an app with a coding agent](/docs/colleague-preview) — Install Ferrite, describe the app you want, deploy it, and claim its account.
- [What bounds an app your agent writes](/docs/why-it-is-safe) — How Ferrite isolates applications written by coding agents, layer by layer: declared capabilities, OS containment, prepaid spend bounds, and what stays in your code.
- [Ferrite apps with the Ferrite CLI](/docs/cli) — Create, check, run, test, and deploy Ferrite apps from one local workflow, and see where control-plane work moves to MCP.
- [Set up coding agents](/docs/plugin) — Install the Ferrite CLI and connect supported coding agents to Ferrite MCP with one shared login.
- [Use Ferrite in Claude](/docs/claude) — Connect claude.ai, the Claude desktop and mobile apps, Cowork, or Claude Code to Ferrite for building apps or using your personal and company apps.
- [Connect any agent to your Ferrite account](/docs/connect-any-agent) — Paste one prompt into any agent, from a coding agent with a terminal to a chat app on your phone, start a trial without signing up, and bring every later agent into the same Ferrite account.
- [Agents Ferrite works with](/docs/works-with) — Which coding agents and chat apps have been run against Ferrite Cloud, what was run in each, and the date of the run.

## AI & agents

- [Agents](/docs/agents) — How agents fit on Ferrite: coding agents that build and operate applications, product agents running inside your app with the agent SDK, and applications your users' assistants can call.
- [Agent SDK](/docs/agent-sdk) — Write an agent as a Rust function inside your Ferrite application: compose hooks for models, tools, skills, subagents, MCP connections, a workspace, and structured results.
- [Agent Runtime](/docs/agent-runtime) — How the agent SDK executes an agent on Ferrite: the session log on APE, the workspace on Blob and Store, idempotent submissions, compaction, crash recovery, and egress model transport to the AI gateway.
- [Agent API & Protocols](/docs/agent-api) — Call your deployed agent over the thread API, Agents API, SSE streams, MCP, ACP, or A2A, backed by one durable session store and one fail-closed client token.
- [ferrite-agents app](/docs/agents-app) — The reference application on the agent SDK: two agents, the ferrite.json manifest, required secrets, billing paths, and deployment verification.
- [Agent Channels](/docs/agent-channels) — Connect GitHub comments, Slack mentions, scheduled jobs, or any signed webhook to your agent by verifying the request, naming the conversation, dispatching a signal, and replying through a bound tool.
- [AI Gateway](/docs/ai-gateway) — One Responses API for configured model providers: catalog model IDs, Ferrite tokens or inference keys, spend caps, calendar budgets, rate limits, BYOK, explicit fallback, streaming, stored responses, and usage evidence.
- [Agent Samples](/docs/agent-samples) — Copyable Rust patterns and Flue-to-Agent-SDK equivalents covering hooks, conditional tools, model escalation, phase machines, workspaces, channels, schedules, and evals.
- [Governed outbound connectors](/docs/governed-connectors) — Connect your Ferrite applications and embedded agents to GitHub, Google, Linear, and Slack using scoped capability grants, digest-bound write approvals, and a resident credential vault.

## Alloy

- [Ferrite Alloy](/docs/alloy) — A Rust web framework for Ferrite: URL routing, tag-invalidated cached loaders, replay-safe actions, HTML documents, and an optional typed React front end.
- [Alloy Quickstart](/docs/alloy-quickstart) — Scaffold a server-rendered Ferrite Alloy app with ferrite new alloy, run it locally, deploy it, and optionally add a generated TypeScript contract and a React front end.
- [Alloy Routing](/docs/alloy-routing) — Route patterns, specificity, render modes, declarative redirects, per-route response headers, method handling, and typed hrefs in Ferrite Alloy.
- [Alloy Data & Caching](/docs/alloy-data) — Cached loaders with three freshness windows, named cache profiles, tag-epoch invalidation, draft mode, bounded reads, and version-skew protection.
- [Alloy Actions & Effects](/docs/alloy-actions) — Replay-safe mutations in Ferrite Alloy: idempotency markers, action stamps, mount-point authority, CSRF origin checks, the outbox, and sagas.
- [Alloy Documents & Assets](/docs/alloy-documents) — How Ferrite Alloy assembles HTML documents in Rust: the shell model, head metadata, CSP nonces, escaping guarantees, the asset pipeline, and public caching.
- [Alloy Next.js Adapter](/docs/alloy-next) — What the Alloy Next.js adapter does, why it is not distributed, and what an Alloy front end can use instead.
- [Alloy Testing & Gates](/docs/alloy-testing) — How to verify a Ferrite Alloy app: its own tests against the local harness, the checks the contract generator performs, and the seams worth checking by hand.

## Build

- [Functions](/docs/functions) — Run your application code as a supervised process with only the storage, queues, routes, outbound destinations, and secrets declared for it.
- [Routing](/docs/routing) — Map public paths to declared bindings for static content, HTTP APIs, file uploads, WebSockets, server-sent event streams, and gRPC services.
- [Cron Jobs](/docs/cron-jobs) — Schedule one-time and recurring work with delayed queue messages that stay durable in the queue until their due time.
- [Workflows](/docs/workflows) — Compose long-running, retry-safe multi-step workflows from Ferrite queues, stored state, transactions, and streams.
- [Webhooks](/docs/webhooks) — Receive provider events on an api route by forwarding the signature header, verifying the raw body, recording event IDs atomically, and bounding traffic in your handler.
- [Build TanStack Start apps on Ferrite](/docs/tanstack-start) — Compile an unmodified TanStack Start build into a single constrained Ferrite application with prerendered pages, an SPA shell, nitro route rules, and bounded QuickJS server functions.
- [Ferrite Rsx](/docs/rsx) — Build server-first Ferrite applications with file-convention routes, escape-safe .rsx templates compiled to plain Rust, client islands, live regions, and replay-safe actions.
- [TanStack Start on Ferrite for agents](/docs/tanstack-start-agents) — Complete instruction set for a coding agent building a TanStack Start app on Ferrite: exact commands, file ownership, verification bar, refusal messages, and runtime boundaries.

## Examples

- [Apps](/docs/apps) — Reference applications on Ferrite across commerce, booking, support, compliance, frameworks, and agents, with the features and packages behind each pattern.
- [Samples](/docs/samples) — Ten Ferrite sample packs for commerce, support, content, IoT, billing, compliance, collaboration, scheduling, workflows, and releases, and the primitive behind each effect.
- [Packages](/docs/packages) — Install shared Ferrite source into an application with ferrite add: resolution, signature and digest checks, MCP usage without a shell, and the published package catalog.

## Observe

- [Logs and observability](/docs/logs) — Inspect captured stdout and stderr tails, account notifications, structured tracing events, and gateway usage totals, and understand what each record retains.
- [Analytics and usage](/docs/analytics) — Read cumulative application usage, 35-day daily traffic, prepaid account statements, and AI gateway attribution without treating missing telemetry as zero.
- [Reliability](/docs/reliability) — Understand what Ferrite handles during instance and host failures, and build handlers, queues, and recovery paths that survive at-least-once delivery.

## Reference

- [App Manifest](/docs/app-manifest) — Declare an application's services, bindings, routes, compute limits, and outbound destinations in ferrite.json.
- [CLI Commands](/docs/cli-commands) — Reference for every ferrite CLI command, subcommand, flag, exit code, and environment variable.
- [Rust SDK](/docs/rust-sdk) — Use AppContext, service handles, ingress envelopes, clocks, secrets, notifications, and outbound HTTP in Ferrite Rust applications.
- [Limits](/docs/limits) — Manifest, source, request, payload, trial, and account balance limits enforced by Ferrite.
- [Glossary](/docs/glossary) — Definitions of the terms used across Ferrite applications, manifests, deployments, and data services.

