The Bkper Platform
The Bkper Platform provides managed app hosting, shared private source, authentication, an AI gateway, managed agents, previews, logs, secrets, storage, and local event delivery.
The Bkper Platform is a complete managed environment for building, deploying, and hosting apps on Bkper. It removes infrastructure complexity so you can focus on business logic.
What the platform provides
Hosting
Apps are deployed to {appId}.bkper.app on a global edge network powered by Cloudflare Workers for Platforms. Your app runs close to your users, with zero infrastructure to manage.
Preview environments are built in — deploy to a preview URL to test before going to production.
App APIs
The same Worker can expose app-defined /api/* routes. Treat those routes as the reusable contract for your app behavior:
- The bundled web client can call them.
- Scripts, external clients, and agents can call them too.
- The default template documents them with an app OpenAPI spec at
/openapi.json.
AI gateway
Apps call Bkper AI models through the AI gateway, with no provider accounts or keys:
- Language models — multi-provider models over the Open Responses protocol, for text and structured output.
- Decision models — typed answers with calibrated confidence: yes or no, one of your options, or a level on a scale.
Usage counts against the user’s included Bkper AI allowance. An authenticated app API route or event establishes the user and app identity, and the platform adds authorization and usage attribution to the Worker’s requests. For inference used only by the UI, the client can also call Bkper AI directly with the signed-in user’s token.
See Add Bkper AI to an App for the authentication flow and SDK setup.
Managed agents
Build your own agent, such as a chat inside a Book or a Slack bot, on the Managed Agent API. Your app keeps its screens and instructions; Bkper runs the rest:
- The agent loop — models, tool calls, and durable sessions that continue across apps, including Bkper Agent.
- A dedicated sandbox machine for each user — the
bkperCLI, Node, Python, and a persistent workspace for files and reports. - The user’s permissions — the agent acts as the user, and credentials never enter the machine.
See Add Bkper AI to an App → Run an agent.
Authentication
OAuth is pre-configured. No client IDs, no redirect URIs, no consent screens to build.
- Web client — Use
@bkper/web-auth:auth.getAccessToken(). See App Architecture → Client authentication. - Server API routes — Send
Authorization: Bearer <token>to/api/*; dispatch validates it and platform outbound injects auth for server-side Bkper API calls. See App Architecture → Server API authentication. - Event handlers — Handle
/eventsin the same Worker and call Bkper with server-sidenew Bkper(); dispatch/outbound handle auth and agent identity. See Event Handlers → Authentication. - Local development — The Vite auth middleware uses your CLI credentials. See Development Experience → Local development authentication.
Services
Declare the services you need in bkper.yaml and the platform provisions them:
- KV storage — Key-value storage for caching and state. Access via
c.env.KVin your handlers. - Secrets — Securely stored environment variables. Set via
bkper app secrets put, access viac.env.SECRET_NAME.
Developer experience
The project template composes the full development environment:
npm run devThis runs two processes concurrently: vite dev for the client UI (HMR), and bkper app dev for the Worker runtime (Miniflare for /api/* and /events, plus a Cloudflare tunnel so Bkper can route webhook events to your laptop). Your entire development environment, running locally.
Shared app source
Bkper can host one private codebase for your app. Authorized teammates and coding agents can clone it, improve it locally, and continue building from the same shared history.
Source synchronization remains separate from deployment. A Git push stores source but never builds or deploys the app.
See Shared App Source for the collaboration workflow, access rules, and external Git options.
Deployment
Check and deploy the app template:
npm run checknpm run deployYour app is live at {appId}.bkper.app. The platform handles routing, SSL, and edge distribution.
What you’d build yourself without it
Without the platform, creating a Bkper app with a UI, event handling, and authentication requires:
| Concern | Without the platform | With the platform |
|---|---|---|
| Hosting | Provision servers, configure domains, SSL, CDN | bkper app deploy |
| Authentication | Register OAuth client, build consent screen, handle token refresh, manage redirect URIs | auth.getAccessToken() |
| Event webhooks | Set up a public endpoint, configure DNS, handle JWT verification | Declare in bkper.yaml, platform routes events |
| Local dev webhooks | Install ngrok or similar, manually configure tunnel URL | bkper app dev starts tunnel automatically |
| Secrets | Set up a secrets manager, configure access | bkper app secrets put |
| KV storage | Deploy Redis/Memcached, manage connections | Declare KV in bkper.yaml |
| Preview environments | Build a staging pipeline | bkper app deploy --preview |
| Shared app source | Operate a separate private Git host | Managed source for app developers and agents |
| AI models | Open provider accounts, manage API keys, pay separate bills | AI gateway with the included Bkper AI allowance |
| Agents | Run the agent loop and a sandbox for each user, persist sessions and files, keep credentials out | Managed Agent API |
| Type safety | Manually create type definitions | env.d.ts auto-generated |
The platform eliminates all of this. You write business logic, the platform handles infrastructure.
Getting started
# Create a new app from the templatebkper app init my-appcd my-app
# Install dependencies and start developingnpm installnpm run devThis gives you a working app with a client UI, server API routes, and /events handling in one Worker — all running locally with full HMR and webhook tunneling.
Next steps
- Your First App — Build and deploy a complete platform app
- Shared App Source — Collaborate from one private codebase
- App Architecture — Understand how platform apps are structured