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.2.0

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.2.0
File Size Uploaded
getpharos-0.2.0.tar.gz 10.1 kB Details

Built distribution (wheel)

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

Total release size: 19.3 kB

Release files / getpharos-0.2.0.tar.gz

Download URL getpharos-0.2.0.tar.gz
Size 10.1 kB
Tags Source
SHA-256 checksum
How to use checksums
963c1f5f5f31d70c571a0d3a3a3173cbcb315c083d188ce04f6d3158895c9a4e
BLAKE2b-256 checksum
How to use checksums
b5314b8ac00ca23ac939cc8f96243b04fc73e1b8202f825f78e00ea31b58cb94
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.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 Aug 3, 2026.

Transparency log

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

Download URL getpharos-0.2.0-py3-none-any.whl
Size 9.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0c7079fa515750d0f7e10734a0c1f8312b28e72ceed4765ba23e11c803bbee63
BLAKE2b-256 checksum
How to use checksums
e441b35c35873eea5b8d64f7009f6db8a765f4c305770cd914f89960069cb10a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.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 Aug 3, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.1

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