# fx

> A tiny, open-source, native coding agent CLI written in Zig, optimized for minimalism, embeddability, and performance in both local and cloud inference environments.

fx is a coding agent harness and CLI built by Vercel Labs, written in Zig and released under the Apache-2.0 license. It ships as a ~6–7.8 MiB native binary and is designed for research, programmatic use, and embedding inside larger systems. The project is currently marked as experimental (v0.0.3), and the homepage explicitly notes it is under active, frequent development.

## What It Is

fx is an open-source, model-agnostic coding agent that runs from the command line. Unlike heavier "IDE in the terminal" tools, fx deliberately targets a Unix shell aesthetic: minimal output, preserved scroll history, and a small footprint. It can sign in via Vercel's AI Gateway or accept any provider API key directly, making it usable with local models, cloud providers, or gateway services. The core is written in Zig, which enables both a compact native binary and optimal WebAssembly builds.

## Architecture and Performance Design

The project's design philosophy centers on measurable minimalism:

- **~6–7.8 MiB binary** — designed for instant installation and embedding in resource-constrained environments or agent sandboxes
- **10µs cold start** — fx performs no unnecessary I/O before accepting user input, making it suitable for programmatic invocation
- **Single-digit MB memory baseline** — allows many instances to run on a single machine simultaneously
- **Context-efficient system prompt** — minimal prompt and tool surface to reduce token costs and improve time-to-first-token (TTFT)
- **WebAssembly support** — the Zig toolchain produces `fx-core.wasm` and `fx-term.wasm` builds, with a pluggable network stack; a browser demo runs the full CLI via WebAssembly with JSPI support (Safari 27+, Chrome)

## Embedding and Extensibility

fx is explicitly designed to be embedded in larger systems. The `fx acp` surface connects the native agent to editors and other Agent Client Protocol clients. JavaScript hosts can embed the agent core via `createFxAgent()` or the interactive terminal via `createFxTerminal()`, both backed by the respective `.wasm` builds. The WebAssembly SDK is noted as experimental. Extensibility follows a Unix-like philosophy: reusable instructions via skills, external tools via MCP (Model Context Protocol), and independent work delegation via subagents.

## Permissions and Safety Model

fx starts in `auto` permission mode. Saved rules are applied first; unresolved sensitive calls are reviewed automatically; anything still unresolved becomes an approval prompt. Read-only operations (listing, globbing, searching, reading files in the workspace) require no approval. Write and execution operations — `write_file`, `edit_file`, `delete_file`, `run_command`, and others — require explicit approval. A `yolo` mode disables permission checks entirely for a run, and the docs note it should only be used in a workspace and container the user is willing to lose. Permissions can be changed at any time with `/permissions`, and persistent rules can be stored or revoked by rule ID.

## Current Status: Experimental (v0.0.3)

The GitHub repository was created in August 2026 and the latest release, v0.0.3, was published on August 18, 2026. The homepage explicitly labels the project as "experimental" and warns users to "use at your own risk" with frequent changes expected. The repository is hosted under the `vercel-labs` organization, signaling it is a Vercel research and incubation project. Building from source requires Zig 0.16.0+ and the project accepts contributions via CONTRIBUTING.md.

## Features
- ~6–7.8 MiB native binary for instant installation
- 10µs cold start with no unnecessary I/O
- WebAssembly builds (fx-core.wasm, fx-term.wasm)
- Model and provider agnostic (local, cloud, gateway)
- Auto permission mode with granular approval prompts
- Skills, MCP, and subagent extensibility
- Agent Client Protocol (ACP) support
- Session management with resume and compaction
- Shell-like UI with minimal TUI footprint
- Context-efficient minimal system prompt
- Single-digit MB memory baseline
- Interactive slash commands and keyboard shortcuts
- fx ask for single noninteractive requests
- Diagnostic trace generation with /trace
- Vercel AI Gateway sign-in or direct API key auth

## Integrations
Vercel AI Gateway, MCP (Model Context Protocol), Agent Client Protocol (ACP), Local LLM inference, Cloud LLM providers, WebAssembly (JSPI), just-bash (browser workspace demo)

## Platforms
MACOS, WEB, API, DEVELOPER_SDK, CLI

## Pricing
Open Source

## Version
v0.0.3

## Links
- Website: https://fx.sh
- Documentation: https://fx.sh/docs
- Repository: https://github.com/vercel-labs/fx
- EveryDev.ai: https://www.everydev.ai/tools/fx-coding-agent
