The server layer for Vite apps.
Databases, storage, queues, workflows, and more. Use one API in your app and deploy it to your choice of cloud.
Agent
Portable automation
KV
State and cache
Database
Relational data
Blob
Files and uploads
Queue
Background jobs
Workflow
Durable orchestration
Auth
Users and sessions
Schedule
Recurring work
Workspace
Persistent file trees
Sandbox
Isolated execution
Env
Typed configuration
Logs
Structured logs
Content
Parse and search
Source
Read-only content
Connections
Connected account APIs
AI Gateways
Model request routing
Realtime
Collaborative documents
Browser
Browser operations
Shell
Command execution
Channels
Named message delivery
Email
Transactional email
Rate Limit
Request budgets
CMS
Editable documents
Comments
Feedback on live pages
UI
Agent interfaces
Write once.
Deploy anywhere.
Same code on every host. The host picks the provider.
server/api/settings.get.tsStore data docsDocs
import { defineEventHandler } from "h3"
import { kv } from "vite-hub/kv"
export default defineEventHandler(async () => {
const [error, settings] = await kv.get("settings")
if (error) throw error
return settings
})
Provider per host
- CloudflareWorkers KV
- VercelUpstash Redis
- DenoDeno KV
- Nodefs-lite or Upstash
Define an Agent in one file.
An Agent is one more file in your server. It deploys with your app and uses the same storage as your routes.
import { defineAgent } from "vite-hub/agent"
import { browser, kv } from "vite-hub/agent/capabilities"
import { github } from "vite-hub/agent/channels"
export default defineAgent({
description: "Reviews pull requests.",
channels: {
github: github({ pullRequest: { reconcile: { events: ["opened"] } } }),
},
driver: "codex",
workspace: { mode: "write" },
capabilities: [browser(), kv({ mode: "write" })],
})
import { defineEventHandler } from "h3"
import { kv } from "vite-hub/kv"
export default defineEventHandler(async () => {
const [error, keys] = await kv.keys()
if (error) throw error
return keys
})
Ship the server part with your Vite app.
- No account to start
- Apache-2.0
- Migrate from NuxtHub
- Runs onCloudflare, Vercel, Netlify, Deno, Node