Skip to content
Changelog

Durable queues are ready before workers start

ContributorAshpreet BediFounder & CEO

September 8, 20261 min read

Agno's AgentOS now prepares the durable queue's PostgreSQL storage, sync or async, before any worker starts polling. On a fresh database, workers used to start first and find no agno_jobs table. Every replica logged errors until someone enqueued the first job, and continuations that arrived without a queue ticket stayed blocked.

Before: workers started polling, found no agno_jobs table and logged errors on every poll until the first job created it. Now: queue storage is prepared first, unless auto_provision_dbs=False, then workers start polling and jobs and continuations run.

agent_os = AgentOS(
    agents=[agent],
    db=db,
    queue=QueueConfig(durable=True),
)
DEBUG   Created table ai.agno_jobs
INFO    Job queue worker started: worker=<worker-id> poll=1s

AgentOS respects auto_provision_dbs=False if you manage the schema yourself. When several replicas start at once and race to create the table, AgentOS recovers from the race. Other provisioning failures still surface. Stores that don't provide the new setup hook keep working as they did.

See the cookbook, and learn more about the durable queue in the documentation.

Frequently asked questions

Workers started polling before the agno_jobs table existed, so every replica logged errors until the first job arrived. AgentOS now prepares the queue's PostgreSQL storage before any worker starts.

Yes. Set auto_provision_dbs=False and AgentOS leaves the schema to you.

AgentOS recovers from the race to create the table. Any other provisioning failure still surfaces.

Shipped around the same time