Documentation
js/documentation.md
This page is the map of Fino's documentation: every authored guide, organized by what you are trying to do, plus how to browse and search the generated API reference. If you are brand new, start with Getting Started.
Build an Agent
The AI section is the front door: model calls, validated tools, agents, sessions, and how the layers fit together.
- Model Requests — one-off stateless calls: provider adapters, streaming events, embeddings, response assembly.
- Complex Tools — tool design beyond simple lookups: subprocesses, agents as tools, approval gates.
- Interactive CLI Harness — a local terminal harness for developing prompts, tools, and sessions.
- Agent MCP Server — exposing tools and resources to external clients over the Model Context Protocol.
- Evals and OpenTelemetry — protecting AI behavior like tests, with scorers, reporters, and traces.
- Skills — optional expert instructions and tools, loaded only when relevant.
Isolate Code
The Realms section covers the runtime's isolation primitive — run skills, plugins, and untrusted code with only the imports you grant.
- Realm Lifecycle — creating, running, calling into, and reloading realms.
- Isolation Levels — embedded, thread, process, and remote modes and their trade-offs.
- Messaging — ports and
BroadcastChannelbetween parent and child. - Facades — exposing parent-side logic as a virtual module the child imports.
- Import Capabilities — the import rule system that shapes what a child may load.
Serve an Application
The Networking section spans Fetch-style HTTP down to sockets, TLS, DNS, and QUIC. The HTTP section dispatches to the right surface for what you are building:
- HTTP Server —
serveHttp(),serve(), upgrades, and lifecycle. - Routing and Middleware —
App, middleware, body and schema validation, cookies, sessions, OpenAPI. - HTTP Client —
fetch()andHttpClientpolicies, sessions, and metadata. - WebSockets — client global and server-side connections.
- Server-Sent Events —
route().sse()operations,EventSourceWriter, and SSE parsing. - WebTransport — bidirectional transport over HTTP/3.
- Protocol Versions and Transport — HTTP/1.1, h2, h3, ALPN, and TLS configuration.
Observe It
The OpenTelemetry section explains the provider/SDK architecture; the deep dives cover Manual Tracing, Metrics, Structured Logs, SDK Setup, Exporters and CLI Bootstrap, Context Propagation, and Runtime Instrumentations.
Platform
- Getting Started — install, first script, first server, first agent, tests, packages.
- Runtime Model — modules, globals, the event loop, byte streams, capabilities and isolation, context and topics.
- Modules and Packages — the import model, public API boundaries, and npm installation.
- Testing and Benchmarking — the built-in test framework, mocks, and benchmark harness.
- Data — Apache Arrow and Parquet tooling.
- Native FFI — loading native libraries and binding C ABI functions.
- Profiling — JS CPU profiles and native profiling paths.
The CLI guide maps every command: run, repl, test, bench, task, init, install, doc, fmt, and lint.
API Reference
Every public fino:* module is documented from its source doc comments, and
some modules — background jobs (fino:jobs), tasks (fino:task), workflows
(fino:workflow), validation (fino:validate), files, formats, SQLite,
processes, and the security helpers among them — are documented there rather
than in an authored guide.
On the generated docs site, the API reference appears alongside these guides in the sidebar. To build and search it locally:
fino doc build --format html --types runtime-builtins.d.ts js
fino doc search websocket
fino doc show bench.Group.measure
Generated output is written under docs/. See the doc command
for the full workflow, including runnable documentation examples.