Skip to main content

Module background

Module background 

Source
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).

Structs§

BackgroundJobs
One session’s background jobs. Dropping the store (with the session’s tools) cancels every job still running.
JobReport
A finished job not yet seen by the model, for a server-started report turn.

Functions§

report_prompt
The server-started turn that reports finished jobs to the model.