Skip to main content

tappass — Zero Trust Control Plane for Agentic AI (Python SDK)

Runtime governance for your LLM, agent, and tool calls. Embed in your code, get a typed audit trail, surface governance decisions as Python exceptions.

What this SDK is for:

  • Governing LLM calls, agent runs, and tool executions at runtime.
  • Emitting structured audit events with correlation IDs.
  • Handling governance decisions (block, redact, approve, trust-tier, break-glass) as typed exceptions in your code.

What this SDK is NOT for:

  • Policy CRUD, compliance report generation, Verified credential issuance, retention config, break-glass invocation, tool-integrity approval. Those live in the TapPass dashboard — not in your agent code.

Requirements

  • Python ≥ 3.11.
  • tappass server ≥ 0.6.0. (The SDK rejects older servers at construction time.)

Install

pip install tappass

Quickstart — a governed chat call

from tappass import Agent

agent = Agent("https://tappass.example.com", api_key="tp_...")
r = agent.chat("Summarize Q4 revenue")
print(r.content)
print(r.session_id, r.audit_url)   # correlation IDs, deep link to dashboard

Quickstart — govern a CrewAI run

from crewai import Agent, Task, Crew
from tappass.integrations.crewai import guard_crew

crew = Crew(agents=[...], tasks=[...])

with guard_crew(crew, tappass_url="https://tappass.example.com", api_key="tp_...") as session:
    result = session.kickoff()
    print(session.id, session.audit_url)

Skills learn from your agents

Your organization's skills in TapPass improve from the people using them. Tell TapPass when an agent uses a skill and how it did; reports from different people about the same problem become a suggested change for the skill's owner.

from tappass import skills

used = skills.load("legal/nda")
for line in used.notices:          # the owner decided on an earlier report
    print(line)                    # pass it on to the person, once
reply = skills.report(
    "legal/nda", "correction",
    what_happened="The draft accepted unlimited liability.",
    user_words="We never accept unlimited liability; cap it at the contract value.",
    end_user="ann@firm.example",   # the person the agent acts for
)
print(reply.message)               # pass this on to the person

Both calls are governed by your rules first, like any agent action.

Telemetry kill-switch

The SDK delivers audit events to your TapPass server asynchronously via a background reporter. To disable that delivery entirely, set either of:

export TAPPASS_DISABLE_TELEMETRY=1
export DO_NOT_TRACK=1     # community convention — consoledonottrack.com

This only suppresses audit-event delivery. It does not disable governance — govern() calls still run, decisions are still enforced, blocks still raise GovernanceBlocked. The distinction is deliberate: governance is the product you're paying for; telemetry is observability of your own usage.

Decisions are typed exceptions

from tappass import GovernanceDecision, PolicyBlockError, ApprovalRequired

try:
    r = agent.chat("Show me all customer SSNs")
except PolicyBlockError as e:
    print(f"Blocked by {e.blocked_by}: {e.reason}. See {e.audit_url}")
except ApprovalRequired as e:
    print(f"Awaiting approval: {e.approval_url}")
except GovernanceDecision as e:
    print(f"Governance decision: {e}")

Plan limits: per-minute limit and quota

Your workspace's plan caps governed calls per minute, and may carry a rolling quota (calls per window of hours). See both with tappass settings billing show (-o json for the raw per_minute_limit and quota fields).

  • Per-minute limit (HTTP 429, plan_rate_limited): the SDK waits Retry-After (at most 10 s; 1 s when the header is missing) and retries once. If that is refused too it raises PerMinuteLimitError (retry_after, limit).
  • Quota (SUBSCRIPTION_EXHAUSTED): never retried; raises QuotaExceededError (quota, window_hours when the server sends them; the message names the quota and window).

Both subclass PlanLimitError (a TapPassError, and a GovernanceCallError on the govern() path, so enforce mode still fails closed).

from tappass import PerMinuteLimitError, QuotaExceededError

try:
    r = agent.chat("Summarize Q4 revenue")
except PerMinuteLimitError as e:
    print(f"Slow down: try again in {e.retry_after} s")
except QuotaExceededError as e:
    print(e)  # e.g. "...quota of 5000 calls per 5 hours, agreed with TapPass..."

Turn the retry off with Agent(..., retry_per_minute=False) (same on AsyncAgent).

What's new in 0.6

See CHANGELOG.md. Breaking changes — no back-compat with 0.5.x. See the migration guide.

Publishing a release

Releases ship to PyPI via GitHub Actions using OIDC Trusted Publishing — no long-lived API token is stored anywhere. The workflow is .github/workflows/release.yml.

One-time PyPI configuration

Only needed once per project (or whenever the workflow name / environment changes):

  1. Log in to https://pypi.org/manage/account/publishing/.
  2. Under Add a new pending publisher (if the project isn't on PyPI yet) or the existing project's Publishing tab, add a GitHub publisher with:
    • PyPI Project Name: tappass
    • Owner: tappass
    • Repository name: tappass-sdk
    • Workflow name: release.yml
    • Environment name: pypi
  3. In the GitHub repo, go to Settings → Environments and create an environment named pypi. Optionally add a required-reviewers protection rule so a human approves each release.

That's it — no secrets, no tokens.

Cutting a release

  1. Bump version in pyproject.toml (and __version__ in tappass/__init__.py).
  2. Update CHANGELOG.md: flip ## [X.Y.Z] — Unreleased to ## [X.Y.Z] — YYYY-MM-DD.
  3. Commit: git commit -am "release: X.Y.Z".
  4. Tag and push:
    git tag vX.Y.Z
    git push origin main --tags
    

The workflow then:

  1. Verifies the tag matches pyproject.toml version (fails the release if not).
  2. Builds wheel + sdist.
  3. Runs twine check.
  4. Publishes to PyPI via OIDC.
  5. Creates a GitHub Release with the wheel + sdist attached and auto-generated notes.

Dry run

To build the artifacts without publishing, use Actions → Release to PyPI → Run workflow with dry_run checked. The publish and github_release jobs are skipped; the build job's artifacts are retained for inspection.

License

Apache-2.0. See LICENSE.

Metadata

Release files for tappass 0.12.70

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

Source distribution (sdist)

Source distribution for tappass 0.12.70
File Size Uploaded Provenance Actions
tappass-0.12.70.tar.gz 399.4 kB With provenance Details for tappass-0.12.70.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for tappass 0.12.70
File Interpreter ABI Platform Actions
tappass-0.12.70-py3-none-any.whl Python 3 none any Details for tappass-0.12.70-py3-none-any.whl

Total release size: 922.5 kB

Release files / tappass-0.12.70.tar.gz

Download URL tappass-0.12.70.tar.gz
Size 399.4 kB
Tags Source
SHA-256 checksum
How to use checksums
1460ca5aa1b7331a8854eea6e408d8c1dd953a115003a7d332ea2643c3988a25
BLAKE2b-256 checksum
How to use checksums
8c708de2bbb76363cb98a33d5a1461ec7a7c06b4bf50ade0583f55b95d73936d
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 Nov 12, 2026.

Transparency log

Release files / tappass-0.12.70-py3-none-any.whl

Download URL tappass-0.12.70-py3-none-any.whl
Size 523.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
550f9ebb12c4e518611d2910ae26a68ea80e2eb9e77d7b71dd219cbad6c4e483
BLAKE2b-256 checksum
How to use checksums
6b9062a475cf6b3e3395c975f2598b347c30aa611c31caab327ad1ddae567946
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 Nov 12, 2026.

Transparency log

Security for tappass 0.12.70

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.

Select from 2 files

Attestation for tappass-0.12.70.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 Nov 12, 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.12.70 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