agentgrid-py
Task routing for production AI agents. Given a task, AgentGrid finds the right agent from your registry based on capabilities, health, and policy — then dispatches.
Install
pip install agentgrid-py
pip install "agentgrid-py[registry]" # with agentregistry-py
pip install "agentgrid-py[all]" # with registry + mesh + policy
Quickstart
import asyncio
from agentgrid import AgentGrid
from agentregistry import AgentRegistry, AgentManifest
async def main():
registry = AgentRegistry()
registry.publish(AgentManifest(
id="acme.search-agent", version="1.0.0",
capabilities=["search", "summarize"],
framework="langgraph",
))
grid = AgentGrid(registry=registry)
# Register handler for local dispatch
async def search_handler(task: str, payload: dict) -> dict:
return {"output": f"search results for: {task}"}
grid.register("acme.search-agent", search_handler)
# Route task to best agent
result = await grid.route("find quarterly revenue", requires=["search"])
print(f"Routed to: {result.agent_id} (score={result.score:.2f})")
print(f"Response: {result.response}")
asyncio.run(main())
Routing Strategies
from agentgrid import RoutingStrategy
# Best capability match (default)
result = await grid.route(task, strategy=RoutingStrategy.BEST_MATCH)
# Round-robin across eligible agents
result = await grid.route(task, strategy=RoutingStrategy.ROUND_ROBIN)
# Least loaded agent
result = await grid.route(task, strategy=RoutingStrategy.LEAST_LOADED)
# Broadcast to all eligible agents
results = await grid.broadcast(task, requires=["handle_event"])
Stack
agentgrid → routing which agent handles what task
agentmesh → events connects agents via pub/sub
agentplane → policy governs agent behaviour
agentregistry → discovery what agents exist and their capabilities
Apache 2.0 · PyPI
Metadata
Release files for agentgrid-py 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 |
|---|---|---|---|---|
| agentgrid_py-0.1.0.tar.gz | 9.0 kB | Without provenance | Details for agentgrid_py-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| agentgrid_py-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for agentgrid_py-0.1.0-py3-none-any.whl |
Total release size: 17.3 kB
Release files / agentgrid_py-0.1.0.tar.gz
| Download URL | agentgrid_py-0.1.0.tar.gz |
|---|---|
| Size | 9.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bc357c2d1c1ea85ffc6455317de8661ffd42d16a06ad4cc8b32ef3ade494f6e3
|
|
BLAKE2b-256 checksum How to use checksums |
7b5a8c162bd0b23cc301d8a92f8a2653341bd1b5375178784356a87aabff7f6f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Release files / agentgrid_py-0.1.0-py3-none-any.whl
| Download URL | agentgrid_py-0.1.0-py3-none-any.whl |
|---|---|
| Size | 8.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c90f5c851dd293aa0be8273dab3ef2b2ab2944274a6c3add2b5595c3382fde23
|
|
BLAKE2b-256 checksum How to use checksums |
49e73bccee23f6f00079729063b458d6077f12d440af9fe399b162c4ab6c1297
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Security for agentgrid-py 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.