Coverage for integrations / distributed_agent / __init__.py: 100.0%

7 statements  

« prev     ^ index     » next       coverage.py v7.14.0, created at 2026-05-12 04:49 +0000

1""" 

2Distributed Agent — cross-host task coordination for ANY agent type. 

3 

4Composes existing SmartLedger (agent_ledger), TaskDelegationBridge (internal_comm), 

5and AgentSkillRegistry (internal_comm) with pluggable coordination backends. 

6 

7Backend-agnostic: Redis when available, in-memory when not, gossip for 

8multi-node without Redis. No external dependency required for single-node. 

9 

10Vision: "When all AI in the world work on a single repo" — task delegation 

11and compute (capex) shared by regional hosts. 

12""" 

13 

14from .host_registry import RegionalHostRegistry 

15from .task_coordinator import DistributedTaskCoordinator 

16from .verification_protocol import VerificationProtocol 

17from .coordinator_backends import ( 

18 InMemoryTaskLock, 

19 InMemoryHostRegistry, 

20 GossipTaskBridge, 

21 create_coordinator, 

22) 

23from .api import distributed_agent_bp, get_coordinator_backend_type 

24from .worker_loop import DistributedWorkerLoop, worker_loop 

25 

26__all__ = [ 

27 "RegionalHostRegistry", 

28 "DistributedTaskCoordinator", 

29 "VerificationProtocol", 

30 "InMemoryTaskLock", 

31 "InMemoryHostRegistry", 

32 "GossipTaskBridge", 

33 "create_coordinator", 

34 "distributed_agent_bp", 

35 "get_coordinator_backend_type", 

36 "DistributedWorkerLoop", 

37 "worker_loop", 

38]