What you write vs what Capsule manages
That split is the reason Capsule feels faster than stitching together a model wrapper, a web stack, a worker queue, storage, and channel adapters yourself. You are still building the product logic. You are just not rebuilding the same scaffolding every time.
What changes when the app gets real
The first version of an agent is often a single handler. That is fine. But once users depend on it, the shape usually changes:- the app needs durable state, not just chat history
- the app needs workflow pages, not just free-form text
- the app needs async work that should not block the reply
- the app needs to show up in more than one place
- the app needs users to sign into the product, with access scoped to that app
- the app needs a deploy story that looks like a product, not a demo script
One definition, multiple surfaces
cpsl.App sits at the center of the system. The same definition can declare:
- the runtime image
- chat handlers
- pages and data handlers
- collections and settings
- tasks and schedules
- integrations, filesystems, and secrets
- channels, pricing, and deploy behavior
A runtime per app user
Capsule runs your app inside a managed, sandboxed runtime per app user. That gives you a consistent place for sessions, handlers, task execution, integrations, and mounted filesystems to live. The unit here is the app user, not a global Capsule identity. That is what lets one deployed app have its own user pool and its own authenticated surfaces. This is one of the biggest differences from a plain library. You are not just importing a chat helper. You are defining something Capsule can actually run, route, and expose as a product.Product primitives instead of app glue
Real apps need a few boring but important things:- durable records
- long-running work
- authenticated connections to outside systems
- storage for generated files and uploads
- workflow UI for operators or end users
When Capsule is the right fit
Capsule is a strong fit when the model is only one part of the application:- customer-facing assistants that need real product surfaces
- multi-channel agents that have to meet users where they already are
- team copilots with dashboards, review flows, and operator tasks
- vertical AI products that need files, schedules, integrations, and durable state