Overview
libfx is the fx agent runtime, exposed through a JavaScript API. It runs natively in Node.js and through WebAssembly in the browser.
What libfx can do
- Stream replies and tool activity as the agent works.
- Call your JavaScript functions to query data, update records, or run commands.
- Send images to models with image input.
- Steer a running turn with follow-up instructions.
- Connect MCP tools and skills.
- Save a conversation and resume it later.
- Run the fx terminal in a web page.
Get started
Follow the Quick start to install libfx, connect a model, and send your first prompt. The examples include Node.js, browser, Next.js, and Nuxt projects.
Runtimes
- Node.js: native addon, WebAssembly fallback, and server frameworks.
- WebAssembly: run the agent or the fx terminal in the browser.
Version compatibility
These guides use libfx 0.0.12. The complete example apps specify their own dependency versions. For older integrations, see Migrating from 0.0.7.