Skip to main content

grantex-a2a

Google A2A protocol bridge for Grantex — inject grant tokens into agent-to-agent communication.

Installation

pip install grantex-a2a

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.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for grantex-a2a 0.1.6
File Size Uploaded
grantex_a2a-0.1.6.tar.gz 13.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for grantex-a2a 0.1.6
File Interpreter ABI Platform
grantex_a2a-0.1.6-py3-none-any.whl Python 3 none any Details

Total release size: 26.3 kB

Release files / grantex_a2a-0.1.6.tar.gz

Download URL grantex_a2a-0.1.6.tar.gz
Size 13.2 kB
Tags Source
SHA-256 checksum
How to use checksums
c1eada5b6cdb1419238e6debb39945dffa8f17da464d444731628fdba1a05de5
BLAKE2b-256 checksum
How to use checksums
6da5adc128e9f20b12db0e78990679d4a2230bbb827c5cd695869e4d0cebabeb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.13

Release files / grantex_a2a-0.1.6-py3-none-any.whl

Download URL grantex_a2a-0.1.6-py3-none-any.whl
Size 13.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
64ca290e7e23b46ba1c9abda53a9eb403a696b55deb548c69ce43dd0f32ed8d6
BLAKE2b-256 checksum
How to use checksums
be80dad9e334e9216d5cd629e76c63b99141cd4d3ed808198428efdb406034ba
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.13

Release history Release notifications | RSS feed

This release

0.1.6 This release

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page