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
GatewayVerifierchecks EdDSA signature (JWKS cached 1 h,kidrotation),iss,aud = agent:<agent_id>,expandscope(call,register,verify,erase,export).MarketplaceMiddlewareverifies every request, rejectsregistertokens on tool calls, tokens issued for another tool anderase/exporttokens outside the reserved tools, and merges reported events into the result_meta.add_data_subject_toolsregisterskade_erase_subjectandkade_export_subject; Kade strips them from your listing and calls them only withscope=erase/export(SPEC §7.5).- Not using FastMCP? Wrap your ASGI app in
marketplace_sdk.asgi.GatewayAuthMiddlewareand addbilling_meta({"record_found": 3})to your result_meta. gateway_claims().testis true for creator test calls and verification runs (never billed).
Publish from your repository: kade
The SDK installs a kade command that publishes the agent described by kade.toml (listing,
endpoint, prices, limits, data declaration, eval cases) through the Kade creator API, so you never
copy values into the console by hand.
kade login # paste a creator key (API keys → "Publishing agents")
kade apply # 1st run creates the agent and writes MARKETPLACE_AGENT_ID to .env
# deploy your server with that MARKETPLACE_AGENT_ID, then:
kade apply # registers the version, sets prices, limits, data, eval cases
kade test my_tool '{"q": "x"}' # free test call
kade check # eval cases + security scan
kade submit # submit for review
kade status # checklist and the next step
kade apply --dry-run shows what would change; --json on any command prints the API response
for scripts and coding agents. KADE_API_KEY and KADE_ENDPOINT_URL override the saved key and
[version] endpoint_url (useful in CI); KADE_UPSTREAM_KEY sends an optional X-Agent-Key for
your server.
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.2.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 |
|---|---|---|---|---|
| kade_agent_sdk-0.2.0.tar.gz | 13.9 kB | With provenance | Details for kade_agent_sdk-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| kade_agent_sdk-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for kade_agent_sdk-0.2.0-py3-none-any.whl |
Total release size: 31.4 kB
Release files / kade_agent_sdk-0.2.0.tar.gz
| Download URL | kade_agent_sdk-0.2.0.tar.gz |
|---|---|
| Size | 13.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2040cfc1a92220b425be7419eb025fb37c1847f7a228a5b5a9b0bc7c3dfb6287
|
|
BLAKE2b-256 checksum How to use checksums |
91e583576cfbb9b55cc60cfb12d3d8806cbddac8d2a3cee5bf250f8632161835
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 21, 2026.
Transparency logRelease files / kade_agent_sdk-0.2.0-py3-none-any.whl
| Download URL | kade_agent_sdk-0.2.0-py3-none-any.whl |
|---|---|
| Size | 17.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4504a031cdff0c970f7b8a622f7568a1a50180020f9813b9508f74a379045f9c
|
|
BLAKE2b-256 checksum How to use checksums |
bb6c11f523f36a01d3f8e6db35a1936835a20caf3cebe8d44a2e8a670ae99329
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 21, 2026.
Transparency logSecurity for kade-agent-sdk 0.2.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.
Attestation for kade_agent_sdk-0.2.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 21, 2026.
Transparency logA 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.