Skip to content

docs: AgentOS durable background execution (job queue) - #759

Open
ysolanky wants to merge 14 commits into
mainfrom
docs/agentos-durable-background-execution
Open

docs: AgentOS durable background execution (job queue)#759
ysolanky wants to merge 14 commits into
mainfrom
docs/agentos-durable-background-execution

Conversation

@ysolanky

Copy link
Copy Markdown
Member

Summary

User-facing docs for AgentOS durable background execution (the v3.0 job queue, agno-agi/agno#9079). Adds a Background Execution group to the AgentOS tab with five pages:

  • agent-os/background-execution/overview - mental model (db = truth, queue.redis = coordination, durable=True = promise), quickstart, 202 contract, modes, limitations
  • agent-os/background-execution/durable-queue - the guarantee, max_attempts crash semantics, queue stores, idempotency keys, session serialization, latency, full QueueConfig reference
  • agent-os/background-execution/multi-replica - events out / cancel in via queue.redis, coordination vs db=RedisDb ticket storage, RedisCoordination
  • agent-os/background-execution/hitl-continuations - continuing a paused durable run through the queue under the same run_id
  • agent-os/background-execution/operations - /queue endpoints, requeue, stats, retention, admin gating, deployment_id

Also adds a cross-link note to the SDK-level background-execution/overview Multi-Container section.

Verification

  • Ran cookbook/05_agent_os/background_tasks/durable_queue.py and durable_continue.py (feat/v3.0, 3.0.0a4) against local Postgres. Confirmed the 202/poll contract, ticket states, /queue/stats and /queue/jobs, Idempotency-Key dedup, paused ticket, 409 on inline continue, 202 durable continue and double-click attach, cancel of a paused run, requeue behavior.
  • Every QueueConfig field re-checked against libs/agno/agno/job_queue/config.py.
  • mint broken-links and scripts/inventory/run_all.py: 0 broken links.

Review notes

🤖 Generated with Claude Code

Add an AgentOS Background Execution section covering the durable job
queue shipped in v3.0: overview and quickstart, durable queue semantics
(guarantee, max_attempts, stores, idempotency keys, session
serialization, config reference), multi-replica Redis coordination,
durable HITL continuations, and the /queue operations surface.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@mintlify

mintlify Bot commented Aug 25, 2026

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
agno 🟢 Ready View Preview Aug 25, 2026, 9:42 AM

💡 Tip: Enable Workflows to automatically generate PRs for you.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The 202 contract, PENDING status, /resume, /cancel and the db requirement
are unchanged from v2. The only default change is the per-replica
concurrency cap; durability, Redis coordination, idempotency keys and the
/queue surface are opt-in via QueueConfig. Fix the migration guide and
changelog, which presented the opt-in features as defaults.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
ysolanky and others added 2 commits August 26, 2026 14:23
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
ysolanky and others added 2 commits August 27, 2026 15:32
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Splice the four /queue paths and their schemas (QueueJobSchema,
PaginatedResponse_QueueJobSchema_) from a v3 AgentOS OpenAPI dump into
reference-api/openapi.yaml, add the schema pages and a Queue nav group,
and document the queue and event_stream AgentOS parameters.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@@ -0,0 +1,175 @@
---
title: Background Execution

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe we say Durable Background Execution?

agent_os = AgentOS(
agents=[agent],
db=db,
queue=QueueConfig(durable=True),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we not pass redis here?


## With more than one replica

Set `QueueConfig(redis=...)` as soon as you run two or more replicas behind a load balancer. One setting installs both the event stream and the cancellation manager on each replica, backed by a shared Redis, so a run started on one replica can be watched, resumed, and cancelled from any other. No `set_cancellation_manager()` or `set_event_stream()` call is needed.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok i see it here


Set `QueueConfig(redis=...)` as soon as you run two or more replicas behind a load balancer. One setting installs both the event stream and the cancellation manager on each replica, backed by a shared Redis, so a run started on one replica can be watched, resumed, and cancelled from any other. No `set_cancellation_manager()` or `set_event_stream()` call is needed.

See [Multi-replica deployments](/agent-os/background-execution/multi-replica) for what Redis does here, and why `queue.redis` is a different job from `db=RedisDb`.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we opensource this- https://github.com/agno-agi/agentos-durable and people can test if needed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants