Skip to main content

Python client for Postcept, Proof-of-Completion for AI agents. Verify high-risk agent actions against the system of record and get a signed completion receipt.

Project description

Postcept Python SDK

Postcept is Proof-of-Completion for AI agents. After an agent takes a high-risk action (a refund, a cancellation, a ticket resolution), you verify the action actually happened in the system of record and get back a signed completion receipt. "done" becomes proof, not a claim.

pip install postcept

Usage

from postcept import Postcept

pc = Postcept(api_key="pcpt_sk_...")  # create a key in the dashboard

# After your agent issues a refund, prove it actually completed:
result = pc.verify_refund(
    operation_id="refund_8F31",        # stable across retries
    agent_id="SupportAgent-04",
    refund_id="re_4md82k",
    amount_cents=12000,
    currency="usd",
    customer="mara.ellis@example.com",
    idempotency_key="refund_8F31",     # safe to retry
)

print(result["result"])                # "verified" | "incomplete" | "duplicated" | "mismatched" | "policy_failed"
print(result["receipt"]["id"])         # signed completion receipt

Cancellations work the same way:

pc.verify_cancellation(
    operation_id="cancel_2240",
    agent_id="SupportAgent-04",
    subscription_id="sub_9Kd21",
    customer="mara.ellis@example.com",
)

Read your Verified Completion Rate:

pc.verified_completion_rate()  # {"claimed": 1240, "verified": 1167, "verified_completion_rate": 0.9411, ...}

Notes

  • Auth: pass an organization API key (pcpt_sk_...). All data is scoped to that org.
  • Idempotency: pass idempotency_key so retried submissions return the original verification instead of creating a duplicate.
  • Errors: non-2xx responses raise PostceptError (.status_code, .detail).
  • Base URL: defaults to https://api.postcept.com. Override with Postcept(api_key=..., base_url=...) for staging.
  • Use as a context manager (with Postcept(...) as pc:) to close the HTTP client.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

postcept-0.2.1.tar.gz (17.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

postcept-0.2.1-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

Details for the file postcept-0.2.1.tar.gz.

File metadata

  • Download URL: postcept-0.2.1.tar.gz
  • Upload date:
  • Size: 17.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.28 {"installer":{"name":"uv","version":"0.9.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for postcept-0.2.1.tar.gz
Algorithm Hash digest
SHA256 616253befc385f29962af80c5825f2b4b6320b5bed2b6a0ad5bbb5a492d03c60
MD5 dbfed9dfe55fb92afd4c629b563e79ea
BLAKE2b-256 6fd9bc6babc5f55296ecde60e2bb2546ebea27cd634996d5a0eab724f439cab7

See more details on using hashes here.

File details

Details for the file postcept-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: postcept-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 5.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.28 {"installer":{"name":"uv","version":"0.9.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for postcept-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4f1882988505322a4ff0b53f7b96bb6ccef9f50a9587cb400f0aa983165369ce
MD5 cf1e948eb5dc40307ddd2074c02af7cb
BLAKE2b-256 e69685226a13c9a24c159c1ce3af10bc8e81930d0a5846148bd5408cd1feaf8d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page