For local runtime builders
Use this page when your local automation runtime is actively driving a browser, editor, terminal, uploader, or other app and you need Aion to treat that app as in-use instead of ordinary idle background clutter.
AI Integration Notes
This guide collects practical integration advice for keeping Aion from auto-closing an app while your local automation runtime is still actively driving it.
When to use it
Keep the main AI Integration page as your baseline. Use this page when you already understand the base integration flow and now need a more workable setup for apps that are actively owned by a local automation runtime.
Use this page when your local automation runtime is actively driving a browser, editor, terminal, uploader, or other app and you need Aion to treat that app as in-use instead of ordinary idle background clutter.
The stable socket integration guide still lives on the main AI Integration page. This page adds practical runtime guidance on top of that guide without turning every validated example into a compatibility promise.
Symptoms
The app opens under automation, then disappears before the real task flow can settle.
The same app and task work in normal user operation, but fail only when the local runtime is driving them.
A long import, sync, upload, or app-driven workflow begins correctly but does not stay protected long enough to finish.
Recommended approach
App identity
Boundary
Minimal shape
The important point is not the syntax. It is the order: real app surface first, lease acquisition second, explicit cleanup at the end.
resource = launch_or_attach_to_real_app(...)
liveSurface = create_real_surface(resource)
with aion_lease(appKey):
# do the owned app work here
...
Examples
One concrete validation example is Playwright driving Chrome on macOS. In that case, the more reliable approach was: create a real page first, prefer the profile-derived Chrome key, and keep the lease renewed while the browser owns live work.
If your runtime is driving some other app surface, keep the public lease flow unchanged and adapt only the app-launch, app-identity, and live-work detection layers.
Troubleshooting
Check the app key first. The best key is usually the most specific valid identity for the real app instance you just launched, not the loosest fallback.
Check the ordering first: real app surface first, lease second. In many integrations, that ordering matters more than later retries.
Make sure renewals continue in the background and that close checks extend the lease while the app is still actively in use.
If you still need the socket path, handshake, action list, or response codes, start with the main AI Integration page. Come back here when the base integration flow is clear and the remaining problem is how your runtime should own an app safely.