agent-grid — Mesh Topology for Distributed Agents
Grid-based agent communication with mesh, ring, star, and tree topologies. Failure detection and workload dispatch.
What This Gives You
- Grid nodes — register agents as nodes with status tracking (ACTIVE, IDLE, OVERLOADED, OFFLINE)
- Multiple topologies — mesh, ring, star, tree — pick the right one for your coordination pattern
- Work dispatching — distribute tasks across the grid with load balancing
- Failure detection — heartbeat-based failure detection with configurable timeouts
- Pure Python — no external dependencies
Quick Start
pip install agent-grid
from agent_grid import Grid, GridNode, MeshTopology, WorkDispatcher
# Create a grid with mesh topology
grid = Grid(topology=MeshTopology())
grid.add_node(GridNode(id="agent-1", capabilities=["python"]))
grid.add_node(GridNode(id="agent-2", capabilities=["rust"]))
grid.add_node(GridNode(id="agent-3", capabilities=["docs"]))
# Dispatch work
dispatcher = WorkDispatcher(grid)
task = Task(title="Build API", requirements=["python"])
assigned = dispatcher.dispatch(task)
print(f"Assigned to: {assigned.node_id}")
# Topology-aware routing
neighbors = grid.get_neighbors("agent-1")
print(f"Neighbors: {[n.id for n in neighbors]}")
API Reference
Grid(topology) — Node management and topology queries
GridNode(id, capabilities, status=ACTIVE) — Agent node representation
Topology / MeshTopology / RingTopology / StarTopology / TreeTopology
WorkDispatcher(grid) — Task → node assignment with load balancing
FailureDetector(timeout) — Heartbeat monitoring and node liveness
How It Fits
The network layer for the SuperInstance fleet. Agents register on the grid, work is dispatched by topology-aware routing.
- captain — Fleet commanding (uses grid for coordination)
- cluster-orchestrator — Cluster orchestration
- cocapn-com — Message routing
Testing
pytest tests/
Installation
pip install agent-grid
Python 3.10+. MIT license.
Metadata
Release files for si-agent-grid 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| si_agent_grid-0.1.0.tar.gz | 19.5 kB | Without provenance | Details for si_agent_grid-0.1.0.tar.gz |
Release files / si_agent_grid-0.1.0.tar.gz
| Download URL | si_agent_grid-0.1.0.tar.gz |
|---|---|
| Size | 19.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1635be540be7ff3fc636392d031a1c9e777e80eb056a776987b37b9310e38bbd
|
|
BLAKE2b-256 checksum How to use checksums |
37e0797a6fe57572b2624b3136812a337bed114f2372a2f96aff729f1f54d7aa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.12
|
Security for si-agent-grid 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.