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.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.1.0
File Size Uploaded
getpharos-0.1.0.tar.gz 6.2 kB Details

Built distribution (wheel)

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

Total release size: 12.8 kB

Release files / getpharos-0.1.0.tar.gz

Download URL getpharos-0.1.0.tar.gz
Size 6.2 kB
Tags Source
SHA-256 checksum
How to use checksums
181ea28ad513c3b90aa71dc422283564babab9a84cec78c7fcd0a793604f454d
BLAKE2b-256 checksum
How to use checksums
a5e207d265904aa1448930e3258f488fa737782a35a7b971af823c06627645b9
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 24, 2026.

Transparency log

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

Download URL getpharos-0.1.0-py3-none-any.whl
Size 6.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0209139b290526208ced2421d1af01adf79fdd8d3c3a65b1cb581ec654ad9f98
BLAKE2b-256 checksum
How to use checksums
92fa4309a9d6a3f25cdaf76e0fa8e14881f7368f16129adbba179af5709dae06
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 24, 2026.

Transparency log

Release history Release notifications | RSS feed

0.2.0

2 release files

0.1.1

2 release files

This release

0.1.0 This release

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