---
title: 'Framework adapters'
description: 'Connect Studio authentication and proxy requests to your framework.'
---

# Framework adapters

Adapters belong in server route modules, not the Studio client bundle. Preserve the complete route and HTTP-method setup from your framework quickstart.

| Framework              | Entry point                      | Factory                                           |
| ---------------------- | -------------------------------- | ------------------------------------------------- |
| Next.js                | `@flexkit/studio/nextjs`         | `createFlexkitApiHandler(dependencies, options?)` |
| Astro                  | `@flexkit/studio/astro`          | `createFlexkitAstroHandler(options?)`             |
| TanStack Start / Fetch | `@flexkit/studio/tanstack-start` | `createFlexkitFetchHandler(options?)`             |

Next.js dependencies are `NextResponse`, `cookies`, and `headers`. The returned object provides GET, POST, PUT, PATCH, and DELETE handlers. Keep the Node.js runtime for the documented Next.js integration.

Shared options include `projectId`, `tools`, and `skills`. The project ID supports local runtime connection; tool and skill definitions must remain server-side. The lower-level `handleFlexkitRequest` and its context/result types are available for adapter authors who need to perform the framework response conversion themselves.

## Deployment requirements

The server handler must execute dynamically; a static-only export cannot serve authentication or tool invocation. Configure catch-all routing, preserve cookies and response headers, and verify deep Studio links after deployment.

Use the complete [Next.js](/docs/quickstart), [Astro](/docs/quickstart/astro), or [TanStack Start](/docs/quickstart/tanstack-start) example. For tools, follow [registration and discovery](/docs/automations/custom-tools).


---

[View full sitemap](/docs/sitemap.md)
