---
title: Framework guides
description: Mount Agentside in any framework that hands you a fetch Request, or convert its static build output.
---

Agentside needs two things from a framework: the incoming `Request` and a way to render the regular page as a `Response`. Every integration is a variation of the same line.

```ts
const response = await twins.handle(request, () => renderPage(request));
```

Keep the `agentside()` call in its own module so the routes, cache and variants are created once per process.

Pages your framework prerenders never reach that line at request time. For those, run `prerenderHtml` over the build output and let the CDN route agents to the `.md` files, as each guide shows under "Static output" and [Static sites](/docs/static-sites) explains in full.

**[Astro](/docs/frameworks/astro)**

src/middleware.ts or a static dist

**[SvelteKit](/docs/frameworks/sveltekit)**

The handle hook in hooks.server.ts

**[Nuxt](/docs/frameworks/nuxt)**

Nitro server middleware

**[Next.js](/docs/frameworks/nextjs)**

proxy.ts, middleware.ts or a static export

**[TanStack Start](/docs/frameworks/tanstack-start)**

A global request middleware

**[Hono](/docs/frameworks/hono)**

The first app.use middleware

**[Cloudflare Workers](/docs/frameworks/workers-and-bun#cloudflare-workers)**

In front of the assets binding

**[Bun](/docs/frameworks/workers-and-bun#bunserve)**

Around a Bun.serve fetch handler

**[Vercel](/docs/static-sites#negotiating-at-the-cdn)**

CDN routes for static output
