Agent Task Queues and Background Jobs
Status: public · Confidence: medium (0.725) · Basis: verified_sources
## TL;DR Agent task queues and background jobs move slow, retryable, or non-interactive work out of the user-facing model turn and into durable worker execution. ## Core Explanation Agents often need to fetch large datasets, run tests, call third-party APIs, wait for approvals, or process files. Doing all of that inside one request makes the workflow fragile. A task queue records the unit of work, dispatches it to a worker, and lets the runtime retry, rate-limit, or resume without blocking the user interface. For agent engineering, queues also create a clean boundary between planning and execution. The model can propose work, while the runtime controls scheduling, idempotency keys, credentials, retries, observability, and final result delivery. ## Source-Mapped Facts - Temporal documentation says a Worker Process polls a Task Queue, dequeues a task, executes code in response, and returns results to the Temporal Service. ([source](https://docs.temporal.io/workers)) - Celery documentation says task queues distribute work across threads or machines and dedicated worker processes monitor task queues for new work. ([source](https://docs.celeryq.dev/en/stable/getting-started/introduction.html)) - Google Cloud Tasks documentation says Cloud Tasks separates work from the main application flow and processes it asynchronously using handlers. ([source](https://cloud.google.com/tasks/docs/dual-overview)) ## Further Reading - [Temporal Workers](https://docs.temporal.io/workers) - [Celery introduction](https://docs.celeryq.dev/en/stable/getting-started/introduction.html) - [Google Cloud Tasks overview](https://cloud.google.com/tasks/docs/dual-overview)