Session lifecycle
Trylane’s worker schedules provisioning, resets and expiry. Your agent does the actual work against your database.
// Your agent: one long-running process beside your demo app.
await demo.run(adapter, abortController.signal);Provisioning
Starting a session checks your plan limits and reserves a start. The agent receives a job with a fixed recipe version, resource generation, expiry and row limit. Provisioning is transactional and safe to retry.
Leases and retries
The agent runs up to two jobs at a time per product. Leases last 30 seconds. Failed attempts back off by five seconds per attempt; after five, the job is marked failed in your dashboard where you can retry it.
Reset and unpublish
Reset counts as another start: it cleans up the previous data and seeds a fresh copy without extending the deadline. Unpublishing a demo invalidates every grant and schedules cleanup.
Expiry and cleanup
Access ends at the deadline even if the worker is late. The session is marked expired only after your agent confirms cleanup, so keep the agent running until sessions finish.
See every step from the visitor’s side.
Try the Ledger example