Skip to main content

kade-agent-sdk

Creator SDK for Kade: verify that requests come from the Kade gateway, report billable events and answer data-subject (export/erase) requests.

uv add "kade-agent-sdk[fastmcp]"     # import name: marketplace_sdk
from fastmcp import FastMCP
from marketplace_sdk import GatewayVerifier, gateway_claims, report_event
from marketplace_sdk.fastmcp import MarketplaceMiddleware, add_data_subject_tools

mcp = FastMCP("my-agent")
verifier = GatewayVerifier(
    jwks_url="https://kade.taskmastergpt.nl/.well-known/jwks.json",
    issuer="https://mcp.kade.taskmastergpt.nl",
    agent_id="agt_…",                       # from your creator console
)
mcp.add_middleware(MarketplaceMiddleware(verifier))

@mcp.tool
async def lookup(query: str) -> dict:
    report_event("record_found", 3)          # billed at your event price, capped per call
    return {"run_id": gateway_claims().run_id, "query": query}

# Required to publish. Stateless agents:
add_data_subject_tools(mcp, stores_no_user_data=True)
# ...or, if you keep data per user (subject = pseudonymous `sub` from the gateway token):
# add_data_subject_tools(mcp, erase=lambda s: db.delete(s), export=lambda s: db.records(s))

app = mcp.http_app(path="/mcp")             # serve with uvicorn on HTTPS
  • GatewayVerifier checks EdDSA signature (JWKS cached 1 h, kid rotation), iss, aud = agent:<agent_id>, exp and scope (call, register, verify, erase, export).
  • MarketplaceMiddleware verifies every request, rejects register tokens on tool calls, tokens issued for another tool and erase/export tokens outside the reserved tools, and merges reported events into the result _meta.
  • add_data_subject_tools registers kade_erase_subject and kade_export_subject; Kade strips them from your listing and calls them only with scope=erase/export (SPEC §7.5).
  • Not using FastMCP? Wrap your ASGI app in marketplace_sdk.asgi.GatewayAuthMiddleware and add billing_meta({"record_found": 3}) to your result _meta.
  • gateway_claims().test is true for creator test calls and verification runs (never billed).

License

PolyForm Shield 1.0.0. In short: use it, change it and ship it in your agents, including agents you sell on Kade; suggest changes to us. What it does not allow is offering the SDK, or a product built with it, that competes with it or with Kade, for example reselling the SDK or running a rival marketplace on it. This is a source-available license, not an OSI open-source license.

Metadata

Release files for kade-agent-sdk 0.1.0

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

Source distribution (sdist)

Source distribution for kade-agent-sdk 0.1.0
File Size Uploaded Provenance Actions
kade_agent_sdk-0.1.0.tar.gz 8.7 kB With provenance Details for kade_agent_sdk-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for kade-agent-sdk 0.1.0
File Interpreter ABI Platform Actions
kade_agent_sdk-0.1.0-py3-none-any.whl Python 3 none any Details for kade_agent_sdk-0.1.0-py3-none-any.whl

Total release size: 19.6 kB

Release files / kade_agent_sdk-0.1.0.tar.gz

Download URL kade_agent_sdk-0.1.0.tar.gz
Size 8.7 kB
Tags Source
SHA-256 checksum
How to use checksums
00fc5066401525d0548bc0d88eb4cd5eaf1046750e344d6501f0058c084b0816
BLAKE2b-256 checksum
How to use checksums
7c5ead8ffacf94f6c0d56ea02cbe00f83401a8b158d5c5d603faa37879877a14
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 14, 2026.

Transparency log

Release files / kade_agent_sdk-0.1.0-py3-none-any.whl

Download URL kade_agent_sdk-0.1.0-py3-none-any.whl
Size 11.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6cd1d804a98e7787bb9316410892a43c6324eacfe9b7b9e8dbb368f5f3db7c16
BLAKE2b-256 checksum
How to use checksums
81d7315373eb626adeafd303631979a752334a185455c92e7ae7482ad5ecacf5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 14, 2026.

Transparency log

Security for kade-agent-sdk 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.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for kade_agent_sdk-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 14, 2026.

Transparency log

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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

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