Deployment Options
Choose the Node target unless a named platform constraint determines otherwise. Choose LangSmith when that platform must own the LangGraph deployment envelope. Choose Hono only when a web-standard edge runtime is required and the application fits its explicit capability gate.
Choose a target
| Target | Artifact | Runtime and protocol | Middleware | Storage | Filesystem and sandbox | Node requirement | Evidence boundary |
|---|---|---|---|---|---|---|---|
| Node | .b4/build/server.mjs and a generated Dockerfile | B4.run HTTP runtime: Agent Protocol and AG-UI | B4.run HTTP middleware is included | Local defaults or injected/shared stores | Filesystem features and a configured execution sandbox are available | Node 24+ | Local runtime and container tests; validate your deployed proxy, stores, and model path |
| LangSmith | .b4/build/langgraph.json and one entry per route | Platform-owned LangGraph entries, not the B4.run HTTP server | B4.run HTTP middleware is absent | Platform/runtime-owned | No B4.run sandbox manager or HTTP filesystem surface | Generated config currently says Node 22 while B4.run requires Node 24+ | Validate authentication and execution on the target platform |
| Hono | .b4/build/modules.edge.mjs, stores.mjs, app.mjs, and wrangler.toml | Web-standard B4.run HTTP runtime: Agent Protocol and AG-UI | Included when discovered at build time | Generated request-scoped Postgres stores, or hand-composed stores | Filesystem, shell, workspace, skills, long-term memory, and sandbox surfaces are gated | No Node runtime requirement for the emitted worker | Local workerd and Node round trips are not proof of a live provider deployment |
Node and LangSmith are the defaults. Hono is opt-in. Specifying build targets replaces the defaults; it does not add to them:
import { config } from "@b4run/cli"
export default config({
build: { targets: ["node", "hono"] },
})Validate and build
Run the checks in this order so contract failures appear before artifact inspection:
b4 check
b4 build
b4 verifyb4 check validates the authored app and selected target constraints. b4 build emits the selected artifacts. b4 verify repeats the app, route, typegen, dependency/environment, and runtime-readiness phases against the resulting project state. A green command is not a substitute for testing the deployed authentication, routing, storage, and provider boundary.
Target guides
Production foundations
Deployment packaging does not decide data durability, replica coordination, or the external security boundary. Review these before exposing any target:
What B4.run does not do
B4.run emits deployment artifacts; it does not provision infrastructure, host applications, or manage secrets. Use the Deployment Options chooser with the target platform's hosting and security controls.
Self-hosting
Use Node and Docker when you want to run the full B4.run HTTP runtime on infrastructure you operate.
Troubleshooting
- If expected files are missing, inspect
build.targets: an authored list replaces the Node and LangSmith defaults. - If
b4 buildsucceeds but the deployed host cannot import a package, verify that packages imported by emitted artifacts are declared where the host installs or bundles production dependencies. - If local protocol tests pass but the target fails, test the target's real transport envelope, authentication layer, environment injection, and durable stores. Node/Hono HTTP evidence does not establish LangSmith behavior, and local workerd evidence does not establish a live edge provider.
Deploying to production (Node/Docker)
This section moved to Node and Docker.
Deploying on Kubernetes
This section moved to Kubernetes.
The LangSmith / LangGraph Platform path
This section moved to LangSmith.
Edge runtimes
This section moved to Edge and Hono.
The @b4run/cli/fetch entry point
See Edge and Hono.
The hono build target
See Edge and Hono.
Why the stores are per-request
See Edge and Hono.
What the edge cannot serve
See Edge and Hono.
What is proven, and what is not
See Edge and Hono.
Related
Continue with Production Topology, Persistence and Tenancy, and Security Architecture before exposing a deployment.