The Best DX
server.ts
123456789101112131415
client.ts
12345678910
Features
01Composable Agents
Build larger agent systems from smaller agents, tools, and shared runtime parts.
02Multi-Provider
Swap models with one line. Same API across supported providers.
+more
03Plugins
Add app-level guards, event middleware, schema, and server endpoints with plugins.
authipAllowlistloggingrateLimitguardsmiddlewaresendpointspoliciesauthipAllowlistloggingrateLimitguardsmiddlewaresendpointspolicies
04Framework Agnostic
Use Better Agent with your stack instead of building around a fixed app framework.
Astro
Next.js
Nuxt
Preact
Remix
Solid
Svelte
05Event Driven
Listen to structured runtime events for runs, messages, tools, and approvals.
06Durable Runs
Replay streams and resume conversations from saved run state.
07Human in the Loop
Pause sensitive tool calls until a user submits an approval decision.
08Structured Output
Attach output schemas to agents or runs and get validated typed results back.
09Client and Server Tools
Use tools that run on the server, return on the client, or come from the provider.
Works with
Node.js
Bun
Deno
Cloudflare
Primitives
Build on the primitives you need
export const supportAgent = defineAgent({
name: "support",
model: openai.model("gpt-5.4"),
instruction: "Help users resolve account issues.",
tools: [searchDocsTool, createTicketTool],
});Try it out
npm create better-agentTerminal
