# Show HN: Turn any Next.js app AI native in 5 minutes

> Source: <https://www.betteragent.dev/>
> Published: 2026-06-25 04:25:33+00:00

# The agent layer your *SaaS* is missing.

Point BetterAgent at your codebase. It reads your routes and server actions - and now your users get an agent that does real work inside the product you already shipped.

## Routes, server actions, client actions. Same protocol.

Three primitives in your code; two messages on the wire. The agent *reads* data through routes, *mutates* through server actions, and *steers the UI* through client actions.

``` js
"use server";

import { defineServerAction } from "betteragent-next";
import { z } from "zod";
import { createCampaign } from "@/app/actions";

export const createCampaignAction = defineServerAction({
  name: "createCampaign",
  description: "Draft a re-engagement campaign.",
  schema: z.object({ audienceId: z.string() }),
  handler: createCampaign,
});
```

### Server Action

Wrap an existing Next.js Server Action — the SDK dispatches the call so session and revalidation work as normal.

[Read the docs](https://docs.betteragent.dev)

## Your app already has tools.

BetterAgent finds them.

Point the CLI at your codebase and we read your routes and server actions. You pick which handlers the agent can call and write the descriptions it uses to decide when.

### betteragent discover

We walk your codebase: every Server Action, every API route, every exported handler. You pick which ones the agent can call.

### Tool files scaffolded

We scaffold one entry per selected handler with an empty Zod schema you fill in. The agent gets the same contract your IDE has once you describe the arguments.

### betteragent sync

Diff against the server, confirm, ship. Routes are static at runtime — the LLM only sees the names and schemas you approved.

## A shadcn-style registry of agent UI.

Pick a layout, run `betteragent add`

, and you own the code. Theming inherits from your shadcn tokens.

**create_campaign**

**create_campaign**

**create_campaign**

## Debug like an HTTP request,

not a model.

Every conversation, every tool call, every token, all recorded and queryable.

## Boring infrastructure for an exciting layer.

Streaming, observability, billing, auth, rate-limits, evals. The unsexy stuff that decides whether your agent ships.

### Auth that's already there

Forwards your end-user's bearer token to your APIs. No service accounts, no scope leaks.

[[email protected]](/cdn-cgi/l/email-protection)campaigns:write

### Native SSE streaming

Tool calls fire mid-stream. No polling, no batching.

### Claude Sonnet 4.6

Default model. Hosted with cache hits at 10% of normal token cost.

### Observable by default

Every run, every token, every tool call logged and queryable.

### One protocol, Next.js today

Next.js (App Router) is the only framework supported right now. Other adapters are planned, not yet available.

### Rate limiting built in

Per-project and per-IP limits enforced before requests hit your tools.

## Free until your agent earns its keep.

500 credits every 30 days on the house, free to prototype. Starter is $0.99/mo for 1,500 credits. No card required.

For prototyping and small projects.

- 500 credits / 30 days
- Unlimited projects
- Hosted Sonnet 4.6

3x the runway, for less than a pack of gum.

- 1,500 credits / 30 days
- Hard-capped, no surprise charges
- Hosted Sonnet 4.6

Every plan is priced per project — create as many projects as you want.

[Send us a message](/contact?topic=credits)

## Stop describing what your app does.

Let it do the work.

Free forever for prototypes. Plug in your routes, drop in the components, ship a real agent before lunch.
