# Celery — card for AI agents

Distributed task queue for Python executing jobs asynchronously across workers.

Category: Jobs, queues and workflows · PyPI package `celery` · latest version 5.6.3 (checked 2026-11-01)
Install: `pip install celery`
License: BSD-3-Clause (permissive)

In your own product (generator, app, hosted service): **yes**. Permissive license: ship it inside your own product, closed or open source, and keep its license and copyright notice.

## Rules for AI agents (paste into AGENTS.md or CLAUDE.md)

## Celery
- Create the Celery app where other modules can import it. For larger projects use a dedicated module such as `proj/celery.py`, and list task modules in `include=[...]` so the worker can find them.
- Results are disabled by default. Only set a `backend` when you need state or return values. Otherwise leave results off, or set `@task(ignore_result=True)` on single tasks.
- With a result backend, call `get()` or `forget()` on every `AsyncResult`. Do not rely on `result.get()` in normal flow, because it turns the asynchronous call into a synchronous one.
- Use `apply_async()` instead of `delay()` when a call needs a specific `queue` or `countdown`.
- Keep periodic task intervals and task routing options in a central configuration module instead of hard-coding them.
- When raising worker concurrency with `-c`, note the docs say more than twice the number of CPUs is rarely effective.
- In production, run workers in the background with `celery multi` or a tool like supervisord. Use `celery multi stopwait` so running tasks complete before exit.

## What it is
- Celery is a distributed task queue for Python. It is published as `celery` on PyPI under the BSD-3-Clause license, and the GitHub repository was created on 2009-04-24. The docs describe it as "a task queue with focus on real-time processing, while also supporting task scheduling."
- A client puts a task message on a queue. A broker, such as RabbitMQ or Redis, delivers it to a worker process. Results are a separate, optional piece. To read return values or track task state, you configure a result backend.
- The project site calls it a system "to process vast amounts of messages" that also gives operators tools to maintain it. The README says it can run on one machine, on several, or across datacenters. Its integration table marks Django, Flask and FastAPI as "not needed", which means no extra glue package is required.

## Caveats
- Windows is not supported: The maintainers say Windows "should be working" but is not supported, and they ask users not to open issues about it.
- Python 3.10 needed from 5.7: The README says 5.6.x is the last series to support Python 3.9. Older Pythons need older Celery releases.
- Redis as broker is less durable: The docs call Redis feature-complete as a broker. They also say it is more exposed to data loss than RabbitMQ.
- Every AsyncResult needs get() or forget(): The docs warn that result backends use resources to store and send results. To release those resources, you must eventually call `get()` or `forget()` on every `AsyncResult` a task call returns.
- Redis and SQS need a visibility timeout: Caktus writes that Redis and SQS lack built-in late acknowledgment, which requires a visibility timeout setting. They say this can be important for long-running tasks.

## Numbers (AgentGid data)
- Gid Score: 70.5 (#363 of all tools, 1 of 48 in its category)
- Used in 37 public projects set up for AI coding agents (0.6%)
- Downloads last week: 13,310,713 (as of 2026-11-24), +11.8% over 4 weeks
- GitHub stars: 29,259 (as of 2026-11-24)
- Last push: 2026-11-24

## Often used with
redis (Python) 83.8%, Uvicorn 75.7%, FastAPI 73.0%, Pydantic 62.2%, python-dotenv 62.2%, SQLAlchemy 62.2%

## Checked alternatives (same job)
- arq: https://agentgid.com/tools/arq/agent.md
- Huey: https://agentgid.com/tools/huey/agent.md

## Links
- AgentGid page: https://agentgid.com/tools/celery/
- Homepage: https://docs.celeryq.dev/
- Repository: https://github.com/celery/celery
- Source: https://github.com/celery/celery#readme
- Source: https://github.com/celery/celery
- Source: https://github.com/celery/celery/releases
- Source: https://docs.celeryq.dev
- Source: https://docs.celeryq.dev/en/stable/getting-started/first-steps-with-celery.html
- Source: https://docs.celeryq.dev/en/stable/getting-started/next-steps.html

---
AgentGid's catalog is curated: every entry was checked against the maker's official pages (registry, repository, license and pricing pages) on the date shown; a license value shows the quote it stands on wherever AgentGid has one. Usage numbers come from AgentGid's own scan of public repositories set up for AI coding agents. Claims by makers are reported, not tested by AgentGid.
