Skip to content

Hono on Node

Use Hono when you want a lightweight Node HTTP server (API-only backend, edge-adjacent services, or a custom framework stack) without pulling in Next.js. The example mounts arivie.next.POST on POST /api/arivie and reuses the same arivie.config.ts + semantic layer as the Next.js reference.

Agent loop: explore → compile_metric → execute

The handler shape is identical to Next.js; only the HTTP framework entry point differs.

src/app.ts
/* SPDX-License-Identifier: Apache-2.0 */
import { Hono } from "hono";
import { getArivieRuntime } from "../arivie.config";
const app = new Hono();
app.get("/", (c) => c.text("with-hono — POST /api/arivie"));
app.post("/api/arivie", async (c) => {
const { arivie } = await getArivieRuntime();
return arivie.next.POST(c.req.raw);
});
export { app };
Terminal window
cd arivie && pnpm install
pnpm --filter with-hono dev
curl -X POST http://localhost:3000/api/arivie -H 'Content-Type: application/json' -d '{"prompt":"How many customers?"}'

Canonical tree: arivie/examples/with-hono/.