agent-unit weekly downloads statistics
By farming-labs · npm · AI SDKs
Build any agent server for any host: your own server, Mastra's, or durable runs for any agent framework.
agent-unit has 5,973 recorded weekly downloads on npm, an increase of 23.1% over the past 30 days, ranking #1462 of 3,247 tracked listings.
About agent-unit
agent-unit
Build any agent server for any host.
Give agent-unit the server you already have, or the agents you want served, and one command,
agent-unit build --preset <host>, turns it into a deployable build for Node, Bun, Deno, Cloudflare
Workers, Vercel, Netlify or AWS Lambda. It handles what each host does differently, so your code
does not have to.
If you know Nitro, this is the same idea for agent servers: Nitro takes a web framework's server and builds it for any host, and agent-unit does that for whichever agent framework you use. It is built on Nitro, so its presets and deploy targets are the ones you already know.
your Hono or Fetch server ─┐
Mastra's own server ───────┼──► agent-unit build --preset <host> ──► Node · Bun · Deno · Workers
agents/ on agent-unit's │ Vercel · Netlify · AWS Lambda
durable run engine ──────┘
- Your server, any host. A Hono app, a
{ fetch }handler or Mastra's own server builds for every host unchanged. Your framework keeps its routes, memory and storage. - One config for every host.
presetssets each host's settings in oneagent-unit.config.ts: runs on disk on Node, a Durable Object per run on Workers, Redis on Vercel. Secrets are read where the server runs, never written into the build. - The gaps between hosts, handled.
agent-unit/envreads configuration and bindings the same way everywhere,waitUntilkeeps work running after a response,tasksrun on each host's own scheduler, and Workers get the Node modules agent SDKs import. - Durable runs when you want them. agent-unit's optional engine serves agents from the AI SDK, Mastra, the OpenAI Agents SDK, LangGraph or plain TypeScript with runs that pause for a person, sleep for days and resume after a crash or a redeploy without repeating a model call or a side effect. Every agent gets the same HTTP API, a resumable event stream, an MCP endpoint and an A2A agent card.
Start a new app
npm create agent-unit@latest my-agent # or: pnpm create agent-unit, bun create agent-unit, npx agent-unit init
It asks for the framework (Mastra, the AI SDK, LangGraph, the OpenAI Agents SDK, agent-unit's own
defineAgent, or a plain Hono server), whether agent-unit's engine or the framework's own server
runs it (LangGraph and the OpenAI Agents SDK always run on the engine), the hosts to deploy to,
Mastra's storage, the model provider and extras (a scheduled task, bearer-token auth, background
work with waitUntil, a test that runs offline), and writes an app with one working agent, a
build script per host (with start for Node, Bun and Deno, and deploy for Cloudflare, Vercel,
Netlify and AWS Lambda; see Deploy in one command), and a README with each
host's steps.
- On the engine (the default for the AI SDK), the agent asks a person before it refunds an
order, and the run resumes where it stopped. One
agent-unit.config.tssets each host's run storage withpresets: on disk on Node, Bun and Deno, a Durable Object per run on Workers, and Upstash on Vercel, Netlify and AWS Lambda. - On its own server (the default for Mastra), Mastra keeps its routes and storage: Mastra's D1 store on Workers and the store you chose everywhere else.
Every answer has a flag, for scripts and CI:
npx agent-unit init my-agent --framework ai-sdk --runner engine --hosts node,cloudflare,vercel \
--provider openai --extras auth --no-install
--yes takes the default for anything not given.
Run it in an app you already have (a directory with a package.json) to add agent-unit to it. The
framework the app uses is the default, and nothing of yours is replaced:
- Your own server. For a Hono server, or an AI SDK app on its own server, an existing
src/server.tsorsrc/index.ts(any of.ts,.mts,.js,.mjs) is what gets built, as it is;initwarns when it has no default export or starts a server of its own. - Your Mastra instance. It keeps its own storage and model keys.
package.json. It gains only missing dependencies and scripts. A script name you already use gets agent-unit's underagent-unit:<name>, sonpm run devstays yours..gitignoreand.env.example. They gain only missing lines.- Other files. Each is written only where none exists. Your README and TypeScript setup are left alone.
Build your server for any host
Already have a server, from your agent framework or written by hand? Point server at it and
agent-unit builds it for every host in Deploy anywhere, with none of its own
engine, routes or storage added. Your framework keeps its own runs, memory and storage.
// agent-unit.config.ts
import { defineConfig } from "agent-unit";
export default defineConfig({
server: "./src/server.ts",
cloudflare: { wrangler: { d1_databases: [{ binding: "DB", database_name: "app", database_id: "…" }] } },
});
// src/server.ts
import { Hono } from "hono";
import { env } from "agent-unit/env";
const app = new Hono();
app.get("/", (c) => c.text(`hello from ${env.APP_NAME}`));
export default app;
```…
Description from the npm listing.
- agents
- ai
- durable
- runtime
- nitro
- mcp
- a2a
- ai-sdk
- mastra
- langgraph
README badge
Show your rank in a README or on your website. The badge updates automatically.
Charts
Images: 30d · 1y · all time · 1600×900 dark
Adoption over time
7/30/90-day growth
Ranking history
Listing placement
Listing placement
Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.
Each band is one page of 20. Weekly downloads on a linear scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.
Recent observations
Full history (156)Similar npm AI SDKs plugins
All 20 agent-unit alternativesData source
Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.
Listing: https://www.npmjs.com/package/agent-unit. First seen Oct 18, 2026; last successful collection Dec 6, 2026. See the methodology.