Catalog PyPI
PACKAGE EXPLORERView in registry

a2a-distributed

PyPI

Add your description here

Versions collected1
Direct dependencies5From release 0.0.0
Last observed20 Oct, 16:24 UTC

README

Version 0.0.0 documentation

a2a-distributed

a2a-distributed provides distributed execution capabilities for A2A agents. It allows you to offload agent execution to background workers using popular task queues like Celery, BullMQ, or RQ (Redis Queue).

Architecture

The package follows a Client/Worker architecture:

  1. DistributedAgentExecutor (Client Side): Used by the A2A server to enqueue agent execution tasks into a distributed queue.
  2. DistributedAgentWorker (Worker Side): A background process that listens to the queue, reconstructs the execution context, and runs the agent using a local AgentExecutor.

Exports

Base Classes

  • DistributedAgentExecutor: Abstract base class for all distributed executors.
  • DistributedAgentWorker: Abstract base class for all distributed workers.

Celery Implementation

  • CeleryAgentExecutor: Enqueues tasks to Celery.
  • CeleryAgentWorker: Handles Celery tasks.

BullMQ Implementation

  • BullMQAgentExecutor: Enqueues jobs to BullMQ.
  • BullMQAgentWorker: Processes BullMQ jobs.

RQ Implementation

  • RQAgentExecutor: Enqueues jobs to Redis Queue.
  • RQAgentWorker: Processes RQ jobs.

Utilities

  • run_worker: A utility function to run any DistributedAgentWorker with built-in signal handling for graceful shutdown.

Usage Example

1. Setting up the Executor (Client Side)

from a2a_distributed import BullMQAgentExecutor

# Initialize the executor with connection options
executor = BullMQAgentExecutor(
    queue_name="agent-tasks",
    redis_opts={"host": "localhost", "port": 6379}
)

# Use it in your A2A server configuration
# server = A2AServer(executor=executor, ...)

2. Setting up the Worker (Worker Side)

import asyncio
from a2a_distributed import BullMQAgentWorker, run_worker
from a2a.server.agent_execution import LocalAgentExecutor
from a2a_redis import RedisEventQueue

async def main():
    # 1. Local executor that actually runs the agent logic
    local_executor = LocalAgentExecutor(...) 
    
    # 2. Event queue for reporting status/results back
    event_queue = RedisEventQueue(...)
    
    # 3. The Distributed Worker
    worker = BullMQAgentWorker(
        agent_executor=local_executor,
        event_queue=event_queue,
        queue_name="agent-tasks",
        redis_opts={"host": "localhost", "port": 6379}
    )
    
    # 4. Run the worker using the utility
    await run_worker(worker)

if __name__ == "__main__":
    asyncio.run(main())

Running Workers

To run a worker, simply call await worker.run() or use the run_worker(worker) utility which handles SIGINT and SIGTERM signals for you.

For Celery and RQ, the workers are often started via their respective CLI tools, but the DistributedAgentWorker classes provided here allow for programmatic control and integration within your own async loops.

Downloads & popularity

1downloads
1-day window · source-reported counts19 Oct 2026
1890
2026-07-23: 3 · observed 2026-10-20T17:09:34.5676832Z · period 2026-07-23–2026-07-232026-07-27: 1 · observed 2026-10-20T17:09:34.5676832Z · period 2026-07-27–2026-07-272026-07-29: 12 · observed 2026-10-20T17:09:34.5676832Z · period 2026-07-29–2026-07-292026-07-31: 1 · observed 2026-10-20T17:09:34.5676832Z · period 2026-07-31–2026-07-312026-08-01: 1 · observed 2026-10-20T17:09:34.5676832Z · period 2026-08-01–2026-08-012026-08-02: 1 · observed 2026-10-20T17:09:34.5676832Z · period 2026-08-02–2026-08-022026-08-03: 6 · observed 2026-10-20T17:09:34.5676832Z · period 2026-08-03–2026-08-032026-08-04: 2 · observed 2026-10-20T17:09:34.5676832Z · period 2026-08-04–2026-08-042026-08-06: 1 · observed 2026-10-20T17:09:34.5676832Z · period 2026-08-06–2026-08-062026-08-09: 1 · observed 2026-10-20T17:09:34.5676832Z · period 2026-08-09–2026-08-092026-08-13: 2 · observed 2026-10-20T17:09:34.5676832Z · period 2026-08-13–2026-08-132026-08-14: 6 · observed 2026-10-20T17:09:34.5676832Z · period 2026-08-14–2026-08-142026-08-16: 1 · observed 2026-10-20T17:09:34.5676832Z · period 2026-08-16–2026-08-162026-08-17: 4 · observed 2026-10-20T17:09:34.5676832Z · period 2026-08-17–2026-08-172026-08-18: 18 · observed 2026-10-20T17:09:34.5676832Z · period 2026-08-18–2026-08-182026-08-19: 2 · observed 2026-10-20T17:09:34.5676832Z · period 2026-08-19–2026-08-192026-08-20: 2 · observed 2026-10-20T17:09:34.5676832Z · period 2026-08-20–2026-08-202026-08-22: 1 · observed 2026-10-20T17:09:34.5676832Z · period 2026-08-22–2026-08-222026-08-23: 1 · observed 2026-10-20T17:09:34.5676832Z · period 2026-08-23–2026-08-232026-08-24: 9 · observed 2026-10-20T17:09:34.5676832Z · period 2026-08-24–2026-08-242026-08-31: 3 · observed 2026-10-20T17:09:34.5676832Z · period 2026-08-31–2026-08-312026-09-01: 1 · observed 2026-10-20T17:09:34.5676832Z · period 2026-09-01–2026-09-012026-09-03: 1 · observed 2026-10-20T17:09:34.5676832Z · period 2026-09-03–2026-09-032026-09-05: 2 · observed 2026-10-20T17:09:34.5676832Z · period 2026-09-05–2026-09-052026-09-07: 1 · observed 2026-10-20T17:09:34.5676832Z · period 2026-09-07–2026-09-072026-09-09: 1 · observed 2026-10-20T17:09:34.5676832Z · period 2026-09-09–2026-09-092026-09-10: 1 · observed 2026-10-20T17:09:34.5676832Z · period 2026-09-10–2026-09-102026-09-12: 1 · observed 2026-10-20T17:09:34.5676832Z · period 2026-09-12–2026-09-122026-09-18: 2 · observed 2026-10-20T17:09:34.5676832Z · period 2026-09-18–2026-09-182026-09-21: 1 · observed 2026-10-20T17:09:34.5676832Z · period 2026-09-21–2026-09-212026-09-26: 1 · observed 2026-10-20T17:09:34.5676832Z · period 2026-09-26–2026-09-262026-09-27: 2 · observed 2026-10-20T17:09:34.5676832Z · period 2026-09-27–2026-09-272026-09-28: 1 · observed 2026-10-20T17:09:34.5676832Z · period 2026-09-28–2026-09-282026-09-29: 2 · observed 2026-10-20T17:09:34.5676832Z · period 2026-09-29–2026-09-292026-09-30: 6 · observed 2026-10-20T17:09:34.5676832Z · period 2026-09-30–2026-09-302026-10-01: 1 · observed 2026-10-20T17:09:34.5676832Z · period 2026-10-01–2026-10-012026-10-02: 1 · observed 2026-10-20T17:09:34.5676832Z · period 2026-10-02–2026-10-022026-10-04: 2 · observed 2026-10-20T17:09:34.5676832Z · period 2026-10-04–2026-10-042026-10-06: 1 · observed 2026-10-20T17:09:34.5676832Z · period 2026-10-06–2026-10-062026-10-07: 1 · observed 2026-10-20T17:09:34.5676832Z · period 2026-10-07–2026-10-072026-10-08: 1 · observed 2026-10-20T17:09:34.5676832Z · period 2026-10-08–2026-10-082026-10-09: 2 · observed 2026-10-20T17:09:34.5676832Z · period 2026-10-09–2026-10-092026-10-10: 1 · observed 2026-10-20T17:09:34.5676832Z · period 2026-10-10–2026-10-102026-10-11: 2 · observed 2026-10-20T17:09:34.5676832Z · period 2026-10-11–2026-10-112026-10-13: 3 · observed 2026-10-20T17:09:34.5676832Z · period 2026-10-13–2026-10-132026-10-15: 1 · observed 2026-10-20T17:09:34.5676832Z · period 2026-10-15–2026-10-152026-10-19: 1 · observed 2026-10-20T17:09:34.5676832Z · period 2026-10-19–2026-10-19
23 Jul19 Oct

pypistats · 47 observations shown. Missing days are unknown. Source category: overall: without mirrors.

View observed values
Date / source periodValueObserved at
2026-10-19 – 2026-10-1912026-10-20T17:09:34.5676832Z
2026-10-15 – 2026-10-1512026-10-20T17:09:34.5676832Z
2026-10-13 – 2026-10-1332026-10-20T17:09:34.5676832Z
2026-10-11 – 2026-10-1122026-10-20T17:09:34.5676832Z
2026-10-10 – 2026-10-1012026-10-20T17:09:34.5676832Z
2026-10-09 – 2026-10-0922026-10-20T17:09:34.5676832Z
2026-10-08 – 2026-10-0812026-10-20T17:09:34.5676832Z
2026-10-07 – 2026-10-0712026-10-20T17:09:34.5676832Z
2026-10-06 – 2026-10-0612026-10-20T17:09:34.5676832Z
2026-10-04 – 2026-10-0422026-10-20T17:09:34.5676832Z
2026-10-02 – 2026-10-0212026-10-20T17:09:34.5676832Z
2026-10-01 – 2026-10-0112026-10-20T17:09:34.5676832Z
2026-09-30 – 2026-09-3062026-10-20T17:09:34.5676832Z
2026-09-29 – 2026-09-2922026-10-20T17:09:34.5676832Z
2026-09-28 – 2026-09-2812026-10-20T17:09:34.5676832Z
2026-09-27 – 2026-09-2722026-10-20T17:09:34.5676832Z
2026-09-26 – 2026-09-2612026-10-20T17:09:34.5676832Z
2026-09-21 – 2026-09-2112026-10-20T17:09:34.5676832Z
2026-09-18 – 2026-09-1822026-10-20T17:09:34.5676832Z
2026-09-12 – 2026-09-1212026-10-20T17:09:34.5676832Z
2026-09-10 – 2026-09-1012026-10-20T17:09:34.5676832Z
2026-09-09 – 2026-09-0912026-10-20T17:09:34.5676832Z
2026-09-07 – 2026-09-0712026-10-20T17:09:34.5676832Z
2026-09-05 – 2026-09-0522026-10-20T17:09:34.5676832Z
2026-09-03 – 2026-09-0312026-10-20T17:09:34.5676832Z
2026-09-01 – 2026-09-0112026-10-20T17:09:34.5676832Z
2026-08-31 – 2026-08-3132026-10-20T17:09:34.5676832Z
2026-08-24 – 2026-08-2492026-10-20T17:09:34.5676832Z
2026-08-23 – 2026-08-2312026-10-20T17:09:34.5676832Z
2026-08-22 – 2026-08-2212026-10-20T17:09:34.5676832Z
2026-08-20 – 2026-08-2022026-10-20T17:09:34.5676832Z
2026-08-19 – 2026-08-1922026-10-20T17:09:34.5676832Z
2026-08-18 – 2026-08-18182026-10-20T17:09:34.5676832Z
2026-08-17 – 2026-08-1742026-10-20T17:09:34.5676832Z
2026-08-16 – 2026-08-1612026-10-20T17:09:34.5676832Z
2026-08-14 – 2026-08-1462026-10-20T17:09:34.5676832Z
2026-08-13 – 2026-08-1322026-10-20T17:09:34.5676832Z
2026-08-09 – 2026-08-0912026-10-20T17:09:34.5676832Z
2026-08-06 – 2026-08-0612026-10-20T17:09:34.5676832Z
2026-08-04 – 2026-08-0422026-10-20T17:09:34.5676832Z
2026-08-03 – 2026-08-0362026-10-20T17:09:34.5676832Z
2026-08-02 – 2026-08-0212026-10-20T17:09:34.5676832Z
2026-08-01 – 2026-08-0112026-10-20T17:09:34.5676832Z
2026-07-31 – 2026-07-3112026-10-20T17:09:34.5676832Z
2026-07-29 – 2026-07-29122026-10-20T17:09:34.5676832Z
2026-07-27 – 2026-07-2712026-10-20T17:09:34.5676832Z
2026-07-23 – 2026-07-2332026-10-20T17:09:34.5676832Z

Versions 1

Collected releases
VersionPublishedDirect dependenciesOpen version
0.0.026 Feb 20265

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 16:24 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:19ce0c7d0a6111f872d22294a9f0b0535d3ed5f9645919afabe2dff14f537547