Routes are just files
app/page.tsx → /. Layouts, errors, loading, not-found — no config.
Search, memory, real auth, real domain, real-time updates — wired before you write the first agent.
Apache-2.0. TypeScript end to end. Deploys to TheoCloud, Vercel, Cloudflare Workers, or any Docker host.
$ npx create-theokit my-appChatbots live inside someone else's messaging app. Cursor lives in your editor. A generic framework leaves you stitching primitives. The agent your customers actually pay for needs something different — a real domain, real authentication, real-time updates, a real product. TheoKit is that product shape, ready out of the box.
app/page.tsx → /. Layouts, errors, loading, not-found — no config.
Schemas in, types out, end-to-end on server and client.
CSRF, validation, serialization handled.
AES-256-GCM cookies, `requireAuth` narrows the type.
Drop a file in server/ws/, it is a real-time endpoint.
Node, Vercel, Cloudflare Workers. Or `theokit docker` + `theo deploy` to ship via TheoCloud.
// server/routes/users.ts
import { defineRoute, requireAuth } from 'theokit/server'
import { z } from 'zod'
export const GET = defineRoute({
query: z.object({ search: z.string().optional() }),
handler: ({ query, ctx }) => {
requireAuth(ctx.user)
return { users: [{ name: 'Alice' }] }
},
})
// app/dashboard/page.tsx
import { theoFetch } from 'theokit/client'
import type { GET } from '../../server/routes/users'
const data = await theoFetch<typeof GET>('/api/users', { query: { search: 'alice' }})A route. A WebSocket. A typed client call. Three files. No glue.
The agent ecosystem has two halves. Frameworks for orchestrating agents. Frameworks for shipping apps. Most teams build the agent, then realize they need an app — and stitch six libraries together.
| Capability | TheoKit | Mastra | Vercel AI SDK + Next.js | Roll your own |
|---|---|---|---|---|
| Frame | Build the app your agent lives in | Build stateful AI agents with memory, tools and MCP | Wrap LLM calls in a Next.js app | Pick six libs, glue them |
| File-based routing | Yes | DIY | Next.js | Next.js |
| Typed RPC client | theoFetch<typeof GET> | DIY | DIY | DIY |
| Encrypted sessions | AES-256-GCM, requireAuth | DIY | DIY | DIY |
| WebSocket as a file | Yes | DIY | Needs separate WS server | DIY |
Mastra builds the agent. TheoKit ships the product around it — real agents, real apps, not yet another chat widget. You can use both.
Agents built in 2026 are starting to charge subscriptions. They need the app surface — domain, auth, real-time, deploy — not just the loop.
$ npx create-theokit my-appRead the docs → github.com/usetheodev/theokit
Next in the funnel: theo login + ship via TheoCloud