Summary
The agentOs() helper in rivetkit/agent-os does not expose actor-level options like sleepTimeout. Users who need to control how long the VM stays awake after the last client disconnects must patch the returned ActorDefinition config object directly:
const vm = agentOs({ ... });
(vm.config as any).options.sleepTimeout = 900_000;
This works (the config is not frozen), but it's fragile and relies on internal structure.
Requested Change
Add an actorOptions field to agentOsActorConfigSchema that passes through to the underlying actor() call, merged with the existing hardcoded values (sleepGracePeriod, actionTimeout):
const vm = agentOs({
actorOptions: {
sleepTimeout: 900_000, // 15 minutes
},
options: { software, mounts },
onPermissionRequest: ...,
});
Use Case
We run long-lived conversational agents (Pi-based) behind messaging channels. After a user pauses a conversation, we want the actor to stay awake for ~15 minutes (not the 30-second default) to avoid cold-start latency on follow-up messages. The sleepTimeout knob exists on the underlying actor() config but is inaccessible through agentOs().
Current Workaround
// Patch after creation — works but relies on internal config shape
(vm.config as any).options.sleepTimeout = 900_000;
Relevant Code
rivetkit/src/agent-os/actor/index.ts line ~199 — hardcoded options
rivetkit/src/agent-os/config.ts — agentOsActorConfigSchema (no passthrough)
Summary
The
agentOs()helper inrivetkit/agent-osdoes not expose actor-level options likesleepTimeout. Users who need to control how long the VM stays awake after the last client disconnects must patch the returnedActorDefinitionconfig object directly:This works (the config is not frozen), but it's fragile and relies on internal structure.
Requested Change
Add an
actorOptionsfield toagentOsActorConfigSchemathat passes through to the underlyingactor()call, merged with the existing hardcoded values (sleepGracePeriod,actionTimeout):Use Case
We run long-lived conversational agents (Pi-based) behind messaging channels. After a user pauses a conversation, we want the actor to stay awake for ~15 minutes (not the 30-second default) to avoid cold-start latency on follow-up messages. The
sleepTimeoutknob exists on the underlyingactor()config but is inaccessible throughagentOs().Current Workaround
Relevant Code
rivetkit/src/agent-os/actor/index.tsline ~199 — hardcoded optionsrivetkit/src/agent-os/config.ts—agentOsActorConfigSchema(no passthrough)