ViteHub is still experimental. Expect bugs and breaking changes.
ViteHub docs
Add server APIs or portable Agents to a Vite application.
ViteHub adds a server layer to Vite. Use Server Primitives directly from application code, or combine them with models and tools in an Agent.
Server Primitives work without an Agent. When you build an Agent, Capabilities control which operations it can use.
Find what you need
| You are building | Start with |
|---|---|
| A new installation | Get started |
| Auth, storage, background work, schedules, sandboxes, or environment values | Server primitives |
| Model-backed actors, Agent Invocations, triggers, chat history, evals, or CLI inspection | Agents |
| Tools and product operations that an Agent can use | Capabilities |
| The difference between definitions, server APIs, Workspaces, Sources, and Capabilities | Concepts |
| Host support, generated output, or deployment support | Runtime and host support |
How ViteHub connects your code to a host
Most features use this path:
- Start with Installation.
- Register
vitehub()in the Vite configuration. - Add a definition when the feature needs a name, schema, or reusable configuration.
- Call the documented server API from application code.
- Attach a Capability if an Agent needs to call that operation.
The Vite integration discovers definitions and prepares the provider-specific files for the selected host. Application code keeps using ViteHub imports.
Check host support
Not every Server Primitive runs on every host. Check the runtime and host support matrix before you choose a deployment target.
Open Installation for a runnable path, or read Concepts when you need the runtime model.