Expand description
Background delegations: an agent call with background: true returns a
job handle at once while the agent keeps working; agent_status and
agent_wait observe the job, agent_cancel stops it, and the session is
told when it finishes so the server can report it in a turn of its own.
Each call that starts a job, or shows the model a job’s result, leaves a
JobChange under its call ID, which the server hands to the session’s
clients with the call’s tool.completed (BackgroundJobs::take_changes).
A finished job stays unreported until a report turn about it succeeds. A
failed one makes it due again after a delay, a bounded number of times;
after that, or when another turn must not be tried, the server reports it
to the client directly (BackgroundJobs::report_failed).
A call that continues a conversation takes its place in that conversation’s lane as it arrives. When a turn or another call is ahead, the call’s busy policy decides: it steers the running turn, waits in the foreground, fails, or becomes a queued job that runs once its place comes up.
Structs§
- Background
Jobs - One session’s background jobs. Dropping the store (with the session’s tools) cancels every job still running.
Enums§
- Report
Failure - What a failed report turn leaves its jobs to.
Functions§
- delivered_
note - What the model is told of jobs the server reported directly, because
their report turns failed with
error: the user has their results. - report_
prompt - The server-started turn that reports finished jobs to the model.