grantex-a2a
Google A2A protocol bridge for Grantex — inject grant tokens into agent-to-agent communication.
Installation
pip install grantex-a2a==0.1.5
Usage
Client — Send tasks to A2A agents with grant token auth
from grantex_a2a import A2AGrantexClient, A2AGrantexClientOptions, TaskSendParams, A2AMessage, A2APart
client = A2AGrantexClient(A2AGrantexClientOptions(
agent_url="https://agent.example.com/a2a",
grant_token="eyJ...",
))
task = client.send_task(TaskSendParams(
message=A2AMessage(role="user", parts=[A2APart(type="text", text="Hello")])
))
Server middleware — Validate incoming grant tokens
from grantex_a2a import create_a2a_auth_middleware, A2AAuthMiddlewareOptions
middleware = create_a2a_auth_middleware(
A2AAuthMiddlewareOptions(jwks_uri="https://api.grantex.dev/.well-known/jwks.json")
)
# In your request handler:
grant = middleware(dict(request.headers))
print(grant.principal_id, grant.scopes)
Agent Card — Build A2A-compliant agent cards
from grantex_a2a import build_grantex_agent_card, GrantexAgentCardOptions
card = build_grantex_agent_card(GrantexAgentCardOptions(
name="My Agent",
description="An agent",
url="https://my-agent.example.com/a2a",
jwks_uri="https://api.grantex.dev/.well-known/jwks.json",
issuer="https://grantex.dev",
))
Ownership
Grantex is owned by Orchestrum Technologies LLP. Inventor and owner: Sanjeev Kumar. Ownership contact: sanjeev@orchestrum.in or mishra.sanjeev@gmail.com.
Authority hardening requires Python SDK 0.7.1 (
current_authority), not just a valid JWT signature. Bind the audience and trusted human/agent identities, and check the issuer before every execution. This does not create human consent or automatically consume action decisions/spend caps. Existing offline defaults remain offline. Verify registry availability before installation. See the SDK execution authority guide.
Metadata
Release files for grantex-a2a 0.1.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| grantex_a2a-0.1.5.tar.gz | 13.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| grantex_a2a-0.1.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 26.6 kB
Release files / grantex_a2a-0.1.5.tar.gz
| Download URL | grantex_a2a-0.1.5.tar.gz |
|---|---|
| Size | 13.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ea5abdb34d99a28cf7e0bb8d8408124b7a041dea94aa92a0ac30286e534b9e0c
|
|
BLAKE2b-256 checksum How to use checksums |
69c1556a3da3e6b674d8c651f388985b92d937d9937dd46c60bda9ecd3eeb9f2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.4
|
Release files / grantex_a2a-0.1.5-py3-none-any.whl
| Download URL | grantex_a2a-0.1.5-py3-none-any.whl |
|---|---|
| Size | 13.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a7777da28abe6dc8f828a015cb5446dbcdef4ac0cfa68d55cdeb8f721ff8cfe2
|
|
BLAKE2b-256 checksum How to use checksums |
1d1253b0c54e3fa0829474925dafc218ce30b0868da030c918416f8de21a2b0b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.4
|