Psi exposes delayed scheduler control through psi-tool.
The scheduler is intentionally one-shot and volatile:
Scheduler requests use:
{:action "scheduler"
:op "create" | "list" | "cancel"}
Create supports two explicit kinds:
"message" — deliver a delayed prompt into the originating session"session" — create a delayed fresh top-level session and submit the prompt therekind: "message"Delayed prompt injection into the invoking/origin session.
Example:
{:action "scheduler"
:op "create"
:kind "message"
:label "check-build"
:delay-ms 600000
:message "Check whether the build finished."}
Semantics:
kind: "session"Delayed creation of a fresh top-level session in the same worktree/context as the origin session, followed by prompt submission into that new session.
Example:
{:action "scheduler"
:op "create"
:kind "session"
:label "morning-review"
:at "2026-04-22T13:00:00Z"
:message "Review the overnight changes and summarize risks."
:session-config {:session-name "Morning review"
:thinking-level :high
:cache-breakpoints #{:system}
:preloaded-messages [{:role "user"
:content [{:type :text :text "Context: review the last merged PR first."}]
:timestamp #inst "2026-04-22T12:59:00Z"}]}}
Semantics:
kind: "session" delivery:scheduled-origin-session-id:scheduled-from-schedule-id:scheduled-from-labelsession-config subsetCurrent supported scheduler session-config keys:
:session-name:system-prompt:model:thinking-level:skills:tool-defs:developer-prompt:developer-prompt-source:preloaded-messages:cache-breakpoints:prompt-component-selectionUnsupported keys are rejected explicitly.
Exactly one of these delay forms is required:
:delay-ms:atBounds:
1000ms24hKind-specific rules:
kind: "message" requires :message and forbids :session-configkind: "session" requires both :message and :session-configList pending scheduler entries for the invoking session:
{:action "scheduler"
:op "list"}
Default scheduler summaries are compact.
Common summary fields include:
:schedule-id:kind:label:status:origin-session-id:fire-atSession-kind summaries also include compact :session-config-summary fields such as:
:session-name:model:thinking-level:skill-count:tool-count:preloaded-message-countCancel a pending or queued schedule:
{:action "scheduler"
:op "cancel"
:schedule-id "sch-..."}
Cancel works on:
:pending:queuedDelivered schedules are not cancellable.
Scheduler statuses are:
:pending:queued:delivered:cancelled:failedFor kind: "session", failure can preserve delivery-phase detail such as:
:create-session:prompt-submitIf session creation succeeds but prompt submission fails, the schedule becomes :failed and still records the created session id.
Scheduler projections now expose explicit public attrs such as:
:psi.scheduler/kind:psi.scheduler/origin-session-id:psi.scheduler/created-session-id:psi.scheduler/delivery-phase:psi.scheduler/error-summary:psi.scheduler/session-config-summaryThese are available through the live EQL graph and are also reflected in psi-tool scheduler summaries.
The scheduler is scoped to the invoking session/context. It is not a general cross-session orchestration API.
kind: "session" is intentionally the delayed creation of a fresh top-level session, not child-session creation.
Can you improve this documentation?Edit on GitHub
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |