sqlite("file:///path/to/agent.db") only when you already have a file path. The no-argument form is the one that uses the document directory.
ownerId defaults when you omit it. Set it when more than one process or session might open the same file. A stolen or expired claim cannot commit.
Observing the host
runtime.observe reports model requests, tool requests, commits, and the point where reconciliation is required. The listener is local. It is not a Cloud upload.
Closing
close() waits for in-flight steps, releases ownership, and stops the telemetry timer if one is running. It does not flush telemetry and it does not delete the database. Do not call close() from an engine hook.