Application execution ownership
Coordinate admission, dispatch, publication and cleanup without introducing another Agent loop.
Choose embedded or borrowed execution
createEmbeddedAgentRuntime owns a private Worker and shares its lifetime across participating Agents. createAgentRuntime borrows an injected Worker; its native target must start and stop that Worker explicitly.
An Agent start registers its handler, but does not make a borrowed Worker consume a queue. Observe runtime.getStatus for Worker health, then separately check the dependencies your application needs. It is not a provider or store readiness probe.
Join the whole application operation
import { AgentExecutionCoordinator } from "@smoothie-framework/agent-execution";
import { ThreadAdmissionGate } from "@smoothie-framework/agent-threads";Use one process admission gate across participating owners and one coordinator per authorized owner. Admission covers execution through validated terminal publication and cleanup—not just model completion. Browser subscriptions borrow executions; they do not own admission leases.
The coordinator's submit, wait, stop and close operations supervise application-provided execution handles. It does not supply a transcript UI, a second model loop or a distributed scheduler.
Persist acceptance before dispatch and reconcile ambiguous outcomes. Failed publication or cleanup can fence the thread; do not silently redispatch accepted work. Resource and owner IDs are scope, not authorization.