For local runtime builders
Use this when your local automation tool is driving a browser, editor, terminal, uploader, or other app and Aion should treat that app as busy until the task finishes.
Automation integration notes
This guide explains how to keep Aion from closing an app while your local automation tool is still using it.
When to use it
Keep the main integration page as your baseline. Use this page when the base flow is clear and the remaining problem is how your tool should keep a real app protected while it works.
Use this when your local automation tool is driving a browser, editor, terminal, uploader, or other app and Aion should treat that app as busy until the task finishes.
The stable socket guide still lives on the main integration page. This page adds setup advice for real local runtimes and concrete app-launch behavior.
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 integration page. Come back here when the base flow is clear and you are tuning a specific runtime.