This project has been archived by its maintainers, and is no longer receiving any updates.
AgentPatch
Zero-dependency Python SDK and CLI for the AgentPatch tool marketplace. Single file, stdlib only.
Install
pip install agentpatch
Or with pipx for CLI-only usage:
pipx install agentpatch
Or just copy src/agentpatch.py into your project — it has no dependencies beyond Python 3.10+.
Authentication
Get your API key from agentpatch.ai/dashboard, then either:
# Option 1: Save to config file
ap config set-key
# Option 2: Environment variable
export AGENTPATCH_API_KEY=ap_your_key_here
CLI Usage
# Search for tools
ap search "image generation"
ap search --max-price 100 --json
# Get tool details
ap info agentpatch google-search
# Invoke a tool (waits for result by default)
ap run agentpatch google-search --input '{"query": "best pizza NYC"}'
# Invoke without waiting (for async tools)
ap run agentpatch generate-image-recraft --input '{"prompt": "a cat"}' --no-poll
# Check async job status
ap job job_abc123
ap job job_abc123 --poll # wait for completion
Every command supports --json for scripting:
ap search "email" --json | jq '.[0].slug'
ap run agentpatch google-search --input '{"query": "test"}' --json | jq '.output'
SDK Usage
from agentpatch import AgentPatch
ap = AgentPatch() # uses AGENTPATCH_API_KEY env var or ~/.agentpatch/config.toml
# Search for tools
tools = ap.search("image generation")
for t in tools["tools"]:
print(f"{t['owner_username']}/{t['slug']} — {t['price_credits_per_call']} credits")
# Get tool details
tool = ap.get_tool("agentpatch", "google-search")
print(tool["input_schema"])
# Invoke a tool (auto-polls async jobs)
result = ap.invoke("agentpatch", "google-search", {"query": "best pizza NYC"})
print(result["output"])
# Manual async control
result = ap.invoke("agentpatch", "generate-image-recraft", {"prompt": "a cat"}, poll=False)
job = ap.get_job(result["job_id"])
Configuration
API key resolution order:
api_key=parameter (SDK) or--api-keyflag (CLI)AGENTPATCH_API_KEYenvironment variable~/.agentpatch/config.tomlfile
ap config set-key # save API key
ap config show # show current config
ap config clear # delete config file
License
MIT
Metadata
Release files for agentpatch 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 |
|---|---|---|---|---|
| agentpatch-0.2.0.tar.gz | 10.6 kB | With provenance | Details for agentpatch-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| agentpatch-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for agentpatch-0.2.0-py3-none-any.whl |
Total release size: 19.5 kB
Release files / agentpatch-0.2.0.tar.gz
| Download URL | agentpatch-0.2.0.tar.gz |
|---|---|
| Size | 10.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b3b865726836439a33d79684655a4e308e8d5073d575293345434ccac03b78eb
|
|
BLAKE2b-256 checksum How to use checksums |
021f9d6ace3d5a1a58bf3ce8c4312f67dc3812fec19fa7d27477a12fc196ebad
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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 Mar 4, 2026.
Transparency logRelease files / agentpatch-0.2.0-py3-none-any.whl
| Download URL | agentpatch-0.2.0-py3-none-any.whl |
|---|---|
| Size | 9.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
38aac9becc71e76f7d382534dd00026dfee2f57d789eaccbe571c94c37c88624
|
|
BLAKE2b-256 checksum How to use checksums |
ce48d5fe6156bb8dd8cebb1e1e7ce9d18ab9c1b2e02fd2f2e2f8d1eeef5c8212
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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 Mar 4, 2026.
Transparency logSecurity for agentpatch 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
Both files in this release have been uploaded with provenance metadata.
Attestation for agentpatch-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 Mar 4, 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.