Skip to main content

getpharos

The Python SDK for Pharos — the trust control plane for enterprise AI agents.

Submit an agent action to Pharos before it executes and receive a policy verdict (allow / block / modify / escalate) plus a cryptographically sealed evidence record — two outputs of one transaction. The client honors the verdict deadline, retries transient failures, and falls back to a safe local default if the platform is unreachable.

The SDK is dependency-free (Python standard library only) so it installs anywhere.

Install

pip install getpharos

Requires Python 3.9+.

Quickstart

from pharos_sdk import PharosClient, PharosBlockedError

client = PharosClient(
    base_url="https://pharos.example.com",
    api_key="pk_...",
    deadline_ms=800,
    local_fail_mode="fail_closed",  # or "fail_open" for reversible actions
)

try:
    result = client.submit(
        tenant_id="acme",
        agent_id="billing-agent",
        action={"type": "payment.transfer", "payload": {"amount": 30000}},
    )
    verdict = result["verdict"]
    if verdict["decision"] == "allow":
        ...  # proceed with the action
except PharosBlockedError as e:
    print("blocked:", e.reason, e.citations)

Workflow continuation (escalation → human verdict → resume)

When an action escalates, park it and resume exactly once after a human decision:

resolved = client.await_resolution(
    tenant_id="acme",
    escalation_id=result["escalation"]["id"],
)

What you get

  • Deadline-aware requests that respect the verdict budget.
  • Local fail-mode: reversible actions fail open, irreversible actions fail closed, when Pharos is unreachable — the same semantics as the server.
  • Framework adapters for CrewAI and the MS Agent Framework (crewai_tool, ms_agent_tool), plus a generic govern_tool / Governor.

Verification

Every verdict is backed by a sealed, hash-chained evidence record that any third party can verify offline from the exported bundle and the published public keyset — no Pharos infrastructure required. See the main repository for the evidence model and the offline verifier.

License

Apache-2.0.

Metadata

Release files for getpharos 0.1.1

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

Source distribution (sdist)

Source distribution for getpharos 0.1.1
File Size Uploaded
getpharos-0.1.1.tar.gz 6.9 kB Details

Built distribution (wheel)

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

Total release size: 13.7 kB

Release files / getpharos-0.1.1.tar.gz

Download URL getpharos-0.1.1.tar.gz
Size 6.9 kB
Tags Source
SHA-256 checksum
How to use checksums
45fa6bdde2d5e80867c1e3ba2aa25a7e14c1048ef8874bd67c12cb930a3b1b6c
BLAKE2b-256 checksum
How to use checksums
e41e376f9d18b02eb2fe685201ea1e4649403816b71f7ff1a2508cbce65c452d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.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 Jul 27, 2026.

Transparency log

Release files / getpharos-0.1.1-py3-none-any.whl

Download URL getpharos-0.1.1-py3-none-any.whl
Size 6.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7fd05ee96c7488843b5113bbe59b15325fd1903c8e4ebc104c9622016d67a36c
BLAKE2b-256 checksum
How to use checksums
f96ea8c994dda64baee15e0cddb595d28b09b27269c9e9db9f2ea9b016da063a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.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 Jul 27, 2026.

Transparency log

Release history Release notifications | RSS feed

0.2.0

2 release files

This release

0.1.1 This release

2 release files

0.1.0

2 release files

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