A task defines background work. It is the target that a task run executes.Tasks exist because some work should be named and reusable before it is run. A
task describes what background work does. A run records one durable execution of
that work.
A task is the definition. A run is the durable execution of that definition. Keep
that boundary clear.Use a task when work should run outside a request or chat turn. Tasks are useful
for sync runs, imports, cleanup, and other background operations.
Do not use a task for interactive model reasoning, streamed chat output, or work
that must stay inside the current HTTP request. Use an agent or app route for
those cases.For implementation steps, see Tasks.