Skip to content
TYPESCRIPT FRAMEWORK · AI AGENTS

Build the app your agent lives in.

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.

  • 4Templates
  • 4Deploy targets
  • File-basedRouting
  • TypedRPC client
  • AES-256-GCMSessions
  • Apache-2.0License
$ npx create-theokit my-app

Chatbots 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.

What you get

Concretely, what ships.

Routes are just files

app/page.tsx → /. Layouts, errors, loading, not-found — no config.

APIs that validate themselves

Schemas in, types out, end-to-end on server and client.

Server actions without plumbing

CSRF, validation, serialization handled.

Encrypted sessions, one helper

AES-256-GCM cookies, `requireAuth` narrows the type.

WebSocket as a file

Drop a file in server/ws/, it is a real-time endpoint.

Three native build targets

Node, Vercel, Cloudflare Workers. Or `theokit docker` + `theo deploy` to ship via TheoCloud.

Feel it
typescript
// 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.

What you'd ship

Things you would actually build.

  • 01Customer-facing agent dashboard. The surface where your users talk to the agent.
  • 02Real-time agent control panel. Stream tool calls and step events into the UI as they happen.
  • 03Multi-tenant agent SaaS. Per-user sessions, per-request context, isolated state.
  • 04Agent admin tool with audit log. Staff-only routes guarded by `requireAuth`.
  • 05Webhook + messaging gateway. Receive webhooks, fan them out to your agent.
  • 06B2B agent product. Onboarding, billing webhook, dashboard — deployable.
Why TheoKit

How it compares.

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.

CapabilityTheoKitMastraVercel AI SDK + Next.jsRoll your own
FrameBuild the app your agent lives inBuild stateful AI agents with memory, tools and MCPWrap LLM calls in a Next.js appPick six libs, glue them
File-based routingYesDIYNext.jsNext.js
Typed RPC clienttheoFetch<typeof GET>DIYDIYDIY
Encrypted sessionsAES-256-GCM, requireAuthDIYDIYDIY
WebSocket as a fileYesDIYNeeds separate WS serverDIY

Mastra builds the agent. TheoKit ships the product around it — real agents, real apps, not yet another chat widget. You can use both.

Why now

Agents built in 2026 are starting to charge subscriptions. They need the app surface — domain, auth, real-time, deploy — not just the loop.

Status

Honest claims only.

  • Beta. Framework, CLI, four templates (default, dashboard, api-only, postgres), and four deploy targets all shipped.
  • Public API surface stable. Agent layer (agents/ directory) on the roadmap.
  • Documentation site on the roadmap. Today README is canonical.

Build the app your agent lives in.

$ npx create-theokit my-app

Read the docs → github.com/usetheodev/theokit

Next in the funnel: theo login + ship via TheoCloud